05/23/2021, 10:45 PM
EC2 Image Builder question: how do we update in-use Components?
I'm having issues updating a component that is referenced from a Recipe.
The new Component is created, Pulumi says it successfully updates the Recipe, then it tries and fails to delete the original Component.
According to the console, the recipe still refers to the original Component, which is why it cannot be deleted. AWS complains
Resource dependency error: The resource ARN 'arn:aws:imagebuilder:ap-southeast-2:mcAccId:component/my-component-542cbc8/1.0.0/1' has other resources depended on it.


05/24/2021, 12:10 AM
Hi @little-cartoon-10569 is there any code you would be willing to share please?


05/24/2021, 9:36 PM
Sure @steep-sunset-89396. This snippet is edited for brevity; hopefully the behaviour hasn't been edited out of it!
I can up and destroy this all day long. up followed by editing the component data followed by another up complains.
I've been told that my colleague got it working last night by replacing an inline SSM variable (that's in the edited-out bit: a bit of text like
{{ /path/to/variable}}
) with a call to AWS PowerShell to fetch the value (
(Get-SSMParameterValue -Names /path/to/variable).Parameters[0].Value
). So possibly it was due to the
{{ ... }}
notation, maybe I needed to escape it when calling JSON.stringify()?