Closed
Description
Terraform CLI and Framework Versions
Any, terraform-plugin-framework v0.13.0
Use Cases or Problem Statement
Certain providers may wish to implement a native "ordered set" type (e.g. a list with ordering requirements, but also element uniqueness constraints). Rather than implementing an awkward type abstraction in the framework or a separate type, we can introduce a list validator that will raise an error if duplicate list elements exist on any list type. (This doesn't preclude the introduction of a separate type with this validation baked in, however this validation is generic in nature.)
Proposal
Create a new listvalidator
package validator called UniqueElements
or similar that raises an error diagnostic if multiple elements have an equal attr.Value
.
Additional Information
hashicorp/terraform-plugin-framework#99
Code of Conduct
- I agree to follow this project's Code of Conduct