Skip to content

Commit 9058aa1

Browse files
authored
fix: Better TF formating when dynamodb_table is empty when creating backend template file (#149)
1 parent ac43e7b commit 9058aa1

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

main.tf

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,6 @@ data "aws_iam_policy_document" "aggregated_policy" {
6060
override_policy_documents = var.source_policy_documents
6161
}
6262

63-
6463
data "aws_iam_policy_document" "bucket_policy" {
6564
count = local.enabled ? 1 : 0
6665

templates/terraform.tf.tpl

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,15 @@ terraform {
22
required_version = ">= ${terraform_version}"
33
44
backend "s3" {
5-
region = "${region}"
6-
bucket = "${bucket}"
7-
key = "${terraform_state_file}"
5+
region = "${region}"
6+
bucket = "${bucket}"
7+
key = "${terraform_state_file}"
8+
profile = "${profile}"
9+
role_arn = "${role_arn}"
10+
encrypt = "${encrypt}"
11+
812
%{~ if dynamodb_table != "" ~}
913
dynamodb_table = "${dynamodb_table}"
1014
%{~ endif ~}
11-
profile = "${profile}"
12-
role_arn = "${role_arn}"
13-
encrypt = "${encrypt}"
1415
}
1516
}

0 commit comments

Comments
 (0)