Skip to content

Commit

Permalink
break-apart logic for readability
Browse files Browse the repository at this point in the history
  • Loading branch information
abeluck committed Aug 11, 2023
1 parent ba0f445 commit 0bd4138
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion deprecated.tf
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,14 @@ locals {
cloudfront_access_log_include_cookies = var.log_include_cookies == null ? var.cloudfront_access_log_include_cookies : var.log_include_cookies
cloudfront_access_log_prefix = var.log_prefix == null ? var.cloudfront_access_log_prefix : var.log_prefix

deployment_principals = var.deployment_principal_arns == null ? var.deployment_principals : { for arn, path_prefix in var.deployment_principal_arns : arn => { "arn" : arn, "path_prefix" : path_prefix } }
deployment_principals_from_deprecated_deployment_principal_arns = {
for arn, path_prefix in coalesce(var.deployment_principal_arns, {}) :
arn => {
"arn" : arn,
"path_prefix" : path_prefix
}
}
deployment_principals = var.deployment_principal_arns == null ? var.deployment_principals : local.deployment_principals_from_deprecated_deployment_principal_arns

# New variables, but declare them here for consistency
cloudfront_access_log_create_bucket = var.cloudfront_access_log_create_bucket
Expand Down

0 comments on commit 0bd4138

Please sign in to comment.