2023-09-19 17:28:41 +00:00
|
|
|
package main
|
|
|
|
|
|
|
|
import (
|
2023-09-19 17:52:55 +00:00
|
|
|
"antoine-roux.tk/projects/go/pulumi-library/pkg/application"
|
2023-09-19 17:28:41 +00:00
|
|
|
"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",
|
2023-10-04 22:38:19 +00:00
|
|
|
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: "/",
|
2024-10-06 22:40:51 +00:00
|
|
|
Ready: "/",
|
2023-10-04 22:38:19 +00:00
|
|
|
},
|
|
|
|
},
|
2023-09-19 17:28:41 +00:00
|
|
|
Env: map[string]string{
|
|
|
|
"version": "1.0.0",
|
|
|
|
},
|
2023-10-04 22:38:19 +00:00
|
|
|
Dns: pulumi.StringRef("pulumi-test-nginx.localdomain"),
|
2023-10-03 18:11:54 +00:00
|
|
|
AllowAllOrigin: true,
|
2023-09-19 17:28:41 +00:00
|
|
|
})
|
|
|
|
if err != nil {
|
|
|
|
return err
|
|
|
|
}
|
|
|
|
|
2023-11-18 20:51:42 +00:00
|
|
|
ctx.Export("name", nginxApplication.ApplicationName)
|
2023-09-19 17:28:41 +00:00
|
|
|
|
|
|
|
return nil
|
|
|
|
})
|
|
|
|
}
|