-
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: if without_template_settings is defined, validate revision is no… #574
Conversation
…t set outside of it
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.
👍🏻
Actually I've missed something
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.
Ignore my previous approval, I've missed something important
The conflict should be with the without_template_settings
block in general, not with its revision
Actually I missed
env0/resource_environment.go
Outdated
Description: "the revision the environment is to be run against", | ||
Optional: true, | ||
Computed: true, | ||
ConflictsWith: []string{"without_template_settings.0.revision"}, |
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 think we should conflict with without_template_settings
in general.
If without_template_settings
block exists, the revision shouldn't exist on the resource directly
If there's a without_template_settings
but no without_template_settings.revision
, and there's a revision: master
, the revision used will be ''
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.
Got it.
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.
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.
👍🏻
Left one small comment on the tests
repository = "%s" | ||
terraform_version = "%s" | ||
type = "%s" | ||
revision = "%s" |
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.
IMO preferably remove this "revision" from the test
I think it's more important that this test fails when there's no revision
in the without_template_settings
at all
…t set outside of it
Issue & Steps to Reproduce / Feature Request
fixes #573
Solution