https://pulumi.com logo
#general
Title
# general
g

green-morning-1318

03/19/2020, 2:17 AM
One more question… one of the ResourceOptions that Pulumi has is called
DeleteBeforeReplace
, when set to true, ensures that this resource is deleted prior to replacement. It looks like it doesn’t do the same for a “_Create_”. In my case, I’m using an API Gateway on AWS and when I make changes to resources they should be deleted before creating them (otherwise you get an error). Is there a way to do that in Pulumi?
w

white-balloon-205

03/19/2020, 3:49 AM
Do the two resources have different names? If they have the same name, this should be a replace. If they have different names, there is no way to know the relationship between them unless you indicate they are related. You can use
aliases
to indicate that one of the resources (the one you are creating) was previously known by a different name. This will cause it to be replaced (and change name in the process). If that doesn’t help - would likely need more concrete details of your use case.
g

green-morning-1318

03/19/2020, 4:00 AM
Ah okay! I see my problem… it changes the name and thus it’s a different resource, so not a problem in Pulumi but a problem I need to solve 😇