Skip to content

Commit daca9f7

Browse files
Fix assume_role handling when role_arn is given
There is a syntax error in the assume_role block with missing equals sign. As this part has anyway required newer terraform to work, document it in variable definition of role_arn input.
1 parent ea1e4b6 commit daca9f7

File tree

3 files changed

+3
-4
lines changed

3 files changed

+3
-4
lines changed

examples/complete/variables.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ variable "profile" {
9797
variable "role_arn" {
9898
type = string
9999
default = ""
100-
description = "The role to be assumed"
100+
description = "The role to be assumed. If this is set, `terraform_version` variable must be `1.6.0` or higher."
101101
}
102102

103103
variable "terraform_backend_config_file_name" {

templates/terraform.tf.tpl

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,7 @@ terraform {
88
profile = "${profile}"
99
encrypt = "${encrypt}"
1010
%{~ if role_arn != "" ~}
11-
12-
assume_role {
11+
assume_role = {
1312
role_arn = "${role_arn}"
1413
}
1514
%{~ endif ~}

variables.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ variable "profile" {
104104
variable "role_arn" {
105105
type = string
106106
default = ""
107-
description = "The role to be assumed"
107+
description = "The role to be assumed. If this is set, `terraform_version` variable must be `1.6.0` or higher."
108108
}
109109

110110
variable "terraform_backend_config_file_name" {

0 commit comments

Comments
 (0)