Terraform will always run terraform init
and terraform plan
on every execution.
terraform:
cli:
var-file: my-vars.tfvars
target: terraform.module.resource
backend-config:
- KEY1=foo
- KEY2=bar
options:
command: apply
version: "0.13.2"
workspace: test
- BitOps Property:
var-file
- CLI Argument:
--var-file
- Environment Variable:
TF_VAR_FILE
- default:
""
- BitOps Property:
target
- CLI Argument:
--target
- Environment Variable:
TF_TARGET
- default:
""
- BitOps Property:
backend-config
- CLI Argument:
--KEY1=foo --KEY2=bar
- Environment Variable: ``
- default:
""
- BitOps Property:
version
- Environment Variable:
TERRAFORM_VERSION
- default:
"0.12.29"
Allows customziation of which version of terraform to run
- BitOps Property:
command
- Environment Variable:
TERRAFORM_COMMAND
- default:
"plan"
Controls what terraform command to run. e.g. apply
, destroy
, etc.
- BitOps Property:
workspace
- Environment Variable:
TERRAFORM_WORKSPACE
- default:
""
Will select a terraform workspace using terraform workspace new $TERRAFORM_WORKSPACE || terraform workspace select $TERRAFORM_WORKSPACE
prior to running other terraform commands.
Although not captured in bitops.config.yml
, the following environment variables can be set to further customize behaviour
Will skill all terraform executions. This superseeds all other configuration
Will force call terraform apply
Will force call terraform destroy
Will add --upgrade
flag to the init command