Skip to content
This repository has been archived by the owner on Oct 9, 2024. It is now read-only.

Latest commit

 

History

History

Terraform a new AWS S3 Bucket and Dynamo DB Table for Terraform State support

Based on the following Terraform example.

Assumes:

  • AWS credentials are passed as environment variables
    • See AWS_* arguments here

Local testing

Copy sample configuration

cp terraform.tfvars.sample terraform.tfvars

Edit terraform.tfvars

Amend the values for

  • alias
  • bucket_name

Specify environment variables

export AWS_ACCESS_KEY_ID="xxx"
export AWS_SECRET_ACCESS_KEY="xxx"
export AWS_DEFAULT_REGION="xxx"

Replace occurrences of xxx above with appropriate values

Create Terraform state support

./create-tfstate-support.sh

Teardown Terraform state support

./destroy-tfstate-support.sh

Github Action

This action is workflow dispatched with inputs.

See setup-aws-provided-remote-backend-dispatch.yml