Skip to content

chrburmeister/terraform

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

Terraform Deployment

This terraform chart highlights the structure I like to use for my deployments.

You can read more about it in my blog post here.

Contact

If you have any suggestions or question, just create an issue or reach out on Twitter @chrburmeister.

Use the Deployment (locally)

  1. clone the repo
  2. fill out empty variables in the env_dev.tfvars file
  3. create two files:

env_dev_backend.sec.tfvars

storage_account_name = ""
resource_group_name  = ""
container_name       = "terraform"
key                  = ""
access_key           = ""

key is the name of the state-file within the backend - for instance: env_dev.tfstate

env_dev.sec.tfvars

client_id     = ""
client_secret = ""
# deploy
terraform init -reconfigure -input=false -upgrade -backend-config .\env_dev_backend.sec.tfvars

terraform plan -var-file=".\env_dev.tfvars" -var-file=".\env_dev.sec.tfvars" -input=false -out="tfplan"

terraform apply "tfplan"

# destroy
terraform init -reconfigure -input=false -upgrade -backend-config .\env_dev_backend.sec.tfvars

terraform plan -destroy -var-file=".\env_dev.tfvars" -var-file=".\env_dev.sec.tfvars" -input=false -out="tfplan"

terraform apply "tfplan"

About

Terraform Deployment Structure

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages