-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Add targeted replaces to update
.
#3418
Conversation
Working on tests now. The only major question I have here is if we should have some shorthand for |
if pe.stepGen != nil && pe.stepGen.creates != nil { | ||
news = pe.stepGen.creates | ||
if pe.stepGen != nil { | ||
news = pe.stepGen.urns |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This fixes a bug that caused a "resource not found" error if a specified target was replaced rather than created or updated.
Allow the user to specify a set of resources to replace via the `--replace` flag on the CLI. This can be combined with `--target` to replace a specific set of resources without changing any other resources. Fixes #2643.
This flag treats --replace urn as if it also implies --target urn.
c2f0f35
to
0cd2c54
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
`--replace urn` argument. Multiple resources can be specified using `--replace urn1 --replace urn2`. In order to | ||
replace exactly one resource, invoke `pulumi update --replace urn --target urn`. In order to treat all resources | ||
mentioned by `--replace` as if they were also passed via `--target`, pass the `--target-replaces` flag. | ||
[#3418](https://github.com/pulumi/pulumi/pull/3418) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is no longer correct, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, correct--will fix.
Allow the user to specify a set of resources to replace via the
--replace
flag on the CLI. This can be combined with--target
toreplace a specific set of resources without changing any other
resources.
Fixes #2643.