pulumi-library/main.go

39 lines
762 B
Go
Raw Normal View History

package main
import (
"antoine-roux.tk/projects/go/pulumi-library/pkg/application"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
nginxApplication, err := application.NewApplication(ctx, &application.Configuration{
Name: "nginx",
Namespace: "pulumi-test",
Images: []application.ImagesConfiguration{
{
Image: "nginx",
},
{
2023-10-22 15:52:04 +00:00
Image: "nginx",
Path: "/api",
2023-10-05 22:23:14 +00:00
Health: "/",
},
},
Env: map[string]string{
"version": "1.0.0",
},
Dns: pulumi.StringRef("pulumi-test-nginx.localdomain"),
AllowAllOrigin: true,
})
if err != nil {
return err
}
2023-11-18 20:51:42 +00:00
ctx.Export("name", nginxApplication.ApplicationName)
return nil
})
}