Viewing docs for defang v1.0.0
published on Monday, Mar 24, 2025 by Defang
published on Monday, Mar 24, 2025 by Defang
Defang Provider
I want to use the Pulumi defang package (defang) in my project.
## Provider details
- Package: defang
- Version: v1.0.0
- 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/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/versions/latest/readme
- Installation and configuration: https://api.pulumi.com/api/registry/packages/pulumi/defang/defang/versions/latest/installation
- Per-resource/function docs: https://api.pulumi.com/api/registry/packages/pulumi/defang/defang/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 v1.0.0
published on Monday, Mar 24, 2025 by Defang
published on Monday, Mar 24, 2025 by Defang
Defang Pulumi Provider
The Pulumi Provider for Defang — Take your app from Docker Compose to a secure and scalable cloud deployment with Pulumi.
Example usage
You can find complete working TypeScript, Python, Go, .NET, and Yaml code samples in the ./examples directory, and some example snippets below:
import * as pulumi from "@pulumi/pulumi";
import * as defang from "@defang-io/pulumi-defang";
const myProject = new defang.Project("myProject", {
providerID: "aws",
configPaths: ["compose.yaml"],
});
export const output = {
albArn: myProject.albArn,
etag: myProject.etag,
};
import pulumi
import pulumi_defang as defang
my_project = defang.Project("myProject",
provider_id="aws",
config_paths=["compose.yaml"])
pulumi.export("output", {
"albArn": my_project.alb_arn,
"etag": my_project.etag,
})
package main
import (
"example.com/pulumi-defang/sdk/go/defang"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
myProject, err := defang.NewProject(ctx, "myProject", &defang.ProjectArgs{
ProviderID: pulumi.String("aws"),
ConfigPaths: pulumi.StringArray{
pulumi.String("compose.yaml"),
},
})
if err != nil {
return err
}
ctx.Export("output", pulumi.StringMap{
"albArn": myProject.AlbArn,
"etag": myProject.Etag,
})
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Defang = DefangLabs.Defang;
return await Deployment.RunAsync(() =>
{
var myProject = new Defang.Project("myProject", new()
{
ProviderID = "aws",
ConfigPaths = new[]
{
"./compose.yaml",
},
});
return new Dictionary<string, object?>
{
["output"] =
{
{ "albArn", myProject.AlbArn },
{ "etag", myProject.Etag },
},
};
});
# Pulumi.yaml provider configuration file
name: configuration-example
runtime: yaml
config:
defang:Project:
providerID: aws
configPaths:
- ./compose.yaml
Installation and Configuration
See our Installation and Configuration docs
Development
See the Contributing doc.
Viewing docs for defang v1.0.0
published on Monday, Mar 24, 2025 by Defang
published on Monday, Mar 24, 2025 by Defang