New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update plan error: delete-replaced is not allowed by the plan: this resource is constrained to replace #10924
Labels
area/update-plans
kind/bug
Some behavior is incorrect or out of spec
resolution/fixed
This issue was fixed
Milestone
Comments
adam-kiss-sg
added
kind/bug
Some behavior is incorrect or out of spec
needs-triage
Needs attention from the triage team
labels
Oct 5, 2022
Frassle
added
area/update-plans
and removed
needs-triage
Needs attention from the triage team
labels
Oct 5, 2022
Thanks for this report, I've tracked this down to an issue with generating the plans for resources that are being replaced due to dependencies on others resources that are being replaced. Working on a smaller reproduction to add to our test suite and a fix now. |
Frassle
added a commit
that referenced
this issue
Oct 13, 2022
We weren't correctly handling the case where a resource was marked for deletion due to one of it's dependencies being deleted. We would add an entry to it's "Ops" list, but then overwrite that "Ops" list when we came to generate the recreation step. Fixes #10924
3 tasks
bors bot
added a commit
that referenced
this issue
Nov 1, 2022
11009: Fix update plans with dependent replacements r=Frassle a=Frassle <!--- Thanks so much for your contribution! If this is your first time contributing, please ensure that you have read the [CONTRIBUTING](https://github.com/pulumi/pulumi/blob/master/CONTRIBUTING.md) documentation. --> # Description <!--- Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. --> We weren't correctly handling the case where a resource was marked for deletion due to one of it's dependencies being deleted. We would add an entry to it's "Ops" list, but then overwrite that "Ops" list when we came to generate the recreation step. Fixes #10924 ## Checklist <!--- Please provide details if the checkbox below is to be left unchecked. --> - [x] I have added tests that prove my fix is effective or that my feature works <!--- User-facing changes require a CHANGELOG entry. --> - [x] I have run `make changelog` and committed the `changelog/pending/<file>` documenting my change <!-- If the change(s) in this PR is a modification of an existing call to the Pulumi Service, then the service should honor older versions of the CLI where this change would not exist. You must then bump the API version in /pkg/backend/httpstate/client/api.go, as well as add it to the service. --> - [ ] Yes, there are changes in this PR that warrants bumping the Pulumi Service API version <!-- `@Pulumi` employees: If yes, you must submit corresponding changes in the service repo. --> 11027: Do not execute pending deletes at the start of deployment r=Frassle a=Frassle <!--- Thanks so much for your contribution! If this is your first time contributing, please ensure that you have read the [CONTRIBUTING](https://github.com/pulumi/pulumi/blob/master/CONTRIBUTING.md) documentation. --> # Description <!--- Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. --> This removes all the handling of pending deletes from the start of deployments. Instead we allow resources to just be deleted as they usually would at the end of the deployment. There's a big comment in TestPendingDeleteOrder that explains the order of operations in a succesful run and how that order differs if we try and do pending deletes up-front. Fixes #2948 ## Checklist <!--- Please provide details if the checkbox below is to be left unchecked. --> - [x] I have added tests that prove my fix is effective or that my feature works <!--- User-facing changes require a CHANGELOG entry. --> - [ ] I have run `make changelog` and committed the `changelog/pending/<file>` documenting my change <!-- If the change(s) in this PR is a modification of an existing call to the Pulumi Service, then the service should honor older versions of the CLI where this change would not exist. You must then bump the API version in /pkg/backend/httpstate/client/api.go, as well as add it to the service. --> - [ ] Yes, there are changes in this PR that warrants bumping the Pulumi Service API version <!-- `@Pulumi` employees: If yes, you must submit corresponding changes in the service repo. --> Co-authored-by: Fraser Waters <fraser@pulumi.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
area/update-plans
kind/bug
Some behavior is incorrect or out of spec
resolution/fixed
This issue was fixed
What happened?
Was trying to deploy using update plans, and got the following error:
delete-replaced is not allowed by the plan: this resource is constrained to replace
Steps to reproduce
pulumi up
:pulumi preview --save-plan plan.json
pulumi up --plan plan.json
Expected Behavior
The update should work
Actual Behavior
Get the error message: delete-replaced is not allowed by the plan: this resource is constrained to replace
Output of
pulumi about
CLI
Version 3.40.2
Go Version go1.19.1
Go Compiler gc
Plugins
NAME VERSION
aws 5.16.2
docker 3.4.1
nodejs unknown
Host
OS ubuntu
Version 20.04
Arch x86_64
This project is written in nodejs: executable='/usr/bin/node' version='v16.13.0'
Current Stack: dev
TYPE URN
pulumi:pulumi:Stack urn:pulumi:dev::pulumilambda::pulumi:pulumi:Stack::pulumilambda-dev
pulumi:providers:aws urn:pulumi:dev::pulumilambda::pulumi:providers:aws::default_5_16_2
aws:iam/role:Role urn:pulumi:dev::pulumilambda::aws:iam/role:Role::iamForLambda
aws:cloudwatch/eventRule:EventRule urn:pulumi:dev::pulumilambda::aws:cloudwatch/eventRule:EventRule::eventRuleDaily
aws:lambda/function:Function urn:pulumi:dev::pulumilambda::aws:lambda/function:Function::testLambda
aws:cloudwatch/eventTarget:EventTarget urn:pulumi:dev::pulumilambda::aws:cloudwatch/eventTarget:EventTarget::event-target-daily
aws:lambda/permission:Permission urn:pulumi:dev::pulumilambda::aws:lambda/permission:Permission::permission-daily
Found no pending operations associated with dev
Backend
Name SG0166
URL file://stacks
User adam-kiss
Organizations
Dependencies:
NAME VERSION
@pulumi/awsx 0.40.1
@pulumi/pulumi 3.40.2
@pulumi/aws 5.16.2
Pulumi locates its logs in /tmp by default
Additional context
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: