Terraform
Provider used:
- Digital Ocean
- GCP
Basic commands |
alias t=terraform
t init
t fmt
t validate
t plan
t apply |
Debug command |
TF_LOG=ERROR terraform init |
Recursive format |
terraform fmt -recursive |
Show format diff |
terrafrom fmt --diff |
Automatic provider update |
~> will update 0.0.X X into latest or 0.Y Y to latest |
auto-approve |
terrafrom --auto-approve |
Prettify terraform state |
terrafrom show -json | jq |
Show resource state list |
terraform state list |
Terraform command playgound |
terraform console
docker_container.nodered_container.name |
Show terraform output |
terraform output # if they were defined |
Run terraform with environmental variable |
export TF_VAR_some_variable=123 |