I’m using pulumi to manage gke cluster but everyti...
# general
b
I’m using pulumi to manage gke cluster but everytime I’m doing a
pulumi up
it replaces all my nodepools (although nothing changed). The diff says
~nodeConfig
. Any way to find out what the diff is?
I found a bug (https://github.com/pulumi/pulumi-gcp/issues/164) about labels, but my labels haven’t changed
the code looks like this
Copy code
config.nodePools.forEach(nodePool => {
            // create nodepool config
            let nodeConfig: NodeConfig = {
                machineType: nodePool.nodeMachineType,
                metadata: {
                    "disable-legacy-endpoints": "true",
                },
                oauthScopes: [
                    "<https://www.googleapis.com/auth/logging.write>",
                    "<https://www.googleapis.com/auth/monitoring>",
                    "<https://www.googleapis.com/auth/devstorage.read_only>",
                    "<https://www.googleapis.com/auth/compute>",
                ],
                labels: {
                    "nodePoolName": nodePool.name
                },
[...]
b
Can you grab an output of the diff before it replaces?
b
it seems to be this one:
Copy code
+-gcp:container/nodePool:NodePool: (replace)
            [id=us-east1-b/abc-test-7ec6217/infra-abc-test-03558e5]
            [urn=urn:pulumi:us-east1::abc-poc-gcp::abc:gke$gcp:container/nodePool:NodePool::infra-abc-test]
            [provider=urn:pulumi:us-east1::abc-poc-gcp::pulumi:providers:gcp::default_1_2_0::d344c95f-ca80-4bbe-b0a1-2226f8b6edd6]
          ~ nodeConfig: {
              - workloadMetadataConfig: {
                  - nodeMetadata: "GKE_METADATA_SERVER"
                }
            }
for the record, after adding the workloadMetadaConfig to the code it worked