-
Notifications
You must be signed in to change notification settings - Fork 14
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
Fix - Add validation for case when isReadOnly and isRequired are true and value empty in config variable #293
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about using ConflictsWith
?
@eranelbaz |
also I did try to find a way to check it in the schema itself but it seems to be known issue on TF that there is no validation relating to more then one key |
Yes, it will say either a or b |
no key is conflict with just one of the other keyes isRequired conflict with isReadOnly and empty value so you cant ensure that with |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
//mock.EXPECT().ConfigurationVariablesById(newConfigVar.Id).Return(newConfigVar, nil), | ||
) | ||
// mock.EXPECT().ConfigurationVariableUpdate(client.ConfigurationVariableUpdateParams{CommonParams: updateParams, Id: newConfigVar.Id}).Times(1).Return(configVar, nil) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please remove commented code
…into fix_readonly_and_required_noValue-#217
Issue & Steps to Reproduce / Feature Request
fixes #217
Solution
Add validation func that throw error when
is_required
andis_read_only
aretrue
andvalue
is empty