| Parameter |
Choices/Defaults |
Comments |
|
backend_config
dictionary
|
|
A group of key-values to provide at init stage to the -backend-config parameter.
|
|
backend_config_files
list
/ elements=path
added in 0.2.0 of community.general
|
|
The path to a configuration file to provide at init state to the -backend-config parameter. This can accept a list of paths to multiple configuration files.
|
|
binary_path
path
|
|
The path of a terraform binary to use, relative to the 'service_path' unless you supply an absolute path.
|
|
force_init
boolean
|
|
To avoid duplicating infra, if a state file can't be found this will force a `terraform init`. Generally, this should be turned off unless you intend to provision an entirely new Terraform deployment.
|
|
init_reconfigure
boolean
added in 1.3.0 of community.general
|
|
Forces backend reconfiguration during init.
|
|
lock
boolean
|
|
Enable statefile locking, if you use a service that accepts locks (such as S3+DynamoDB) to store your statefile.
|
|
lock_timeout
integer
|
|
How long to maintain the lock on the statefile, if you use a service that accepts locks (such as S3+DynamoDB).
|
|
plan_file
path
|
|
The path to an existing Terraform plan file to apply. If this is not specified, Ansible will build a new TF plan and execute it. Note that this option is required if 'state' has the 'planned' value.
|
|
project_path
path
/ required
|
|
The path to the root of the Terraform directory with the vars.tf/main.tf/etc to use.
|
|
purge_workspace
boolean
|
|
Only works with state = absent
If true, the workspace will be deleted after the "terraform destroy" action.
The 'default' workspace will not be deleted.
|
|
state
string
|
Choices:
- planned
present ←
- absent
|
Goal state of given stage/project
|
|
state_file
path
|
|
The path to an existing Terraform state file to use when building plan. If this is not specified, the default `terraform.tfstate` will be used.
This option is ignored when plan is specified.
|
|
targets
list
/ elements=string
|
|
A list of specific resources to target in this plan/application. The resources selected here will also auto-include any dependencies.
|
|
variables
dictionary
|
|
A group of key-values to override template variables or those in variables files.
|
|
variables_files
list
/ elements=path
|
|
The path to a variables file for Terraform to fill into the TF configurations. This can accept a list of paths to multiple variables files.
Up until Ansible 2.9, this option was usable as variables_file.
aliases: variables_file
|
|
workspace
string
|
Default:
"default"
|
The terraform workspace to work with.
|