When errors are returned by the DNSimple API we use attributeErrorsToDiagnostics to unpack the errors and surface them. However, the implementation only handles dnsimple.ErrorResponse.AttributeErrors so when an error is not a Validation failed response nothing will be reported and the user will see the following:
Error: Provider produced inconsistent result after apply
When applying changes to dnsimple_zone_record.foobar, provider
"provider[\"registry.terraform.io/hashicorp/dnsimple\"]" produced an
unexpected new value: Root resource was present, but now absent.
This is a bug in the provider, which should be reported in the provider's own
issue tracker.
How we now report errors:
Error: API returned an error: Validation failed
with dnsimple_zone_record.foobar,
on terraform_plugin_test.tf line 2, in resource "dnsimple_zone_record" "foobar":
2: resource "dnsimple_zone_record" "foobar" {
Error: API returned a Validation Error for: base
with dnsimple_zone_record.foobar,
on terraform_plugin_test.tf line 2, in resource "dnsimple_zone_record" "foobar":
2: resource "dnsimple_zone_record" "foobar" {
When errors are returned by the DNSimple API we use
attributeErrorsToDiagnostics
to unpack the errors and surface them. However, the implementation only handlesdnsimple.ErrorResponse.AttributeErrors
so when an error is not aValidation failed
response nothing will be reported and the user will see the following:How we now report errors: