β Error: Invalid index
β
β on api.tf line 133, in resource "aws_api_gateway_usage_plan_key" "this":
β 133: usage_plan_id = aws_api_gateway_usage_plan.this[each.value.usage_plan].id
β βββββββββββββββββ
β β aws_api_gateway_usage_plan.this is object with 1 attribute "open-use-internal-plan"
β β each.value.usage_plan is "open-use-internal-dev"
β
β The given key does not identify an element in this collection value.
What am i suppose to pass in
usage_plan_id = aws_api_gateway_usage_plan.this[each.value.usage_plan].id