hashicorp / hashicorp/terraform-plugin-sdk
Allow ConflictsWith, ExactlyOneOf, and AtLeastOneOf to work in Lists
- Dominant language
- Go
- Stars
- 485
- Forks
- 244
- Avg merge
- 19h 57m
- Merged PRs (30d)
- 4
Description
### Use-cases
Currently `ConflictsWith`, `ExactlyOneOf` or `AtLeastOneOf` are set at the attribute level, which means we can't set it on a list of if we have a list of objects, and each object has a list of attributes that's `AtLeastOneOf`. We don't know the length of the list and there is no way to differentiate object[0] from object[1] with what is conflicting.
### Proposal
We need to move `ConflictsWith`, `ExactlyOneOf` and `AtLeastOneOf` to the resource level to be able to determine which child fields are conflicting.
Contributor guide
Research direction
The issue does not name files, tests, or an entry point. Start by tracing how ConflictsWith, ExactlyOneOf, and AtLeastOneOf are currently represented and evaluated, then determine the resource-level design needed for nested lists. Done means these constraints can distinguish fields belonging to separate list objects.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go, terraform
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100