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

Latest commit

 

History

History

terraform-s3-state-bucket

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 

AWS S3 Bucket for Terraform Backend State Files

Based on this blog post

Details

This plan will create:

  • A KMS Key to encrypt and decrypt S3 objects with an attached policy

  • An alias for the KMS key

  • An S3 bucket for storing Terraform state files

  • A policy to block public access to the S3 bucket

Credentials

Credentials should be stored in the user\.aws\credential file.

Example:

Credentials

Credentials should be stored in the user\.aws\credential file using Secrets stored in this repository.

Example:

mkdir -p ~/.aws
echo "[default]" > ~/.aws/credentials
echo "aws_access_key_id = ${{ secrets.AWS_ACCESS_KEY_ID }}" >> ~/.aws/credentials
echo "aws_secret_access_key = ${{ secrets.AWS_SECRET_ACCESS_KEY }}" >> ~/.aws/credentials