Skip to content

Commit

Permalink
change list() to toist()
Browse files Browse the repository at this point in the history
  • Loading branch information
badra001 committed May 7, 2022
1 parent 16e308b commit da73b71
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cloudtrail/cloudwatch.tf
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ locals {
cloudwatch_prefix = replace(aws_cloudwatch_log_group.this.arn, "/:\\*$/", "")
cloudwatch_suffix = format("%v_CloudTrail_%v", local.account_id, local.region)
org_cloudwatch_suffix = format("%v_*", var.organization_id)
cloudwatch_resources = join(":", list(local.cloudwatch_prefix, "log-stream", local.cloudwatch_suffix))
org_cloudwatch_resources = var.enable_organization ? join(":", list(local.cloudwatch_prefix, "log-stream", local.org_cloudwatch_suffix)) : null
cloudwatch_resources = join(":", tolist(local.cloudwatch_prefix, "log-stream", local.cloudwatch_suffix))
org_cloudwatch_resources = var.enable_organization ? join(":", tolist(local.cloudwatch_prefix, "log-stream", local.org_cloudwatch_suffix)) : null
resources = compact([local.cloudwatch_resources, local.org_cloudwatch_resources])
}

Expand Down

0 comments on commit da73b71

Please sign in to comment.