Skip to content

Commit 691a56f

Browse files
Update terraform backend to address differing namespace and target env
1 parent 07de36c commit 691a56f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

terraform/terragrunt.hcl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ generate "remote_state" {
99
contents = <<EOF
1010
terraform {
1111
backend "s3" {
12-
bucket = "terraform-remote-state-${get_env("TFC_PROJECT")}-${get_env("TARGET_ENV")}" # Replace with either generated or custom bucket name
13-
key = "terraform.${get_env("TFC_PROJECT")}-${get_env("TARGET_ENV")}-state" # Path and name of the state file within the bucket
12+
bucket = "terraform-remote-state-${get_env("TFC_PROJECT")}-${get_env("NAMESPACE_ENV")}" # Replace with either generated or custom bucket name
13+
key = "terraform.${get_env("TFC_PROJECT")}-${get_env("NAMESPACE_ENV")}-state" # Path and name of the state file within the bucket
1414
region = "ca-central-1" # AWS region where the bucket is located
1515
dynamodb_table = "terraform-remote-state-lock-${get_env("TFC_PROJECT")}" # Replace with either generated or custom DynamoDB table name
1616
encrypt = true # Enable encryption for the state file

0 commit comments

Comments
 (0)