I have a custom terraform provider with a resource that takes a list as one of its inputs.
Here is the list in question: https://github.com/volterraedge/terraform-provider-volterra/blob/main/volterra/resource_auto_volterra_http_loadbalancer.go#L3501
When I declare the list, it needs to be set as multiple blocks like the following:
active_service_policies {
policies {
name = "foobar"
namespace = "shared"
}
policies {
name = "batz"
namespace = "shared"
}
}
Instead, I want to be able to declare it like the following:
active_service_policies {
policies = [
{
name = "foobar"
namespace = "shared"
},
{
name = "batz"
namespace = "shared"
}
]
}
This causes the following error:
Error: Unsupported argument
on main.tf line 79, in resource "volterra_http_loadbalancer" "sp":
79: policies = [
An argument named "policies" is not expected here. Did you mean to define a block
of type "policies"?
Why cant I use an ordered list and how can I allow its use?
Is this issue becaue the policies
is a Type: schema.TypeList,
should this be a TypeSet
or some other object instead?