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