terraform/plugin/convert
Paddy Carver c840e9c4bc Fix empty diags not getting associated with source.
Right now, there's a bug that if a diagnostic comes back from the
provider with an AttributePath set, but no steps in the AttributePath,
Terraform _thinks_ it's an attribute-specific diagnostic and not a
whole-resource diagnostic, but then doesn't associate it with any
specific attribute, meaning the diagnostic doesn't get associated with
the config at all.

This PR changes things to check if there are any steps in the
AttributePath before deciding this isn't a whole-resource diagnostic,
and if there aren't, treats it as a whole-resource diagnostic, instead.

See hashicorp/terraform-plugin-sdk#561 for more details on how this
surfaces in the wild.
2021-02-08 10:44:30 -08:00
..
diagnostics.go Fix empty diags not getting associated with source. 2021-02-08 10:44:30 -08:00
diagnostics_test.go udpate some tests with unexported gocmp options 2020-12-01 14:07:36 -05:00
schema.go Add support for provider metadata to modules. (#22583) 2020-03-05 16:53:24 -08:00
schema_test.go udpate some tests with unexported gocmp options 2020-12-01 14:07:36 -05:00