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

glamorous-printer-66548

10/11/2018, 12:00 AM
@white-balloon-205 is there an example of using the provider-level
deleteBeforeReplace
option? Related issue: https://github.com/pulumi/pulumi/issues/1620
w

white-balloon-205

10/11/2018, 12:05 AM
g

glamorous-printer-66548

10/11/2018, 12:09 AM
aeeehm, I thought it is possible to set some provider level configuration “deleteBeforeReplace” (configurable via pulumi config) from your wording in #1620 but now I probably have misunderstood this. Its probably a hardcoded parameter in the provider source code right now?
w

white-balloon-205

10/11/2018, 12:12 AM
Yes - currently it's hardcoded into certain resources in the provider source. #1620 is all about making that something you can set at resource creation time.
g

glamorous-printer-66548

10/11/2018, 12:14 AM
😿
what i don’t understand is why this works in terraform without explicitly setting some deleteBeforeReplace-like option or similar. Shouldn’t pulumi simply mirror the behaviour of the terraform gcp provider?
w

white-balloon-205

10/11/2018, 12:23 AM
The terraform engine schedules deletes before creates by default. Pulumi does creates before deletes by default. This is a decision that the deployment engine makes, not the providers themselves (they just describe how to do a Create, Read, Update or Delete against the cloud provider). Combined with autonaming, the Pulumi approach avoids downtime for a broad range of updates by default. We absolutely need to fix #1620 so that this is something users can control as needed.
g

glamorous-printer-66548

10/11/2018, 12:27 AM
I see, makes sense, thanks. Might be worth to document this fundamental difference in the default engine behaviour somewhere for folks like me having a terraform background.