-
Notifications
You must be signed in to change notification settings - Fork 233
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
AtMostOneOf #735
Comments
OK, I have found, that However I think, the documentation could be fixed a little bit. There is written this: // ConflictsWith is a set of schema keys that conflict with this schema.
// This will only check that they're set in the _config_. This will not
// raise an error for a malfunctioning resource that sets a conflicting key. Which I understood is just checking I have the correct schema. Ie raising error during this, because return &schema.Resource{
Schema: map[string]*schema.Schema{
"category_id": &schema.Schema{
Type: schema.TypeString,
ConflictsWith: []string{"department_id"}
}
// "department_id": &schema.Schema{
// Type: schema.TypeString,
// ConflictsWith: []string{"category_id"}
// }
}
} |
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. |
SDK version
Use-cases
I have some optional attributes, but only one of them can be set. Something like
ExactlyOneOf
but accept also none of them.Proposal
Maybe add something like
AtMostOneOf
similar toExactlyOneOf
.References
I saw there was first attempt to create this in #225 but then it was changed to ExactlyOneOf
The text was updated successfully, but these errors were encountered: