You're not doing anything wrong 🙂 AWS has created a resource that Pulumi doesn't know about (e.g. a new version of the component) and when you edit the component, Pulumi tries to delete-then-create, but the delete is being blocked by AWS.
little-cartoon-10569
04/29/2021, 9:02 PM
Your options are to find and delete the mystery resource (I find that using the console to attempt to delete the known resource usually produces a more useful error message); or change the way you manage component versions to not delete old versions, just add new ones.
little-cartoon-10569
04/29/2021, 9:03 PM
(Aside: when adding large blocks of text or code, the Text Snippet tool in the lightning menu is great: it collapses nicely for a better reader/scroller experience.)
g
gray-whale-15826
04/30/2021, 4:58 PM
@little-cartoon-10569 thanks for your reply, I’m wonder why pulumi can not delete the old component,
You are completely right about the reason (existing dependency), but there is no any dependency that pulumi not aware of - component, imagepipeline, image recipe - all of them created via pulumi,
so we can no just to delete it?
I’m new to pulumi, and trying to understand if this is expected behaviour or not
l
little-cartoon-10569
05/02/2021, 8:55 PM
If Pulumi knows about it, then it will delete it. Maybe it doesn't know that one resource has to be deleted before another? That does happen. There's a dependsOn opt that can be used if that's the problem.