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

command/meta: validate config right away #8591

Merged
merged 3 commits into from
Sep 3, 2016
Merged

command/meta: validate config right away #8591

merged 3 commits into from
Sep 3, 2016

Conversation

mitchellh
Copy link
Contributor

Fixes #8524

We were running Input before ever validating the configuration. This makes sense because Context.Validate require vars be set before running. However, we should always validate the configuration itself before doing anything else to catch issues like the above that is fixed.

This caught some errors in the tests I had to fix which should've never worked, you can't have interpolated defaults in variables for example.

@@ -7,7 +7,6 @@ variable "baz" {

default = {
"A" = "a"
interp = "${file("t.txt")}"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jen20 I noticed this was here. We've always had validation that this shouldn't work (interpolations not allowed as variable defaults). This was passing when it shouldn't have. Is this okay to remove? It doesn't work anyways.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, this should be fine to remove.

@jen20
Copy link
Contributor

jen20 commented Sep 3, 2016

This LGTM - merged locally and verified the test runs etc.

@jen20 jen20 merged commit 609219f into master Sep 3, 2016
@jen20 jen20 deleted the b-count-multi-var branch September 3, 2016 22:26
@ghost
Copy link

ghost commented Apr 22, 2020

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.

If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@ghost ghost locked and limited conversation to collaborators Apr 22, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Strange parse error when interpolating count using another resource
2 participants