-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
update to account for empty keys and for using native locking
- Loading branch information
Showing
3 changed files
with
14 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,14 +1,21 @@ | ||
| # version: 1.0.0 | ||
| # version: 1.1.0 | ||
|
|
||
| #--- | ||
| # {{ data.account_alias }}: {{ data.directory }} | ||
| #--- | ||
| {% set s3key = [ data.account_alias,data.directory,"terraform.tfstate"] | join("/") %} | ||
|
|
||
| terraform { | ||
| backend "s3" { | ||
| profile = "{{ data.profile }}" | ||
| bucket = "{{ data.bucket }}" | ||
| key = "{{ data.account_alias }}/{{ data.directory }}/terraform.tfstate" | ||
| key = "{{ s3key }}" | ||
| region = "{{ data.bucket_region }}" | ||
| dynamodb_table = "tf_remote_state" | ||
| {% if data.use_lockfile is defined and not data.use_lockfile %} | ||
| dynamodb_table = "{{ data.table_name | default('tf_remote_state') }}" | ||
| {% endif %} | ||
| {% if data.use_lockfile is defined %} | ||
| use_lockfile = {{ data.use_lockfile | default('false') | lower }} | ||
| {% endif %} | ||
| } | ||
| } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters