fix(variable): change 'value' type to Dynamic #277
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Changes the Variable 'value' type from string to Dynamic.
In PrefectHQ/prefect#13543 and associated changes around May 2024, Variables were updated from simple strings to JSON objects. The Terraform provider has still been treating them as strings, so when folks tried to put JSON-compatible values in them, Terraform would fail to work with them as found in #254
That said, this doesn't mean you can always expect a full JSON object in response. It could be individual JSON-compatible types, like
bool
orint
. So we actually need a Dynamic attribute type here.Related to https://linear.app/prefect/issue/PLA-247/changing-variable-to-a-json-value-in-the-ui-makes-next-terraform-run
Related to #254
References
From https://docs.prefect.io/3.0/develop/variables:
Also, you can see the accepted types for the
value
field here: