- Notifications
You must be signed in to change notification settings - Fork23
feat: Validate monotonicity for coder_parameter#90
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
"monotonic": { | ||
Type:schema.TypeString, | ||
Optional:true, | ||
Description:"Number monotonicity, either increasing or decreasing.", |
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.
Just curious: Why don't we use a validation func here?
(I do see the check invalueIsType
, it's just not obvious why we're doing that instead of validation func.)
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.
I will pass this question to@kylecarbs who originally implemented this code. I deduce that this is due to the compliance withterraform-plugin-sdk
?
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.
Not sure actually...
Uh oh!
There was an error while loading.Please reload this page.
Related:coder/coder#5574
Related:coder/coder#5978
This PR adds a new validation property
monotonic
to thecoder_parameter
. Unfortunately, we can only validate the format within the Terraform runner, but a comparison of values, current and new, will be performed on thecoderd
API level.