Skip to content

Commit e65e42c

Browse files
committed
add count index to local._names
1 parent 9b1ecee commit e65e42c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cloud_Azure/terraform/module/storage_account.tf

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ resource "random_id" "storage_account_id" {
77
# Each output name is concatenation of the exporter name truncated to 12 chars and a random id of 12 chars, adjusted to naming restrictions
88
locals {
99
truncated_name = substr(var.name, 0, 12)
10-
_names = [for name in var.resource_group_names : "${local.truncated_name}${random_id.storage_account_id.hex}"]
10+
_names = [for name in var.resource_group_names : "${local.truncated_name}${random_id.storage_account_id[count.index].hex}"]
1111
_lowercase_names = [for name in local._names : lower(name)]
1212
_alphanum_lowercase_names = [for name in local._lowercase_names : join("", regexall("[[:alnum:]]+", name))]
1313
generated_storage_account_names = [for name in local._alphanum_lowercase_names : substr(name, 0, 24)]

0 commit comments

Comments
 (0)