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

Should not allow for readonly+required+no value #217

Closed
eranelbaz opened this issue Jan 25, 2022 · 2 comments · Fixed by #293
Closed

Should not allow for readonly+required+no value #217

eranelbaz opened this issue Jan 25, 2022 · 2 comments · Fixed by #293
Assignees
Labels
bug Something isn't working

Comments

@eranelbaz
Copy link
Member

eranelbaz commented Jan 25, 2022

The bug is -

  1. In TF Provider, create a variable with no value, is_read_only = true, is_required = true.
  2. Apply - Successful (Shouldn't be)
  3. Go to the variables page in env0, see your variable there. Try to add a new one and save
  4. Failed, validation failed since var can't be readonly+required, and have no value

What needs to be done here is to add validation that throws exception when both are set to true

@eranelbaz eranelbaz added the bug Something isn't working label Jan 25, 2022
@samuel-br
Copy link
Contributor

What needs to be done here is to add validation that throws exception when both are set to true

Only when value is empty or generally?

Failed, validation failed since var can't be readonly+required, and have no value

also do we need permit creation of variable with no value ?

@eranelbaz
Copy link
Member Author

Only when value is empty or generally?

Yes, since then you can't set the value to the variable (is_read_only = true) but its required, then you are stuck

also do we need permit creation of variable with no value ?

Yes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
2 participants