pulumi / pulumi-gcp

A Google Cloud Platform (GCP) Pulumi resource package, providing multi-language access to GCP
Apache License 2.0
183 stars 53 forks source link

Support force destruction of GCP Datastream private connections #1996

Open bradley-yoo-anrok opened 6 months ago

bradley-yoo-anrok commented 6 months ago

Hello!

Issue details

Currently in v3.115.2, trying to destroy PrivateConnection via pulumi up fails

Original Configuration File

const privateConnection = new gcp.datastream.PrivateConnection('main-db-private-connection', {
    displayName: 'Connection profile',
    location: 'us-central1',
    privateConnectionId: 'main-db-private-connection',
    vpcPeeringConfig: {
        vpc: network.id,
        subnet: '10.123.0.0/24',
    },
});

Error:

  gcp:datastream:PrivateConnection (main-db-private-connection):
    error: deleting urn:pulumi:<internal>:gcp:datastream/privateConnection:PrivateConnection::main-db-private-connection: 1 error occurred:
        * Error when reading or editing PrivateConnection: googleapi: Error 400: Resource '"projects/<internal>/locations/us-central1/privateConnections/main-db-private-connectionn"' has nested resources. If the API supports cascading delete, set 'force' to true to delete it and its nested resources.

I'm currently working around this issue by manually deleting the privateConnection resource in the console and then running pulumi up. Also see https://github.com/hashicorp/terraform-provider-google/issues/13054 for an almost identical issue on terraform.

Affected area/feature

guineveresaenger commented 6 months ago

Hi @bradley-yoo-anrok! Thank you for filing this issue. You're correct that we track upstream development and as soon as a feature lands there, we'll pull it into our next release.

bradley-yoo-anrok commented 6 months ago

Is this not an issue that exists in pulumi independent of terraform?

mikhailshilkov commented 5 months ago

Is this not an issue that exists in pulumi independent

@bradley-yoo-anrok The issue https://github.com/hashicorp/terraform-provider-google/issues/13054 that you linked above seems to be exactly this in terraform. Am I wrong? Can you expand why you asked this question?

bradley-yoo-anrok commented 5 months ago

I did not know the type of dependency that pulumi has with terraform

mikhailshilkov commented 5 months ago

Some of our providers are "bridged", which means they are based on a corresponding terraform provider with a layer/adapter on top of it. This is also the case for this provider (GCP). Therefore, a new feature needs to be implemented upstream first by Google (who maintain the terraform provider), and then we'll receive it with a version update, that we do within a few days.