Name | Version |
---|---|
terraform | ~>1.3.0 |
aws | ~>4.20.0 |
Name | Version |
---|---|
aws | ~>4.20.0 |
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 |
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) |
{ |
no |
Name | Description |
---|---|
state_bucket_name | n/a |
state_table_name | n/a |
state_table_arn | n/a |
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
}
Following pre-commit hooks are provided:
- terraform-fmt to check syntax of terraform
- terraform-docs to recreate README.md according to terraform module properties
- end-of-file-fixer to ensure that each file ends with newline
To install pre-commit
check .
pre-commit install