pulumi-gcp: Unable to create regional cluster

@pulumi/gcp@0.18.2

export const k8sCluster = new gcp.container.Cluster('gke-cluster', {
  initialNodeCount: 1,
  nodeVersion: 'latest',
  minMasterVersion: 'latest',
  nodeConfig: {
    machineType: 'n1-standard-1',
    oauthScopes: [
      'https://www.googleapis.com/auth/compute',
      'https://www.googleapis.com/auth/devstorage.read_only',
      'https://www.googleapis.com/auth/logging.write',
      'https://www.googleapis.com/auth/monitoring',
    ],
  },

  // regional cluster
  location: 'us-central1',
  nodeLocations: ['us-central1-f', 'us-central1-b'],
})
  gcp:container:Cluster (gke-cluster):
    error: gcp:container/cluster:Cluster resource 'gke-cluster' has a problem: : invalid or unknown key: location
    error: gcp:container/cluster:Cluster resource 'gke-cluster' has a problem: : invalid or unknown key: node_locations

This should be possible based on #119

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Comments: 15 (5 by maintainers)

Most upvoted comments

Reopening because I am unable to workaround the plugin versioning.

After a rebuild with initial yarn, the plugins are confirmed good:

~/p/advisorIntake ❯❯❯ pulumi plugin ls
NAME        KIND      VERSION  SIZE   INSTALLED       LAST USED
gcp         resource  0.18.2   64 MB  54 seconds ago  now
kubernetes  resource  0.22.0   45 MB  54 seconds ago  now
random      resource  0.5.1    27 MB  54 seconds ago  now

Then I ran pulumi up on a stack with the following dependencies:

"@pulumi/gcp": "^0.18.2",
"@pulumi/kubernetes": "^0.22.0",
"@pulumi/pulumi": "^0.17.4",
"@pulumi/random": "^0.5.1"

I then notice that pulumi up installed the older gcp@0.18.0 plugin:

pulumi plugin ls
NAME        KIND      VERSION  SIZE   INSTALLED       LAST USED
gcp         resource  0.18.2   64 MB  1 minute ago    now
gcp         resource  0.18.0   64 MB  13 seconds ago  7 seconds ago
kubernetes  resource  0.22.0   45 MB  1 minute ago    now
random      resource  0.5.1    27 MB  1 minute ago    now

With the result:

error: gcp:container/cluster:Cluster resource 'production' has a problem: : invalid or unknown key: location

What is bizarre is this originally worked briefly (a few hours), then stopped working. Now I cannot use the code written for the regional cluster even after clearing plugins/rebuilding node_modules.