Skip to content

Commit

Permalink
feat(vars): allow backend config files
Browse files Browse the repository at this point in the history
  • Loading branch information
xanmanning committed Aug 26, 2021
1 parent 68a801c commit 692b331
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 0 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@ project that cannot be updated).
lock: true # Optional, state file locking if supported.
lock_timeout: 300 # Optional, how long to lock if supported.
force_init: true # Optional
backend_config_files: # Optional, list of files containing backend config
- config.hcl
backend_config: # Optional, key-values to provide at init stage.
region: "eu-west-1"
bucket: "some-bucket"
Expand Down
2 changes: 2 additions & 0 deletions defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ terraform_exec_projects: []
# region: "eu-west-1"
# bucket: "some-bucket"
# key: "random.tfstate"
# backend_config_files:
# - path/to/file # Optional, path to backend config file
# targets: # Optional, list of specific resources to plan/apply to.
# some_target
# variables_file: dev.tfvars # Optional, path to variables file.
Expand Down
1 change: 1 addition & 0 deletions tasks/terraform-plan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
lock_timeout: "{{ proj.lock_timeout | default(omit) }}"
force_init: "{{ proj.force_init | default(true) }}"
backend_config: "{{ proj.backend_config | default(omit) }}"
backend_config_files: "{{ proj.backend_config_files | default(omit) }}"
targets: "{{ proj.targets | default(omit) }}"
variables_file: "{{ proj.variables_file | default(omit) }}"
variables: "{{ proj.variables | default(omit) }}"
Expand Down

0 comments on commit 692b331

Please sign in to comment.