-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(blocks): retain data field from config on Update (#248)
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 #240 --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
- Loading branch information
1 parent
d6d8355
commit 0a82c91
Showing
6 changed files
with
98 additions
and
7 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
--- | ||
# generated by https://github.com/hashicorp/terraform-plugin-docs | ||
page_title: "{{.Name}} {{.Type}} - {{.ProviderName}}" | ||
subcategory: "" | ||
description: |- | ||
{{ .Description | plainmarkdown | trimspace | prefixlines " " }} | ||
--- | ||
|
||
# {{.Name}} ({{.Type}}) | ||
|
||
{{.Description}} | ||
|
||
## Example Usage | ||
|
||
{{tffile .ExampleFile}} | ||
|
||
One of the examples above mentions the special syntax needed when referencing | ||
other Terraform resources from within the `data` attribute. You can use `prefect | ||
block type inspect` to confirm when this field is required. | ||
|
||
For example, the following screenshot shows the output of `prefect block type inspect | ||
dbt-core-operation`. It mentions the `$ref` key that the API expects. | ||
|
||
<img src="https://raw.githubusercontent.com/PrefectHQ/terraform-provider-prefect/main/docs/images/block-type-inspect-ref-key.png" alt="Block type inspect ref key" align="center" width="400"> | ||
|
||
For more information on the `$ref` syntax definition, see the | ||
[dollarref's specification in the JSON schema](https://json-schema.org/understanding-json-schema/structuring#dollarref). | ||
|
||
{{.SchemaMarkdown | trimspace}} | ||
|
||
## Import | ||
|
||
Import is supported using the following syntax: | ||
|
||
{{codefile "shell" .ImportFile}} |