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

container.Cluster (GKE): removing privateClusterConfig does not show a diff #1072

Open jkodroff opened 1 year ago

jkodroff commented 1 year ago

What happened?

Removing the privateConfig block from a deployed GKE cluster does not show a diff on update.

Expected Behavior

Should show a diff, I'm assuming. Couldn't swear to it, since I'm not a GKE expert by any means.

Steps to reproduce

  1. pulumi new kubernetes-gcp-typescript
  2. pulumi up
  3. Remove the privateClusterConfig block
  4. pulumi preview <-- No diff

Output of pulumi about

CLI          
Version      3.64.0
Go Version   go1.20.3
Go Compiler  gc

Plugins
NAME    VERSION
gcp     6.39.0
nodejs  unknown

Host     
OS       darwin
Version  13.3.1
Arch     arm64

This project is written in nodejs: executable='/opt/homebrew/bin/node' version='v19.5.0'

Current Stack: jkodrofftest/gke-private-config-bug/dev

TYPE                                URN
pulumi:pulumi:Stack                 urn:pulumi:dev::gke-private-config-bug::pulumi:pulumi:Stack::gke-private-config-bug-dev
pulumi:providers:gcp                urn:pulumi:dev::gke-private-config-bug::pulumi:providers:gcp::default_6_39_0
gcp:compute/network:Network         urn:pulumi:dev::gke-private-config-bug::gcp:compute/network:Network::gke-network
gcp:compute/subnetwork:Subnetwork   urn:pulumi:dev::gke-private-config-bug::gcp:compute/subnetwork:Subnetwork::gke-subnet
gcp:container/cluster:Cluster       urn:pulumi:dev::gke-private-config-bug::gcp:container/cluster:Cluster::gke-cluster
gcp:serviceAccount/account:Account  urn:pulumi:dev::gke-private-config-bug::gcp:serviceAccount/account:Account::gke-nodepool-sa
gcp:container/nodePool:NodePool     urn:pulumi:dev::gke-private-config-bug::gcp:container/nodePool:NodePool::gke-nodepool

Found no pending operations associated with dev

Backend        
Name           pulumi.com
URL            https://app.pulumi.com/jkodroff
User           jkodroff
Organizations  jkodroff, jkodrofftest, zephyr, demo, pulumi

Dependencies:
NAME            VERSION
@pulumi/gcp     6.39.0
@pulumi/pulumi  3.65.0
@types/node     16.18.25
typescript      4.9.5

Pulumi locates its logs in /var/folders/5m/4n1x3f8151s35wc80w06z5k80000gn/T/ by default

Additional context

No response

Contributing

Vote on this issue by adding a 👍 reaction. To contribute a fix for this issue, leave a comment (and link to your pull request, if you've opened one already).

rquitales commented 1 year ago

@jkodroff I don't believe we have a privateConfig field for GKE clusters. Do you mean privateClusterConfig? If so, then yes, we should be expecting this in a diff if that block is removed.

rquitales commented 1 year ago

Nevermind, I see in the title that you do mean privateClusterConfig. Could you also provide a code snippet so I can see how you're defining your GKE cluster?

jkodroff commented 1 year ago

@rquitales Sorry, that was an oversight! (Was creating this issue while trying to work on workshop material on a short deadline.)

Steps to repo:

  1. pulumi new kubernetes-gcp-typescript
  2. pulumi up
  3. Delete these lines (privateClusterConfig block): https://github.com/pulumi/templates/blob/master/kubernetes-gcp-typescript/index.ts#L51-L55
  4. pulumi up -> no diff