tfstate-backend

binbashar/tfstate-backend/aws

Terraform Module HCL AWS
Install
module "tfstate-backend" {
source = "binbashar/tfstate-backend/aws"
version = "1.0.29"
}
plain text: /constructs/tfmod-binbashar-tfstate-backend-aws/install.txt
⭐ Source on GitHub 📦 Registry page
README

Terraform Module: Terraform Backend Overview Terraform module to provision an S3 bucket to store terraform.tfstate file and a DynamoDB table to lock the state file to prevent concurrent modifications and state corruption. AWS Org implementation example We have a tfstate S3 Bucket per account Releases - Versions: = 1.x.y (Terraform 0.12.x compatible) - eg: https://registry.terraform.io/modules/binbashar/tfstate-backend/aws/1.0.0 Requirements | Name | Version | |------|---------| | terraform | >= 1.1.9 | | aws | ~> 5.0 | Providers | Name | Version | |------|---------| | aws | 5.21.0 | | aws.primary | 5.21.0 | | aws.secondary | 5.21.0 | | local | 2.4.0 | | time | 0.9.1 | Modules No modules. Resources | Name | Type | |------|------| | aws_cloudwatch_metric_alarm.dynamodb_capacity | resource |

Inputs (50)
NameTypeDescriptionDefault
block_public_policyboolWhether Amazon S3 should block public bucket policies for this bucket.true
namespacestringNamespace, which could be your organization name or abbreviation, e.g. 'eg' or '""
kms_key_rotationboolSpecifies whether key rotation is enabledtrue
mfa_deleteboolA boolean that indicates that versions of S3 objects can only be deleted with MFfalse
mfa_secretstringThe numbers displayed on the MFA device when applying. Necessary when mfa_delete""
regex_replace_charsstringRegex to replace chars with empty string in `namespace`, `environment`, `stage` "/[^a-zA-Z0-9-]/"
bucket_lifecycle_transition_glaciernumberNumber of days after which to move the data to the GLACIER storage class60
backend_config_filepathstringDirectory where the backend configuration file should be generated.""
namestringSolution name, e.g. 'app' or 'jenkins'"terraform"
ignore_public_aclsboolWhether Amazon S3 should ignore public ACLs for this bucket.true
notifications_eventslist(string)List of events to enable notifications for[ "s3:ObjectCreated:*", "s3:ObjectRe
bucket_lifecycle_transition_standard_ianumberNumber of days after which to move the data to the STANDARD_IA storage class30
backend_config_template_filestringPath to the template file to use when generating the backend configuration.""
backend_config_filenamestringName of the backend configuration file to generate."backend.tf"
environmentstringEnvironment, e.g. 'prod', 'staging', 'dev', 'pre-prod', 'UAT'""
stagestringStage, e.g. 'prod', 'staging', 'dev', OR 'source', 'build', 'test', 'deploy', 'r""
delimiterstringDelimiter to be used between `namespace`, `environment`, `stage`, `name` and `at"-"
contextmap(string)Default context to use for passing state between label invocations{}
write_capacitynumberDynamoDB write capacity units5
force_destroyboolA boolean that indicates the S3 bucket can be destroyed even if it contains objefalse
… and 10 more inputs
Outputs (6)
dynamodb_table_arn — DynamoDB table ARN
s3_bucket_domain_name — S3 bucket domain name
s3_bucket_id — S3 bucket ID
s3_bucket_arn — S3 bucket ARN
dynamodb_table_name — DynamoDB table name
dynamodb_table_id — DynamoDB table ID
Resources (20)
aws_cloudwatch_metric_alarmaws_dynamodb_tableaws_iam_policyaws_iam_policy_attachmentaws_iam_roleaws_kms_keyaws_kms_key_policyaws_kms_replica_keyaws_s3_bucketaws_s3_bucket_lifecycle_configurationaws_s3_bucket_notificationaws_s3_bucket_policyaws_s3_bucket_public_access_blockaws_s3_bucket_replication_configurationaws_s3_bucket_server_side_encryption_configurationaws_s3_bucket_versioningaws_sns_topicaws_sqs_queuelocal_filetime_sleep
Details
FrameworkTerraform Module
LanguageHCL
Version1.0.29
Cloud AWS
★ Stars5
Forks5
Total downloads8.2k
Inputs50
Outputs6
Resources20
Examples4
LicenseMIT
Namespacebinbashar
Updated