mirror of https://github.com/pulumi/pulumi.git
79c5d97afa
It's often the case that we want to move or rename resources in our Pulumi programs. Doing so can result in a change in the resource's URN, which means that Pulumi will, by default, see the move as a deletion of the old resource and a creation of the new resource. We can tell Pulumi that a resource has been renamed by using *aliases*, whereby a resource can be annotated with its previous URNs. Pulumi will then use these URNs in several places: * When looking for a resource's previous state, Pulumi will try to find it using the new URN first and any aliases second. * When writing out a new snapshot, Pulumi will *normalize* all URNs (e.g. those in provider, parent and dependency references) to remove aliases and replace them with the new URNs they resolve to. Alas, a familiar story presents itself in the second case -- Pulumi does not currently normalize `DeletedWith` references. This can result in snapshot integrity errors as Pulumi leaves stale references in the snapshot before writing it. This commit addresses this omission, using the now-preferred `GetAllDependencies` method introduced in #17320 to hopefully stop this from happening again in this part of the codebase. Fixes #17614 |
||
---|---|---|
.. | ||
framework | ||
fuzzing | ||
testdata | ||
README.md | ||
alias_test.go | ||
analyzer_test.go | ||
continue_on_error_test.go | ||
delete_before_replace_test.go | ||
golang_sdk_test.go | ||
import_test.go | ||
loader_test.go | ||
parameterized_test.go | ||
pending_delete_test.go | ||
pending_replace_test.go | ||
provider_test.go | ||
pulumi_test.go | ||
refresh_legacy_diff_test.go | ||
refresh_test.go | ||
resource_reference_test.go | ||
retain_on_delete_test.go | ||
source_query_test.go | ||
step_generator_test.go | ||
target_test.go | ||
transformation_test.go | ||
update_plan_test.go |
README.md
(lifecycle-tests)=
Lifecycle tests
Lifecycle tests exercise the Pulumi engine and serve as a specification for the behaviours and interactions of the various features that define the lifecycle of a Pulumi program. This includes, but is not limited to:
- The operation(s) being executed (
up
,preview
, etc.) and the options passed to that operation (--target
,--target-dependents
, etc.). - The programs being executed -- their resources, invocations, and the various
options that might be associated with them (
parent
,retainOnDelete
, etc.). - The state of the program before and after operations are executed.
How and when to use