-
Notifications
You must be signed in to change notification settings - Fork 0
/
locals.tf
36 lines (31 loc) · 869 Bytes
/
locals.tf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
locals {
cluster_arn = data.aws_ecs_cluster.this.arn
account_id = data.aws_caller_identity.this.account_id
region = data.aws_region.this.name
log_group = try(data.aws_cloudwatch_log_group.this[0].name, aws_cloudwatch_log_group.this[0].name)
log_group_name = try(var.cloudwatch_log_group_name, "${var.service_name}-log-group")
default_environment_config = []
default_secrets_config = []
merged_secrets = distinct(
concat(
var.service_secrets_config,
local.default_secrets_config
)
)
merged_environment = distinct(
concat(
var.service_environment_config,
local.default_environment_config
)
)
task_role_policy_arns = flatten([
var.task_role_policy_arns,
try(aws_iam_policy.exec[0].arn, null)
])
tags = merge(
{
Terraform = "true"
},
var.tags,
)
}