Viewing docs for Defang GCP v2.4.1
published on Saturday, Jul 11, 2026 by Defang
published on Saturday, Jul 11, 2026 by Defang
Defang Providers
I want to use the Pulumi Defang GCP package (defang-gcp) in my project.
## Provider details
- Package: defang-gcp
- Version: v2.4.1
- Publisher: Defang
- Source: pulumi
- Repository: https://github.com/DefangLabs/pulumi-defang
## Documentation
The Pulumi Cloud Registry API serves canonical, up-to-date docs for this package — including private packages and every published version. Send the "Accept: text/markdown" header for clean readable content, or "application/json" for structured data.
Start at the navigation tree, which cross-links to the readme, installation guide, and per-resource docs URL template:
- https://api.pulumi.com/api/registry/packages/pulumi/defang/defang-gcp/versions/latest/nav
Returns a summary by default. The full tree can be hundreds of kB for large providers, so prefer targeted search: append "?q=<query>&depth=full" to filter by resource/function title or token (for example "?q=bucket&depth=full"). Only request the full nav without a query if you actually need to enumerate every resource.
Other endpoints:
- Overview and getting started: https://api.pulumi.com/api/registry/packages/pulumi/defang/defang-gcp/versions/latest/readme
- Installation and configuration: https://api.pulumi.com/api/registry/packages/pulumi/defang/defang-gcp/versions/latest/installation
- Per-resource/function docs: https://api.pulumi.com/api/registry/packages/pulumi/defang/defang-gcp/versions/latest/docs/{token}?lang={lang}
Replace {token} with the percent-encoded token from the nav response (for example aws:s3/bucket:Bucket).
Replace {lang} with typescript, python, go, csharp, java, or yaml.
Fetch the installation endpoint above for the correct setup steps — install instructions vary between native providers, bridged Terraform providers, and component packages.
Help me get started using this provider. Show me a complete Pulumi program that provisions a common resource, including all necessary configuration and imports.
Viewing docs for Defang GCP v2.4.1
published on Saturday, Jul 11, 2026 by Defang
published on Saturday, Jul 11, 2026 by Defang
Defang Pulumi Providers
The Pulumi Providers for Defang — Take your app from Docker Compose to a secure and scalable cloud deployment with Pulumi.
Defang ships one provider package per cloud, all with the same Compose-shaped inputs:
defang-aws— deploys to AWS (ECS Fargate, ALB, RDS, ElastiCache, …)defang-gcp— deploys to Google Cloud (Cloud Run / Compute Engine, Cloud SQL, Memorystore, …)defang-azure— deploys to Azure (Container Apps, Azure Database, Azure Cache, …)
The examples below use defang-aws; swap in the defang-gcp or defang-azure package of your language to target another cloud — the Project inputs are the same.
Example usage
You can find complete working TypeScript, Python, Go, .NET, and Yaml code samples for every cloud in the ./examples directory, and some example snippets below:
import * as pulumi from "@pulumi/pulumi";
import * as defang_aws from "@defang-io/pulumi-defang-aws";
const awsDemo = new defang_aws.Project("aws-demo", {
services: {
app: {
image: "nginx",
ports: [{
target: 80,
mode: "ingress",
appProtocol: "http",
}],
},
},
});
export const endpoints = awsDemo.endpoints;
import pulumi
import pulumi_defang_aws as defang_aws
aws_demo = defang_aws.Project("aws-demo", services={
"app": {
"image": "nginx",
"ports": [{
"target": 80,
"mode": "ingress",
"app_protocol": "http",
}],
},
})
pulumi.export("endpoints", aws_demo.endpoints)
package main
import (
defangaws "github.com/DefangLabs/pulumi-defang/sdk/v2/go/defang-aws"
"github.com/DefangLabs/pulumi-defang/sdk/v2/go/defang-aws/compose"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
awsDemo, err := defangaws.NewProject(ctx, "aws-demo", &defangaws.ProjectArgs{
Services: compose.ServiceConfigMap{
"app": &compose.ServiceConfigArgs{
Image: pulumi.String("nginx"),
Ports: compose.ServicePortConfigArray{
&compose.ServicePortConfigArgs{
Target: pulumi.Int(80),
Mode: pulumi.String("ingress"),
AppProtocol: pulumi.String("http"),
},
},
},
},
})
if err != nil {
return err
}
ctx.Export("endpoints", awsDemo.Endpoints)
return nil
})
}
using System.Collections.Generic;
using Pulumi;
using DefangAws = DefangLabs.DefangAws;
return await Deployment.RunAsync(() =>
{
var awsDemo = new DefangAws.Project("aws-demo", new()
{
Services =
{
{ "app", new DefangAws.Compose.Inputs.ServiceConfigArgs
{
Image = "nginx",
Ports = new[]
{
new DefangAws.Compose.Inputs.ServicePortConfigArgs
{
Target = 80,
Mode = "ingress",
AppProtocol = "http",
},
},
} },
},
});
return new Dictionary<string, object?>
{
["endpoints"] = awsDemo.Endpoints,
};
});
name: defang-aws-example
runtime: yaml
description: Example using defang-aws to deploy services to AWS
resources:
aws-demo:
type: defang-aws:index:Project
properties:
services:
app:
image: nginx
ports:
- target: 80
mode: ingress
appProtocol: http
outputs:
endpoints: ${aws-demo.endpoints}
Installation and Configuration
See our Installation and Configuration docs
Development
See the Contributing doc.
Viewing docs for Defang GCP v2.4.1
published on Saturday, Jul 11, 2026 by Defang
published on Saturday, Jul 11, 2026 by Defang