Skip to content

Commit e99b0f0

Browse files
authored
chore: tg changes (#127)
1 parent ac83a8a commit e99b0f0

File tree

3 files changed

+4
-6
lines changed

3 files changed

+4
-6
lines changed

terraform/api/terragrunt.hcl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@ locals {
1515
app_env = get_env("app_env")
1616
statefile_bucket_name = "${local.tf_remote_state_prefix}-${local.aws_license_plate}-${local.target_env}"
1717
statefile_key = "${local.stack_prefix}/${local.app_env}/api/terraform.tfstate"
18-
statelock_table_name = "${local.tf_remote_state_prefix}-lock-${local.aws_license_plate}"
1918
flyway_image = get_env("flyway_image")
2019
api_image = get_env("api_image")
2120
rds_app_env = (contains(["dev", "test", "prod"], "${local.app_env}") ? "${local.app_env}" : "dev") # if app_env is not dev, test, or prod, default to dev
21+
repo_name = get_env("repo_name")
2222

2323
}
2424

@@ -32,7 +32,7 @@ terraform {
3232
bucket = "${local.statefile_bucket_name}"
3333
key = "${local.statefile_key}" # Path and name of the state file within the bucket
3434
region = "${local.region}" # AWS region where the bucket is located
35-
dynamodb_table = "${local.statelock_table_name}"
35+
use_lockfile = true # Enable native S3 locking
3636
encrypt = true
3737
}
3838
}

terraform/database/terragrunt.hcl

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ locals {
1414
app_env = get_env("app_env") # this is the environment for the app, like PR, dev, test, since same AWS dev can be reused for both dev and test
1515
statefile_bucket_name = "${local.tf_remote_state_prefix}-${local.aws_license_plate}-${local.target_env}"
1616
statefile_key = "${local.stack_prefix}/${local.app_env}/database/aurora-v2/terraform.tfstate"
17-
statelock_table_name = "${local.tf_remote_state_prefix}-lock-${local.aws_license_plate}"
1817
rds_app_env = (contains(["dev", "test", "prod"], "${local.app_env}") ? "${local.app_env}" : "dev") # if app_env is not dev, test, or prod, default to dev
1918
}
2019

@@ -28,7 +27,7 @@ terraform {
2827
bucket = "${local.statefile_bucket_name}"
2928
key = "${local.statefile_key}" # Path and name of the state file within the bucket
3029
region = "${local.region}" # AWS region where the bucket is located
31-
dynamodb_table = "${local.statelock_table_name}"
30+
use_lockfile = true # Enable native S3 locking
3231
encrypt = true
3332
}
3433
}

terraform/frontend/terragrunt.hcl

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ locals {
1414
aws_license_plate = get_env("aws_license_plate")
1515
statefile_bucket_name = "${local.tf_remote_state_prefix}-${local.aws_license_plate}-${local.target_env}"
1616
statefile_key = "${local.stack_prefix}/${local.app_env}/frontend/terraform.tfstate"
17-
statelock_table_name = "${local.tf_remote_state_prefix}-lock-${local.aws_license_plate}"
1817
}
1918

2019
# Remote S3 state for Terraform.
@@ -27,7 +26,7 @@ terraform {
2726
bucket = "${local.statefile_bucket_name}"
2827
key = "${local.statefile_key}" # Path and name of the state file within the bucket
2928
region = "${local.region}" # AWS region where the bucket is located
30-
dynamodb_table = "${local.statelock_table_name}"
29+
use_lockfile = true # Enable native S3 locking
3130
encrypt = true
3231
}
3332
}

0 commit comments

Comments
 (0)