New terraform_data
managed resource to replace null_resource
#31757
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.
Add a new managed resource,
terraform_data
, which incorporates and enhances the functionality ofnull_resource
, making use of features not available through the legacy SDK.This new resource has 4 attributes:
id
: A unique computed string.triggers_replace
: A value of any type which will trigger replacement when changed.input
: A value of any type, which will be reflected inoutput
after apply.output
: Computed from theinput
value, which during plan will be unknown of the same type asinput
, and identical toinput
after apply.This gives us a built-in replacement for
null_resource
, while adding some key new features; the ability to store and reference data of any arbitrary type, and create unknown values during plan via the input and output attributes.Documentation updates will be handled in a separate PR.