return state even if cfg is invalid

This commit is contained in:
Dana Hoffman 2018-11-02 12:20:51 -07:00
parent 8c54da0ad2
commit 7edbb3c8bf
1 changed files with 1 additions and 1 deletions

View File

@ -53,7 +53,7 @@ func testStep(opts terraform.ContextOpts, state *terraform.State, step TestStep,
}
if stepDiags := ctx.Validate(); len(stepDiags) > 0 {
if stepDiags.HasErrors() {
return nil, errwrap.Wrapf("config is invalid: {{err}}", stepDiags.Err())
return state, errwrap.Wrapf("config is invalid: {{err}}", stepDiags.Err())
}
log.Printf("[WARN] Config warnings:\n%s", stepDiags)