Skip to content

Commit

Permalink
Switch from stack-* to environment prefix for secrets
Browse files Browse the repository at this point in the history
  • Loading branch information
mbklein committed Sep 18, 2024
1 parent 8a11223 commit bad6215
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 3 deletions.
1 change: 1 addition & 0 deletions core/outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ output "stack" {
environment = local.environment
name = var.stack_name
namespace = local.namespace
prefix = terraform.workspace
tags = merge(var.tags, local.common_tags)
}
}
Expand Down
1 change: 1 addition & 0 deletions data_services/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ provider "aws" { }
locals {
# environment = module.core.outputs.stack.environment
namespace = module.core.outputs.stack.namespace
prefix = module.core.outputs.stack.prefix
tags = merge(
module.core.outputs.stack.tags,
{
Expand Down
2 changes: 1 addition & 1 deletion data_services/secrets.tf
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ locals {

resource "aws_secretsmanager_secret" "data_services" {
for_each = local.secrets
name = "${local.namespace}/infrastructure/${each.key}"
name = "${local.prefix}/infrastructure/${each.key}"
description = "${each.key} secrets for ${local.namespace}"
}

Expand Down
1 change: 1 addition & 0 deletions fcrepo/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ provider "aws" {
locals {
# environment = module.core.outputs.stack.environment
namespace = module.core.outputs.stack.namespace
prefix = module.core.outputs.stack.prefix
tags = merge(
module.core.outputs.stack.tags,
{
Expand Down
2 changes: 1 addition & 1 deletion fcrepo/secrets.tf
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ locals {

resource "aws_secretsmanager_secret" "data_services" {
for_each = local.secrets
name = "${local.namespace}/infrastructure/${each.key}"
name = "${local.prefix}/infrastructure/${each.key}"
description = "${each.key} secrets for ${local.namespace}"
}

Expand Down
1 change: 1 addition & 0 deletions solrcloud/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ provider "aws" {
locals {
# environment = module.core.outputs.stack.environment
namespace = module.core.outputs.stack.namespace
prefix = module.core.outputs.stack.prefix
tags = merge(
module.core.outputs.stack.tags,
{
Expand Down
2 changes: 1 addition & 1 deletion solrcloud/secrets.tf
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ locals {

resource "aws_secretsmanager_secret" "data_services" {
for_each = local.secrets
name = "${local.namespace}/infrastructure/${each.key}"
name = "${local.prefix}/infrastructure/${each.key}"
description = "${each.key} secrets for ${local.namespace}"
}

Expand Down

0 comments on commit bad6215

Please sign in to comment.