1. Packages
  2. Google Cloud (GCP) Classic
Google Cloud v8.27.0 published on Thursday, Apr 17, 2025 by Pulumi

Google Cloud (GCP) Classic

Google Cloud v8.27.0 published on Thursday, Apr 17, 2025 by Pulumi

The Google Cloud Platform (GCP) provider for Pulumi can provision many of the cloud resources available in Google Cloud.

The GCP provider must be configured with credentials to deploy and update resources in Google Cloud; see Installation & Configuration for instructions.

New to Pulumi and Google Cloud? Get started with Google Cloud using our tutorial

Example

const gcp = require("@pulumi/gcp")

const bucket = new gcp.storage.Bucket("my-bucket");
Copy
import * as gcp from "@pulumi/gcp";

const bucket = new gcp.storage.Bucket("my-bucket");
Copy
from pulumi_gcp import storage

bucket = storage.Bucket('my-bucket')
Copy
import (
    "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    "github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/storage"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		bucket, err := storage.NewBucket(ctx, "my-bucket", nil)
		if err != nil {
			return err
		}

		return nil
	})
}
Copy
using Pulumi;
using Gcp = Pulumi.Gcp;

await Deployment.RunAsync(() =>
{
    var bucket = new Gcp.Storage.Bucket("my-bucket");
});
Copy
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.gcp.storage.Bucket;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    private static void stack(Context ctx) {
        final var bucket = new Bucket("my-bucket");
		ctx.export("bucketName", bucket.name());
	}
}
Copy
resources:
  my-bucket:
    type: gcp:storage:Bucket
Copy

Visit the How-to Guides to find step-by-step guides for specific scenarios like creating a serverless application using Google Cloud Functions or setting up a Google Kubernetes Engine (GKE) cluster.

Google Cloud v8.27.0 published on Thursday, Apr 17, 2025 by Pulumi