Created
June 23, 2020 03:40
-
-
Save ksummersill2/38387e418c5c3642b8ffe24f146470e8 to your computer and use it in GitHub Desktop.
Setups the S3 Backend Terraform State Management
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
# State Module | |
module "state" { | |
source = ".//modules/state" | |
} | |
# Configure Terraform to push production state to an S3 bucket. | |
terraform { | |
backend "s3" { | |
bucket = "<name of your bucket>" | |
key = "terraform.state" | |
dynamodb_table = "terraform-lock" | |
region = "us-east-1" | |
profile = "<your awscli profile for creds>" | |
# Make sure to update your shared_credentials_file to your location | |
shared_credentials_file = "~/.aws/credentials" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment