terraform: Return validation diagnostics with source info where possible

This commit is contained in:
Martin Atkins 2018-08-24 17:46:19 -07:00
parent 9ec00468f8
commit ed7e331041
1 changed files with 2 additions and 2 deletions

View File

@ -396,7 +396,7 @@ func (n *EvalValidateResource) Eval(ctx EvalContext) (interface{}, error) {
}
resp := provider.ValidateResourceTypeConfig(req)
diags = diags.Append(resp.Diagnostics)
diags = diags.Append(resp.Diagnostics.InConfigBody(cfg.Config))
if n.ConfigVal != nil {
*n.ConfigVal = configVal
@ -426,7 +426,7 @@ func (n *EvalValidateResource) Eval(ctx EvalContext) (interface{}, error) {
}
resp := provider.ValidateDataSourceConfig(req)
diags = diags.Append(resp.Diagnostics)
diags = diags.Append(resp.Diagnostics.InConfigBody(cfg.Config))
}
if n.IgnoreWarnings {