Terraform

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 1

Upgrade terraform init -upgrade

Multiple Provider – alias


Terraform apply write to terraform.tfstate. Cannot import any resource
Terraform refresh modifies the state file
terraform fmt rewrite a canonical format and style
Provisioners – action on the local or remote machine. Inside the resource block
TF_LOG=TRACE – Environment variable
TF_LOG_PATH – write log output
TR_VAR_name – Environment variables
Terraform import – import resources into the state. Does not generate configurations
Expression of a local value can refer to other values
Workspaces allow multiple state files of single configuration.
Root module – every terraform configuration has
Version constraints are supported only for modules installed from a module registry like Terraform
registry
Private registry - <hostname>/<namespace>/<name>/<provider>
Sentinel – embedded policy as a code framework
terraform graph – DOT format
Splat – get a list of all attributes [*]

Resource Type
Local name for the resources
Argument Name
Argument value

terraform force-unlock LOCK_ID [DIR] – manually unlock the state if unlocking failed
Infrastructure as Code Tools – Automation, Versioning and Reusability
terraform refresh – does not modify the infrastructure but it modifies the state file
Structure type – allows multiple values of several distinct types to be grouped together as a single value
– object, tuple
Backend configuration – migrate your state to a new backend
Terraform taint – destroy and recreate on the next apply
on_failure – change the fail behavior to either continue or fail
terraform apply varfile=”testing.tfvars”
depends_on – explicit dependency
terraform plan -destroy – preview the destroy command
DATA_SOURCE
The name of a variable can be any valid identifier except the following: source, version, providers, count, for_each, lifecycle, depends_on, locals.
Terraform console – debug

You might also like