dazzling-oxygen-8440507/11/2022, 9:47 AM
module, if my instance is deleted, Pulumi tries to execute the
part of the command, which is no longer possible. So I want to tell it to just give up on cleaning up any commands that were run on a deleted instance. Is something like this possible? Right now, I have to manually edit my state to clean them up.
little-cartoon-1056907/11/2022, 9:27 PM
opt to everything that should have been deleted before the instance.
dazzling-oxygen-8440507/12/2022, 10:30 AM
tries to run it’s
action on an instance that no longer exists.
little-cartoon-1056907/12/2022, 9:08 PM
dazzling-oxygen-8440507/12/2022, 10:04 PM
action - there’s no way for it to know that “this instance was deleted” means “this command is deleted too”. That’s what I want to be able to express. As far as I can tell,
doesn’t seem to include that kind of relationship. If I delete my instance,
, and then
, it correctly recreates the instance, but it tries to run the command’s
operation (on the old instance, which no longer exists) before creating the new command on the new instance.
little-cartoon-1056907/12/2022, 10:31 PM
removes resource from state. •
updates state and cloud from code. In that sequence, Pulumi isn't deleting anything. If the Command is being deleted, maybe it's because you have a dependsOn that you don't want? It does seem like you're stuck though: I don't think there is a way to have
delete resources that have no cloud presence (Command). You don't need to manually edit the state file though, you just need to run
pulumi state delete urn
dazzling-oxygen-8440507/13/2022, 8:44 AM
You don’t need to manually edit the state file though, you just need to runYeah, this is what I meant - I was using.
pulumi state delete urn
to delete a bunch of commands at once, since
doesn’t support wildcards afaik.
pulumi state delete
Why does it delete anything? I’d have thought it’d go something like this:
• Resource is deleted in cloud.
•removes resource from state.
•Exactly -updates state and cloud from code.
only removes the Instance, it doesn’t detect that the Command is also effectively removed by the instance not existing anymore. Then the
sees that the
input to the Command has changed, so this triggers a
operation, which tries to run the
of the command on the previous instance, and the
on the new instance. But the
part fails of course.