S3

S3 beckend

s3

Terraform generates key names that include the values of the bucket and key variables. This backend also supports state locking and consistency checking via Dynamo DB, which can be enabled by setting the dynamodb_table field to an existing DynamoDB table name.

terraform {
  required_version = ">= 1.0.0"

  backend "s3" {
    bucket         = s3.bucket
    key            = s3.key
    region         = "ap-northeast-2"
    encrypt        = true
    dynamodb_table = "terraform-lock"
  }
}

tip: there

Note: