Skip to content

Terraform Deployment

terraform folder

Usually terraform files are grouped into a subfolder in a repository. This example repo has a subfolder named "terraform" where you need to execute the following commands from.

  • If this is the first time running terraform then it must be initialized first. The following command only needs to be run once.
terraform init
  • Deploy the infra$tructure
terraform apply
  • Optionally, avoid additional prompts.
terraform apply -auto-approve
  • Show sensitive values such as passwords
terraform output --json
  • Destroy the infra$tructure
    terraform destroy