When calling Update on a block, we call Get to retrieve the latest copy of the block object from the API. This response does not include the $ref expression if it was originally provided. This was causing "inconsistent result after apply" errors.
So for now, we'll use the user-defined data field when updating the state instead of the (incomplete) data field from the Get request.
Summary
When calling Update on a block, we call Get to retrieve the latest copy of the block object from the API. This response does not include the
$ref
expression if it was originally provided. This was causing "inconsistent result after apply" errors.So for now, we'll use the user-defined data field when updating the state instead of the (incomplete) data field from the Get request.
Closes https://github.com/PrefectHQ/terraform-provider-prefect/issues/240
Testing
Aside from the acceptance tests passing, I also validated manually to confirm the profile field showed the link to the profile as expected: