Google Cloud (GCP) Classic
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
Pulumi has a new Google Cloud provider: the Pulumi Google Native Provider. Google Native gives you same-day access to all new Google Cloud resources.
Consider trying Google Native if you need Google Cloud resources that aren’t available in this provider.
Example
const gcp = require("@pulumi/gcp")
const bucket = new gcp.storage.Bucket("my-bucket");
import * as gcp from "@pulumi/gcp";
const bucket = new gcp.storage.Bucket("my-bucket");
from pulumi_gcp import storage
bucket = storage.Bucket('my-bucket')
import (
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/pulumi/pulumi-gcp/sdk/v5/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
})
}
using System.Threading.Tasks;
using Pulumi;
using Pulumi.Gcp;
class Program
{
static Task Main() =>
Deployment.Run(() => {
var bucket = new Gcp.Storage.Bucket("my-bucket");
});
}
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());
}
}
resources:
my-bucket:
type: gcp:storage:Bucket
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.