happyDomain/main.go

45 lines
1.0 KiB
Go
Raw Permalink Normal View History

2024-10-04 17:18:57 +00:00
package main
import (
"github.com/pulumi/pulumi-oci/sdk/go/oci/identity"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
ocicfg := config.New(ctx, "oci")
// My Compartment
compartment, err := identity.NewCompartment(ctx, "compartment", &identity.CompartmentArgs{
Name: pulumi.Sprintf("%s-happydomain-compartment", ctx.Stack()),
Description: pulumi.String("Compartment for happyDomain"),
})
if err != nil {
return err
}
ns, listmonkAuthToken, err := setupListmonkStorage(ctx, ocicfg, compartment)
if err != nil {
return err
}
pemprvkey, smtpcreds, err := setupEmails(ctx, ocicfg, compartment)
if err != nil {
return err
}
subnet, err := setupNetwork(ctx, compartment)
if err != nil {
return err
}
err = setupHostMain(ctx, ocicfg, compartment, ns, subnet, listmonkAuthToken, smtpcreds, pemprvkey)
2024-10-04 17:18:57 +00:00
if err != nil {
return err
}
return nil
})
}