Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow ConflictsWith, ExactlyOneOf, and AtLeastOneOf to work in Lists #470

Open
megan07 opened this issue Jun 4, 2020 · 1 comment
Open
Labels
enhancement New feature or request subsystem/types Issues and feature requests related to the type system of Terraform and our shims around it. terraform-plugin-framework Resolved in terraform-plugin-framework

Comments

@megan07
Copy link
Contributor

megan07 commented Jun 4, 2020

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.

@bflad
Copy link
Member

bflad commented Mar 21, 2022

Just to document them, other (potentially mutually exclusive) ideas that have floated around this space are:

  • Support for "relative" attribute paths (e.g. starting with a period to reference the same index of list/set block)
  • Support for "wildcard" attribute paths (e.g. having an asterisk would match any index within a list/set block)

@bflad bflad added the terraform-plugin-framework Resolved in terraform-plugin-framework label Nov 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request subsystem/types Issues and feature requests related to the type system of Terraform and our shims around it. terraform-plugin-framework Resolved in terraform-plugin-framework
Projects
None yet
Development

No branches or pull requests

3 participants