stackmate
  • Guides
    • Getting started
    • What is stackmate
    • Installation
    • Output files
  • Configuration
    • Configuration File
      • state
      • environments
      • provider
      • region
    • Application Services
    • Database services
    • Cache Services
    • Object storage
  • Commands
    • stackmate preview
    • stackmate deploy
    • stackmate destroy
  • How to
    • Use your own VPC on AWS
    • Handle SSL failures for AWS
  • Appendix
    • License
Powered by GitBook
On this page
  • Accepted values
  • Examples

Was this helpful?

  1. Configuration
  2. Configuration File

state

PreviousConfiguration FileNextenvironments

Last updated 1 year ago

Was this helpful?

You can deploy the state bucket and lock table by using .

The state configuration option, is an Object which defines where the 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's stackmate.tfstate and it should always end in .tfstate

  • provider - Optional - It should be set to aws. You don't have to specify this value if the root configuration option for provider is set to aws.

Examples

Storing your state on a private, encrypted AWS S3 bucket with state locking

...
state:
  bucket: my-awesome-project-state-bucket
  lockTable: stackmate-state-lock
  # 👇 this is optional, by default it will be set to eg. production/stackmate.tfstate
  statePath: my-cool-project.tfstate
Terraform State
these instructions