Skip to content

Commit 5bd566f

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 e6155bb commit 5bd566f

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

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)