Skip to content

Commit

Permalink
Merge pull request #19 from gfortil/HPCC-28167
Browse files Browse the repository at this point in the history
Fix invalid function argument for local.data_planes
  • Loading branch information
Godji Fortil authored Aug 25, 2022
2 parents 2d7829b + 589f804 commit 629273a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 13 deletions.
2 changes: 1 addition & 1 deletion locals.tf
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ locals {
"quota" = "${y.quota}Gi"
}
]
]) : toset({ for k, v in local.get_data_planes : k => merge(v, { "secret_name" = "${v.storage_account_name}-azure-secret", "secret_namespace" = "${terraform.workspace}" }) })
]) : toset([for v in local.get_data_planes : merge(v, { "secret_name" = "${v.storage_account_name}-azure-secret", "secret_namespace" = "${terraform.workspace}" })])

group_planes_by_sa = { for k, v in local.get_data_planes : v.storage_account_name => v... }

Expand Down
21 changes: 9 additions & 12 deletions modules/storage_accounts/data_planes.tftpl
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
${jsonencode(flatten([for k, v in storage_accounts: [for x, y in v.shares: {
"plane_name" : "${x}"
"storage_account_name" : "${substr(lower("${k}${random_string}"), 0, 24)}"
"share_name" : "${lower("${x}share")}"
"quota" : "${y.quota}Gi"
"sub_path" : "${y.sub_path}"
"category" :"${y.category}"
"sku" : "${v.account_tier}_${v.replication_type}"
"resource_group_name" : "${resource_group_name}"
}
]
]))
}
"plane_name" : "${x}"
"storage_account_name" : "${substr(lower("${k}${random_string}"), 0, 24)}"
"share_name" : "${lower("${x}share")}"
"quota" : "${y.quota}Gi"
"sub_path" : "${y.sub_path}"
"category" :"${y.category}"
"sku" : "${v.account_tier}_${v.replication_type}"
"resource_group_name" : "${resource_group_name}"
}]]))}

0 comments on commit 629273a

Please sign in to comment.