Skip to content

Commit

Permalink
app: Update template-infra:app to version 0.15.3.post2.dev0+8d7ab07
Browse files Browse the repository at this point in the history
  • Loading branch information
nava-platform-bot committed Feb 22, 2025
1 parent bba7622 commit 6e657d2
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 15 deletions.
2 changes: 1 addition & 1 deletion .template-infra/app-app.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Changes here will be overwritten by Copier
_commit: v0.15.3-1-gc805160
_commit: v0.15.3-2-g8d7ab07
_src_path: https://github.com/navapbc/template-infra
app_has_dev_env_setup: true
app_local_port: 3000
Expand Down
4 changes: 2 additions & 2 deletions infra/app/service/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -101,9 +101,9 @@ module "service" {
)

secrets = concat(
[for secret_name in keys(local.service_config.secrets) : {
[for secret_name, secret_arn in module.secrets.secret_arns : {
name = secret_name
valueFrom = module.secrets[secret_name].secret_arn
valueFrom = secret_arn
}],
local.feature_flags_secrets,
module.app_config.enable_identity_provider ? [{
Expand Down
29 changes: 17 additions & 12 deletions infra/app/service/secrets.tf
Original file line number Diff line number Diff line change
@@ -1,16 +1,21 @@
module "secrets" {
for_each = local.service_config.secrets
source = "../../modules/secrets"

source = "../../modules/secret"
service_name = local.service_name
secrets = {
for name, config in local.service_config.secrets :
name => {
manage_method = config.manage_method

# When generating secrets and storing them in parameter store, append the
# terraform workspace to the secret store path if the environment is temporary
# to avoid conflicts with existing environments.
# Don't do this for secrets that are managed manually since the temporary
# environments will need to share those secrets.
secret_store_name = (each.value.manage_method == "generated" && local.is_temporary ?
"${each.value.secret_store_name}/${terraform.workspace}" :
each.value.secret_store_name
)
manage_method = each.value.manage_method
# When generating secrets and storing them in parameter store, append the
# terraform workspace to the secret store path if the environment is temporary
# to avoid conflicts with existing environments.
# Don't do this for secrets that are managed manually since the temporary
# environments will need to share those secrets.
secret_store_name = (config.manage_method == "generated" && local.is_temporary ?
"${config.secret_store_name}/${terraform.workspace}" :
config.secret_store_name
)
}
}
}

0 comments on commit 6e657d2

Please sign in to comment.