Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix spurious ForcesProviderReplace activation (#1958)
The ForceProviderReplace setting introduces cascading replaces when a certain Provider-level configuration setting changes. For example, changing the region in the AWS Provider is able to recreate all the affected resources in the new desired region with this setting. There was however a practical problem fixed with this PR that caused accidental re-creation of resources in the same region. Specifically, some of the resources states provisioned by older versions of Pulumi CLI may not have oldInputs sufficiently populated in the call to DetailedDiff. This caused ForceProviderReplace logic to assume that the region is changing from "" to "us-east-1" where it did not, in fact, change. To compensate for this, the logic no longer initiates cascading replace when the oldInputs map does not contain the value. See also: - pulumi/pulumi-aws#3826 - #244 - pulumi/pulumi-aws#3497
- Loading branch information