Terraform
Backends Commands
Cloud backend configuration
5 commands
Commands
Configure S3 backend
$ terraform init -backend-config="bucket=mybucket"
Initialize with S3 backend bucket configuration.
Migrate state to backend
$ terraform init -migrate-state
Migrate existing state to newly configured backend.
Reconfigure backend
$ terraform init -reconfigure
Reconfigure backend, ignoring existing configuration.
Push state manually
$ terraform state push terraform.tfstate
Manually upload local state file to remote backend.
Pull remote state
$ terraform state pull > terraform.tfstate
Download remote state to local file.