terraform-aws-remote-state-s3-dynamodb-backend
Terraform Module Registry
A terraform module to set up remote state management with S3 backend for your account. It creates an encrypted S3 bucket to store state files and a DynamoDB table for state locking and consistency checking.
Resources are defined following best practices as described in the official document and ozbillwang/terraform-best-practices .
It heritages a from our loved ❤️ Terraform AWS modules and leverage S3 and DynamoDB from this repos.
Create a S3 bucket to store remote state files.
Encrypt state files with KMS.
Enable object versioning to prevent accidental data loss.
Create a DynamoDB table for state locking, encryption is optional.
module "remote-state-s3-dynamodb-backend" {
source = " tigpt/remote-state-s3-dynamodb-backend/aws"
version = " 1.0.2"
name = " my-terraform-backend"
tags = {
terraform = " true"
}
}
Name
Version
terraform
>= 1.7.2
aws
>= 5.34
random
>= 3.6
Name
Description
Type
Required
name
Base name for your state storing resources (typicaly equal to account name)
string
yes
tags
A mapping of tags to assign to resources.
map(string)
no