1. Packages
  2. Google Cloud (GCP) Classic
  3. How-to Guides
  4. GCP Instance
Google Cloud Classic v8.3.1 published on Wednesday, Sep 25, 2024 by Pulumi

GCP Instance

gcp logo
Google Cloud Classic v8.3.1 published on Wednesday, Sep 25, 2024 by Pulumi

    View Code Deploy this example with Pulumi

    Create a GCP instance using Pulumi + Go.

    Running the App

    1. Create a new stack:

      $ pulumi stack init gcp-instance
      
    2. Configure the project:

      $ pulumi config set gcp:project YOURGOOGLECLOUDPROJECT
      $ pulumi config set gcp:zone us-central1-a
      
    3. Run pulumi up to preview and deploy changes:

      $ pulumi up
      Previewing update (gcp-instance):
      ...
      
      Updating (gcp-instance):
          Type                     Name       Status
      +   pulumi:pulumi:Stack      gcp-instance  created
      +   └─ gcp:compute:Instance  instance   created
      
      Outputs:
          instanceName: "instance-6beb431"
      
      Resources:
          + 2 created
      
      Duration: 23s
      
    4. Cleanup

      $ pulumi destroy
      $ pulumi stack rm
      
    gcp logo
    Google Cloud Classic v8.3.1 published on Wednesday, Sep 25, 2024 by Pulumi