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:
{{< chooser language "typescript,python,go,dotnet,yaml" >}} {{% choosable language typescript %}}
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,
};
{{% /choosable %}}
{{% choosable language python %}}
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,
})
{{% /choosable %}}
{{% choosable language go %}}
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
})
}
{{% /choosable %}}
{{% choosable language dotnet %}}
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 },
},
};
});
{{% /choosable %}}
{{% choosable language yaml %}}
# Pulumi.yaml provider configuration file
name: configuration-example
runtime: yaml
config:
defang:Project:
providerID: aws
configPaths:
- ./compose.yaml
{{% /choosable %}} {{< /chooser >}}
Installation and Configuration
See our Installation and Configuration docs
Development
See the Contributing doc.
Metadata
Release files for pulumi-defang 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| pulumi_defang-1.0.0.tar.gz | 9.5 kB | Details |
Release files / pulumi_defang-1.0.0.tar.gz
| Download URL | pulumi_defang-1.0.0.tar.gz |
|---|---|
| Size | 9.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
72dad0e60cedcdc21b1beea5fc16b9bf658162813353264c1c11aad7b9f83d72
|
|
BLAKE2b-256 checksum How to use checksums |
8ef5f86f8254cef9bf1cf34fdd8c8baf936eed8f9a4000e2c5290673b8b931c3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|