Skip to content

Latest commit

 

History

History

05-state

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

Module 8 - State Management

Terraform state file documentation

Bootstrapping the remote backend

$ cd bootstrap
$ terraform init
$ terraform plan
$ terraform apply

Examine local state file

Look in bootstrap/.terraform

Update variables to point to new storage

  1. Update setenv script to set ARM_ACCESS_KEY environment variable
  2. Update storage_account_name and container_name in main.tf

Using remote backend

$ cd ..
$ source ../resources/setenv.sh
$ terraform init -backend-config="dev.tfvars"
$ terraform plan -var-file="dev.tfvars"
$ terraform apply -var-file="dev.tfvars"

Examine remote state file

Look in Azure storage container