This plugin will let BitOps to automatically deploy terraform
resources on any cloud provider. terraform
plugin uses session variables while connecting to any cloud provider.
terraform
plugin uses bitops.config.yaml
located in the operations repo when deploying resources using terraform scripts.
bitops.config.yaml
, minimum requiredterraform: {}
bitops.config.yaml
terraform:
cli:
var-file: my-vars.tfvars
targets:
- resource_identifier.foo
- resource_identifier.bar
backend-config:
- KEY1=foo
- KEY2=bar
stack-action: "plan"
options:
workspace: test
terraform
will always run terraform init
and terraform plan
on every execution.
Run BitOps with the environmental variable TERRAFORM_APPLY
set to true
or set stack-action
in the bitops.config.yaml
file to apply to run terraform apply
.
bitops.schema.yaml
var-file
--var-file
BITOPS_TF_VAR_FILE
""
false
targets
-target <target1> -target <target2> ...
Usage:
targets:
- resource.id1
- resource.id2
BITOPS_TF_TARGETS
""
false
A yaml list of terraform resources that will be created prior to the full stack creation.
backend-config
--KEY1=foo --KEY2=bar
""
false
stack-action
BITOPS_TERRAFORM_COMMAND
"plan"
false
apply
, destroy
, etc. skip-deploy
TERRAFORM_SKIP_DEPLOY
none
""
workspace
BITOPS_TERRAFORM_WORKSPACE
""
false
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. Set the value of the environental variable to true
to use
Will force call terraform apply
Will force call terraform destroy
Will add --upgrade
flag to the init command