NisargIO / terraform-workspaces

Terraform workspaces example

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Terrafrom workspaces example for AWS S3

Terraform commands required to run this project

#initialize env specific workspace , pass appropriate backend file as argument. 
terraform init -backend-config=backends/prod-env.tf

#create new workspace ( from command line)
terraform workspace new "dev"
 
#change to an existing workspace
terraform workspace select "dev"
 
#then run terraform init, plan & apply as you would normally do in any terraform project
terraform plan 
terraform apply

Refe to this article for indepth explanation of workspaces and this repo in perticular. http://i-cloudconsulting.com/terraform-workspaces/

About

Terraform workspaces example


Languages

Language:HCL 100.0%