Skip to content

Commit 76d638c

Browse files
Artem Kajalainenhouqp
authored andcommitted
refactor: some cosmetics changes
1 parent 1ecdb22 commit 76d638c

File tree

2 files changed

+2
-5
lines changed

2 files changed

+2
-5
lines changed

locals.tf

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
locals {
2-
# default to namespace for backwards compatibility
3-
pre_stack_prefix = "${var.namespace}-${var.env}-"
4-
stack_prefix = local.pre_stack_prefix == "${var.namespace}--" ? "" : local.pre_stack_prefix
5-
2+
stack_prefix = var.env == "" ? "" : "${join("-", compact([var.namespace, var.env]))}-"
63
default_tags = {
74
env = var.env
85
namespace = var.namespace

logs_monitoring.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ resource aws_cloudformation_stack "datadog-forwarder" {
1111
}
1212

1313
resource aws_secretsmanager_secret "datadog_api_key" {
14-
name = "${local.stack_prefix}datadog_api_key"
14+
name = "${local.stack_prefix}datadog-api-key"
1515
description = "Datadog API Key"
1616
tags = local.default_tags
1717
}

0 commit comments

Comments
 (0)