Created
March 29, 2020 16:18
-
-
Save soerenmartius/9baf1aad3b26fdf9fdd78900d244973f to your computer and use it in GitHub Desktop.
Terraform with S3 Remote State and DynamoDB State Locks
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# --------------------------------------------------------------------------------------------------------------------- | |
# SET TERRAFORM AND PROVIDER REQUIREMENTS | |
# --------------------------------------------------------------------------------------------------------------------- | |
terraform { | |
required_version = "~> 0.12.24" | |
backend "s3" { | |
bucket = "github-terraform-example-terraform-state" | |
key = "organization/github-terraform-example/terraform.tfstate" | |
region = "us-east-1" | |
encrypt = true | |
dynamodb_table = "terraform-state-lock" | |
} | |
required_providers { | |
github = "~> 2.4" | |
} | |
} | |
provider "github" { | |
organization = "github-terraform-example" | |
} | |
provider "aws" { | |
region = "us-east-1" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment