terraform init -state code example
Example 1: terraform state
SYNTAX :
terraform state <subcommand> [options] [args]
terraform state list
terraform state list <resource name>
terraform state show 'resource name'
terraform state pull
terraform state push
terraform state rm 'packet_device.worker'
terraform state mv 'module.app' 'module.parent.module.app'
terraform state mv 'packet_device.worker' 'packet_device.helper'
Example 2: terraform init
terraform init -upgrade
terraform init -backend=false
terraform init -get=false
terraform init -get-plugins=false
terraform init -from-module=MODULE-SOURCE
On most operationg systems : ~/.terraform.d/plugins
on Windows : %APPDATA%\terraform.d\plugins