Terraform CLI
Terraform each object does not contain the referenced attribute
Terraform could not evaluate the each object because the expression referenced an attribute that does not exist for the current for_each context.
Terraform CLI
Terraform could not evaluate the each object because the expression referenced an attribute that does not exist for the current for_each context.
Observed message
Error: Invalid "each" attribute
Why it happens
How to fix it
Official reference
Troubleshoot TerraformRelated errors
Explore more