Skip to content

Commit 5ea10b3

Browse files
authored
fix: s3 backend deprecated role_arn field (#151)
1 parent b8b7fb5 commit 5ea10b3

File tree

1 file changed

+11
-6
lines changed

1 file changed

+11
-6
lines changed

templates/terraform.tf.tpl

+11-6
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,19 @@ terraform {
22
required_version = ">= ${terraform_version}"
33
44
backend "s3" {
5-
region = "${region}"
6-
bucket = "${bucket}"
7-
key = "${terraform_state_file}"
8-
profile = "${profile}"
9-
role_arn = "${role_arn}"
10-
encrypt = "${encrypt}"
5+
region = "${region}"
6+
bucket = "${bucket}"
7+
key = "${terraform_state_file}"
8+
profile = "${profile}"
9+
encrypt = "${encrypt}"
10+
%{~ if role_arn != "" ~}
1111

12+
assume_role {
13+
role_arn = "${role_arn}"
14+
}
15+
%{~ endif ~}
1216
%{~ if dynamodb_table != "" ~}
17+
1318
dynamodb_table = "${dynamodb_table}"
1419
%{~ endif ~}
1520
}

0 commit comments

Comments
 (0)