hi all i am trying to loop through a list of email addresses for an azure budget notification
variable "contact_emails" {
description = "Distribution Groups"
type = list(string)
}
so i can populate here
contact_emails = [
"foo@example.com",
"bar@example.com",
]
when i do count or for loop its complaining as below - i am creating a budget module
│ Error: Reference to "count" in non-counted context
│
│ on budget-module\main.tf line 56, in resource "azurerm_consumption_budget_subscription" "budget":
│ 56: contact_emails = var.contact_emails[count.index]
│
│ The "count" object can only be used in "module", "resource", and "data" blocks, and only when the "count" argument is set.