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

terraform: fail early if module validation fails #2479

Merged
merged 2 commits into from
Jun 26, 2015

Conversation

mitchellh
Copy link
Contributor

Fixes #1861

This just bails earlier if we have module validation errors. There isn't a test for this because its mostly a UX change. All errors that are caught at this stage are also caught at the graph stage, but the errors are nicer UX earlier if we bail.

if !computed {
t.Fatal("should be computed")
}
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Why is this test going away?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It was testing that validation didn't fail and that the validate resource function actually received a "computed" value in the case that a value wasn't specified. This happened prior to this commit, but not after. We were masking the error "variable 'foo' is required"

@phinze
Copy link
Contributor

phinze commented Jun 25, 2015

One question, but seems reasonable generally.

mitchellh added a commit that referenced this pull request Jun 26, 2015
terraform: fail early if module validation fails
@mitchellh mitchellh merged commit a3a2698 into master Jun 26, 2015
@mitchellh mitchellh deleted the b-validate-fail-early branch June 26, 2015 00:50
@ghost
Copy link

ghost commented May 2, 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 May 2, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unknown variable referenced error too late, unclear
2 participants