🔥 3-day streak
HashiCorp Certified: Terraform Associate (004)143 / 150
Question 143 of 150

A developer writes a local value to fetch a specific subnet CIDR by position: local.cidrs = element(var.subnet_cidrs, 0). The variable subnet_cidrs is declared as type set(string). After running terraform plan, Terraform returns an error indicating the argument type is invalid for the element function. What is the correct explanation and fix?

Reviewed for accuracy · Report an issueNext question