Skip to content

A terraform module to set up remote state management with S3 backend for your account.

License

Notifications You must be signed in to change notification settings

tigpt/terraform-aws-remote-state-s3-dynamodb-backend

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

terraform-aws-remote-state-s3-dynamodb-backend

Releases

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.

Features

  • 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.

Usage

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"
  }
}

Compatibility

Requirements

Name Version
terraform >= 1.7.2
aws >= 5.34
random >= 3.6

Inputs

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

Outputs

Name Description
tf_state_dynamodb_name The name of DynamoDB table to manage lock states.
tf_state_dynamodb_arn The arn of DynamoDB table to manage lock states.
tf_state_s3_bucket_arn The name of S3 bucket to store the remote state file.
tf_state_s3_bucket_arn The arn of S3 bucket to store the remote state file.

About

A terraform module to set up remote state management with S3 backend for your account.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages