https://pulumi.com logo
#typescript
Title
# typescript
v

victorious-vase-44805

05/28/2020, 8:56 AM
Morning all, does anyone have any idea how to access the Nat IP of a newly created Google Compute instance?
Copy code
let instance = new gcp.compute.Instance(instanceName, {
    bootDisk: {
      initializeParams: {
        image: "projects/centos-cloud/global/images/centos-7-v20200521"
      }
    },
    machineType: "n1-standard-2",
    networkInterfaces: [
      {
        accessConfigs: [{
          networkTier: "STANDARD",
        }],
        network: "default",
      },
    ]
  }, { dependsOn: dependsOn })
I unfortunately for the life of me can’t work out how to do it.
g

green-school-95910

05/28/2020, 10:56 AM
Ephemeral ips are not assigned upon instance creation, but on (re)start.
If you need to use the IP directly, make a static IP and set it on the VM NAT