File tree Expand file tree Collapse file tree 4 files changed +1
-16
lines changed Expand file tree Collapse file tree 4 files changed +1
-16
lines changed Original file line number Diff line number Diff line change @@ -217,7 +217,6 @@ Available targets:
217217| additional\_ tag\_ map | Additional tags for appending to each tag map | ` map(string) ` | ` {} ` | no |
218218| arn\_ format | ARN format to be used. May be changed to support deployment in GovCloud/China regions. | ` string ` | ` "arn:aws" ` | no |
219219| attributes | Additional attributes (e.g. ` state ` ) | ` list(string) ` | <pre >[ <br > "state"<br >] </pre > | no |
220- | backend\_ config\_ file\_ overwrite\_ enabled | If false, the backend config file will not be overwritten if it exists. | ` bool ` | ` true ` | no |
221220| billing\_ mode | DynamoDB billing mode | ` string ` | ` "PROVISIONED" ` | no |
222221| block\_ public\_ acls | Whether Amazon S3 should block public ACLs for this bucket | ` bool ` | ` true ` | no |
223222| block\_ public\_ policy | Whether Amazon S3 should block public bucket policies for this bucket | ` bool ` | ` true ` | no |
Original file line number Diff line number Diff line change 2424| additional\_ tag\_ map | Additional tags for appending to each tag map | ` map(string) ` | ` {} ` | no |
2525| arn\_ format | ARN format to be used. May be changed to support deployment in GovCloud/China regions. | ` string ` | ` "arn:aws" ` | no |
2626| attributes | Additional attributes (e.g. ` state ` ) | ` list(string) ` | <pre >[ <br > "state"<br >] </pre > | no |
27- | backend\_ config\_ file\_ overwrite\_ enabled | If false, the backend config file will not be overwritten if it exists. | ` bool ` | ` true ` | no |
2827| billing\_ mode | DynamoDB billing mode | ` string ` | ` "PROVISIONED" ` | no |
2928| block\_ public\_ acls | Whether Amazon S3 should block public ACLs for this bucket | ` bool ` | ` true ` | no |
3029| block\_ public\_ policy | Whether Amazon S3 should block public bucket policies for this bucket | ` bool ` | ` true ` | no |
Original file line number Diff line number Diff line change @@ -14,10 +14,6 @@ locals {
1414
1515 terraform_backend_config_template_file = var. terraform_backend_config_template_file != " " ? var. terraform_backend_config_template_file : " ${ path . module } /templates/terraform.tf.tpl"
1616
17- terraform_backend_config_file_exists = fileexists (local. terraform_backend_config_file )
18-
19- overwrite_backend_config_file = (! local. terraform_backend_config_file_exists || var. backend_config_file_overwrite_enabled ) && var. terraform_backend_config_file_path != " "
20-
2117 bucket_name = var. s3_bucket_name != " " ? var. s3_bucket_name : module. s3_bucket_label . id
2218}
2319
@@ -250,11 +246,8 @@ data "template_file" "terraform_backend_config" {
250246 }
251247}
252248
253- # We only write the backend config file if:
254- # 1. The file doesn't exist and the module was given `terraform_backend_config_file_path`
255- # 2. The file does exist, `backend_config_file_overwrite_enabled` is `true`, and the module was given `terraform_backend_config_file_path`
256249resource "local_file" "terraform_backend_config" {
257- count = local . overwrite_backend_config_file ? 1 : 0
250+ count = var . terraform_backend_config_file_path != " " ? 1 : 0
258251 content = data. template_file . terraform_backend_config . rendered
259252 filename = local. terraform_backend_config_file
260253}
Original file line number Diff line number Diff line change @@ -221,12 +221,6 @@ variable "terraform_state_file" {
221221 description = " The path to the state file inside the bucket"
222222}
223223
224- variable "backend_config_file_overwrite_enabled" {
225- type = bool
226- default = true
227- description = " If false, the backend config file will not be overwritten if it exists."
228- }
229-
230224variable "s3_bucket_name" {
231225 type = string
232226 default = " "
You can’t perform that action at this time.
0 commit comments