From 6b7e40df49f8555b6e09285671d98cf67691d40e Mon Sep 17 00:00:00 2001 From: jksprattler Date: Wed, 27 Nov 2024 18:34:18 -0600 Subject: [PATCH] test --- cloud_Azure/terraform/module/storage_account.tf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cloud_Azure/terraform/module/storage_account.tf b/cloud_Azure/terraform/module/storage_account.tf index 74fda00..c95b2bf 100644 --- a/cloud_Azure/terraform/module/storage_account.tf +++ b/cloud_Azure/terraform/module/storage_account.tf @@ -1,13 +1,13 @@ # Prepare names that meet Azure Storage Account naming restrictions (only alphanum letters, max 24 length, Azure-wide unique) # Each output name is concatenation of Resource Group name and Subscription ID, adjusted to naming restrictions locals { - _names = [for nsg in local.flat_nsgs : "${nsg.value.name}${var.subscription_id}"] + _names = [for nsg in local.flat_nsgs : tostring("${nsg.value.name}${var.subscription_id}")] _lowercase_names = [for name in local._names : lower(name)] _alphanum_lowercase_names = [for name in local._lowercase_names : join("", regexall("[[:alnum:]]+", name))] generated_storage_account_names = [for name in local._alphanum_lowercase_names : substr(name, 0, 24)] # Generate a map of NSG keys to storage account names nsg_to_storage_account_name = { - for i, nsg in local.flat_nsgs : nsg.key => local.generated_storage_account_names[i] + for nsg in local.flat_nsgs : nsg.key => local.generated_storage_account_names } }