diff --git a/main.tf b/main.tf index 7f86611..bf9bab2 100644 --- a/main.tf +++ b/main.tf @@ -60,7 +60,6 @@ data "aws_iam_policy_document" "aggregated_policy" { override_policy_documents = var.source_policy_documents } - data "aws_iam_policy_document" "bucket_policy" { count = local.enabled ? 1 : 0 diff --git a/templates/terraform.tf.tpl b/templates/terraform.tf.tpl index ee0e8fd..f313404 100644 --- a/templates/terraform.tf.tpl +++ b/templates/terraform.tf.tpl @@ -2,14 +2,15 @@ terraform { required_version = ">= ${terraform_version}" backend "s3" { - region = "${region}" - bucket = "${bucket}" - key = "${terraform_state_file}" + region = "${region}" + bucket = "${bucket}" + key = "${terraform_state_file}" + profile = "${profile}" + role_arn = "${role_arn}" + encrypt = "${encrypt}" + %{~ if dynamodb_table != "" ~} dynamodb_table = "${dynamodb_table}" %{~ endif ~} - profile = "${profile}" - role_arn = "${role_arn}" - encrypt = "${encrypt}" } }