Skip to content

launching s3 buckets and locking the terraform state on a remote backend(dynamo db)

Notifications You must be signed in to change notification settings

vishesh-hue/terraform-project

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 

Repository files navigation

S3 backend for Terraform

Copied verbatim from https://github.com/ozbillwang/terraform-best-practices

Create a s3 bucket and dynamodb table to use as a remote backend

  • dynamodb_table_name = terraform-lock
  • s3_bucket_name = <account_id>-terraform-states

usage

# make sure you are on the right aws account
pip install awscli
aws s3 ls

# If you don't set default region in your aws configuration, and you want to create the resources in region "us-east-1"
export AWS_DEFAULT_REGION=us-east-1
export AWS_REGION=us-east-1

# Dry-run
terraform init
terraform plan

# apply the change
terraform apply

About

launching s3 buckets and locking the terraform state on a remote backend(dynamo db)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages