Take your app from Docker Compose to a secure and scalable cloud deployment with Pulumi.
Project description
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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file pulumi_defang-1.0.0.tar.gz
.
File metadata
- Download URL: pulumi_defang-1.0.0.tar.gz
- Upload date:
- Size: 9.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 72dad0e60cedcdc21b1beea5fc16b9bf658162813353264c1c11aad7b9f83d72 |
|
MD5 | 31be59693ed1a76cb7c005bf07327cd3 |
|
BLAKE2b-256 | 8ef5f86f8254cef9bf1cf34fdd8c8baf936eed8f9a4000e2c5290673b8b931c3 |