Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions terraform/api/terragrunt.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ locals {
app_env = get_env("app_env")
statefile_bucket_name = "${local.tf_remote_state_prefix}-${local.aws_license_plate}-${local.target_env}"
statefile_key = "${local.stack_prefix}/${local.app_env}/api/terraform.tfstate"
statelock_table_name = "${local.tf_remote_state_prefix}-lock-${local.aws_license_plate}"
flyway_image = get_env("flyway_image")
api_image = get_env("api_image")
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
repo_name = get_env("repo_name")

}

Expand All @@ -32,7 +32,7 @@ terraform {
bucket = "${local.statefile_bucket_name}"
key = "${local.statefile_key}" # Path and name of the state file within the bucket
region = "${local.region}" # AWS region where the bucket is located
dynamodb_table = "${local.statelock_table_name}"
use_lockfile = true # Enable native S3 locking
encrypt = true
}
}
Expand Down
3 changes: 1 addition & 2 deletions terraform/database/terragrunt.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ locals {
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
statefile_bucket_name = "${local.tf_remote_state_prefix}-${local.aws_license_plate}-${local.target_env}"
statefile_key = "${local.stack_prefix}/${local.app_env}/database/aurora-v2/terraform.tfstate"
statelock_table_name = "${local.tf_remote_state_prefix}-lock-${local.aws_license_plate}"
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
}

Expand All @@ -28,7 +27,7 @@ terraform {
bucket = "${local.statefile_bucket_name}"
key = "${local.statefile_key}" # Path and name of the state file within the bucket
region = "${local.region}" # AWS region where the bucket is located
dynamodb_table = "${local.statelock_table_name}"
use_lockfile = true # Enable native S3 locking
encrypt = true
}
}
Expand Down
3 changes: 1 addition & 2 deletions terraform/frontend/terragrunt.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ locals {
aws_license_plate = get_env("aws_license_plate")
statefile_bucket_name = "${local.tf_remote_state_prefix}-${local.aws_license_plate}-${local.target_env}"
statefile_key = "${local.stack_prefix}/${local.app_env}/frontend/terraform.tfstate"
statelock_table_name = "${local.tf_remote_state_prefix}-lock-${local.aws_license_plate}"
}

# Remote S3 state for Terraform.
Expand All @@ -27,7 +26,7 @@ terraform {
bucket = "${local.statefile_bucket_name}"
key = "${local.statefile_key}" # Path and name of the state file within the bucket
region = "${local.region}" # AWS region where the bucket is located
dynamodb_table = "${local.statelock_table_name}"
use_lockfile = true # Enable native S3 locking
encrypt = true
}
}
Expand Down
Loading