= Cloud/Terraform = * Links [[Cloud/Terragrunt]] , [[https://acloudguru.com/blog/engineering/the-ultimate-terraform-cheatsheet]] * Training: Hashicorp [[https://play.instruqt.com/public]] * [[https://blog.gruntwork.io/how-to-manage-terraform-state-28f5697e68fa]] == Terraform Cloud == * On local machine can debug with remotestate.tf file. * remotestate.tf {{{ terraform { backend "remote" { hostname = "app.terraform.io" organization = "MyOrg" workspaces { name = "" } } } }}} == tfwsitch Terraform switch == * 2020- Install/switch with https://github.com/warrensbox/terraform-switcher/releases * Download the linux_64 bit tgz * sudo chown pieter /usr/local/bin * unzip and copy to /usr/local/bin tfswitch_202012_v0.9.934 * tar -xvvzf terraform-switcher_0.9.934_linux_amd64.tar.gz * cp tfswitch /usr/local/bin/tfswitch_202012_v0.9.934 * run tfswitch and select terraform version == Graph Terragrunt/Terraform == * terragrunt/terraform graph * get dot tool {{{ apt install graphviz }}} * {{{ terragrunt graph | tee /dev/tty | dot -Tsvg -o graph-$(date -I) }}} ---- CategoryTerraform