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

cool-egg-852

03/26/2020, 7:44 PM
Is it save to have a stack change from
gcp.projects.Services
to
gcp.projects.Service
? Pulumi shows it will delete the resource, but will that disable all of the APIs?
w

white-balloon-205

03/26/2020, 7:48 PM
That might not actually be safe. The create of the new resource will happen before the delete of the old resource, and depending on how GCP and the upstream Terraform provider implement this, that may actually delete the service access. If you want to be safe, you could add the
gcp.projects.Service
, deploy it,
pulumi state delete
the
gcp.projects.Services
, remove the
gcp.projects.Services
from code, and deploy again.
c

cool-egg-852

03/26/2020, 7:48 PM
This seems like something that should probably have been handled when pulumi updated the terraform provider to v3
Very easy to completely break an entire GCP project
I am going the route of the state delete, but overall, this is quite scary
w

white-balloon-205

03/26/2020, 7:53 PM
Ahh - actually - there is a key thing I wasn't aware of -
gcp.projects.Services
has a
disableOnDestroy
which can be set to false.
Then you can make this change safely if you've deployed that change first.
c

cool-egg-852

03/27/2020, 1:11 PM
Can’t though because the resource doesn’t exist anymore.
I’m already passed this, but other people may not be.
The resource in the SDK that is