Skip to content

Terraform module that allows to manage terraform module

Notifications You must be signed in to change notification settings

masterborn/terraform-aws-kms-tfstate-backend

Repository files navigation

template of terraform resource repository

Requirements

Name Version
terraform ~>1.3.0
aws ~>4.20.0

Providers

Name Version
aws ~>4.20.0

Resources

Name Type
aws_dynamodb_table.terraform-state-lock resource
aws_kms_alias.state resource
aws_kms_key.state resource
aws_s3_bucket.bucket resource
aws_s3_bucket_acl.acl resource
aws_s3_bucket_public_access_block.bucket-acl resource
aws_s3_bucket_server_side_encryption_configuration.state_encryption resource
aws_s3_bucket_versioning.state_versioning resource

Inputs

Name Description Type Default Required
bucket_name S3 state bucket name string n/a yes
dynamodb_table_name DynamoDB state lock table name string n/a yes
tags n/a map(string) {} no
default_tags n/a map(string)
{
"Module": "terraform-state"
}
no

Outputs

Name Description
state_bucket_name n/a
state_table_name n/a
state_table_arn n/a

Examples

Basic example

module "string_ssm_keys" {
  source              = "[email protected]:masterborn/terraform-kms-tfstate-backend.git?ref=v1.0.1"
  bucket_name         = "example-state-bucket"
  dynamodb_table_name = "example-state-lock"

  tags = {
    Env = "Org"
  }
}

Then in backend configuration:

    backend "s3" {
      region         = "us-east-1"
      bucket         = "example-state-bucket"
      key            = "path/to/file/terraform.tfstate"
      dynamodb_table = "example-state-lock"
      encrypt        = true
    }

Enabling pre-commit hooks

Following pre-commit hooks are provided:

Requirements

Installation

To install pre-commit check .

pre-commit install

About

Terraform module that allows to manage terraform module

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages