Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
badra001 committed May 6, 2025
1 parent 5aaf039 commit ea20773
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions terraform-state/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ locals {
bucket_name = var.application_mode ? format("%v%v-%v-%v", lookup(local._prefixes, "s3", ""), var.name, local.account_id, local.region_short) : local.tfstate_bucket
kms_key_name = var.application_mode ? format("%v%v", lookup(local._prefixes, "kms", ""), var.name) : var.kms_tfstate_key
policy_name = var.application_mode ? format("%v%v", lookup(local._prefixes, "policy", ""), var.name) : format("%v%v", lookup(local._prefixes, "policy", ""), var.tfstate_bucket_prefix)
table_name = var.application_mode ? format("%v-%v", var.name, var.tfstate_table) : var.tfstate_table
}

base_tags = {
Expand Down Expand Up @@ -97,7 +98,8 @@ data "aws_kms_key" "kms_dynamodb" {
# dynamodb table
#---
resource "aws_dynamodb_table" "tfstate" {
name = var.tfstate_table
# name = var.tfstate_table
name = local.setings.table_name
hash_key = "LockID"
billing_mode = "PROVISIONED"
read_capacity = 1
Expand All @@ -116,7 +118,7 @@ resource "aws_dynamodb_table" "tfstate" {
var.tags,
local.base_tags,
lookup(var.component_tags, "ddb", {}),
tomap({ Name = var.tfstate_table }),
{ Name = local.settins.table_name },
)

lifecycle {
Expand Down

0 comments on commit ea20773

Please sign in to comment.