Add beta hosting on eu-zurich-1
This commit is contained in:
parent
176f979485
commit
ab9c708228
4 changed files with 456 additions and 23 deletions
66
main.go
66
main.go
|
|
@ -10,33 +10,53 @@ 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
|
||||
}
|
||||
if ocicfg.Require("region") == "uk-london-1" {
|
||||
// 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
|
||||
}
|
||||
ns, listmonkAuthToken, err := setupListmonkStorage(ctx, ocicfg, compartment)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
pemprvkey, smtpcreds, err := setupEmails(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
|
||||
}
|
||||
subnet, err := setupNetwork(ctx, compartment)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
err = setupHostMain(ctx, ocicfg, compartment, ns, subnet, listmonkAuthToken, smtpcreds, pemprvkey)
|
||||
if err != nil {
|
||||
return err
|
||||
err = setupHostMain(ctx, ocicfg, compartment, ns, subnet, listmonkAuthToken, smtpcreds, pemprvkey)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
} else if ocicfg.Require("region") == "eu-zurich-1" {
|
||||
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
|
||||
}
|
||||
|
||||
subnet, err := setupNetwork(ctx, compartment)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
err = setupHostBeta(ctx, ocicfg, compartment, subnet)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
return nil
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue