You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently changing the region of AWS provider fails to move the resources to a new region and instead fails. While the
behavior is similarly unsatisfactory upstream, it would be nice if Pulumi could compute the correct plan (delete in
region A and create in region B).
Our first attempt to implement this tapped into a relevant feature here where DiffConfig call may indicate a replacement
of the provider, and this cascades to replace plans for all resources provisioned with that provider configuration,
which accomplishes the desired effect.
ForcesProviderReplace setting was introduced in the bridge, and DiffConfig reinstated, fixing pulumi/pulumi-terraform-bridge#244 and #3497
demonstrated that this can make the AWS provider behave correctly on recent versions of Pulumi.
However, upgrade tests discovered a problem. While v3.111.1 of the CLI works, for resources provisioned on v3.86.0
version of the CLI (and possibly subsequent versions, we have not completed bisecting), Pulumi does not store region in
the state, causing the provider to erroneously conclude in DiffConfig that region is changing from empty to "us-west-2",
and replacing resources in the same region.
Vote on this issue by adding a 👍 reaction.
To contribute a fix for this issue, leave a comment (and link to your pull request, if you've opened one already).
The text was updated successfully, but these errors were encountered:
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
- pulumi/pulumi-aws#3674
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
What happened?
Currently changing the region of AWS provider fails to move the resources to a new region and instead fails. While the
behavior is similarly unsatisfactory upstream, it would be nice if Pulumi could compute the correct plan (delete in
region A and create in region B).
Our first attempt to implement this tapped into a relevant feature here where DiffConfig call may indicate a replacement
of the provider, and this cascades to replace plans for all resources provisioned with that provider configuration,
which accomplishes the desired effect.
ForcesProviderReplace setting was introduced in the bridge, and DiffConfig reinstated, fixing
pulumi/pulumi-terraform-bridge#244 and #3497
demonstrated that this can make the AWS provider behave correctly on recent versions of Pulumi.
However, upgrade tests discovered a problem. While v3.111.1 of the CLI works, for resources provisioned on v3.86.0
version of the CLI (and possibly subsequent versions, we have not completed bisecting), Pulumi does not store region in
the state, causing the provider to erroneously conclude in DiffConfig that region is changing from empty to "us-west-2",
and replacing resources in the same region.
Example
N/A
Output of
pulumi about
N/A
Additional context
N/A
Contributing
Vote on this issue by adding a 👍 reaction.
To contribute a fix for this issue, leave a comment (and link to your pull request, if you've opened one already).
The text was updated successfully, but these errors were encountered: