state
You can deploy the state bucket and lock table by using these instructions.
The state
configuration option, is an Object
which defines where the Terraform State should be stored after each deployment.
Accepted values
AWS S3 Bucket
For storing the state on an AWS S3 bucket, you need to specify an object containing the following attributes:
bucket
- The name for the bucket to use. It should comply with the guidelines that AWS provides for naming a bucket.lockTable
- The DynamoDB table to use for state locking. If you don't want to use state locking, feel free to leave this option out.statePath
- Optional - The name of the Terraform state file to use. By default it'sstackmate.tfstate
and it should always end in.tfstate
provider
- Optional - It should be set toaws
. You don't have to specify this value if the root configuration option forprovider
is set toaws
.
Examples
Storing your state on a private, encrypted AWS S3 bucket with state locking
Last updated