Each.value is object with 5 attributes

hello team!
Im trying to use the following module but Im encountering error while doing


this is the below error Im encountering

Hi @gajalakshmi2901,

each.value inside the module "sandbox" block would refer to one of the values from the map in var.account.

Therefore this error message suggests that the type constraint for var.account doesn’t declare these attributes. You’ve not included that type constraint in what you shared, but to work with the way you’re trying to use it here it should be like the following with at least these attribute names declared:

variable "account" {
  type = map(object({
    email = string
    AccountName                 = string
    ManagedOrganizationalUnit   = string
    SSOUserEmail                = string
    SSOUserFirstName            = string
    SSOUserLastName             = string
    Tag1                        = string
    Tag2                        = string
    change_requested_by         = string
    change_reason               = string
    group                       = string
    account_customizations_name = string
  }))
}

(I might not have got all of the attribute types correct, since I’m just guessing what type constraints each of the variables in the child module expect. Unless you have a good reason to differ, I’d suggest making the attribute types in the above match the corresponding variable types in the child module.)