forked from pulumi/pulumi-azure-native-sdk
-
Notifications
You must be signed in to change notification settings - Fork 0
/
init.go
62 lines (54 loc) · 1.59 KB
/
init.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
// Code generated by the Pulumi SDK Generator DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package dbforpostgresql
import (
"fmt"
"github.com/blang/semver"
"github.com/pulumi/pulumi-azure-native-sdk/v2/utilities"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
type module struct {
version semver.Version
}
func (m *module) Version() semver.Version {
return m.version
}
func (m *module) Construct(ctx *pulumi.Context, name, typ, urn string) (r pulumi.Resource, err error) {
switch typ {
case "azure-native:dbforpostgresql:Administrator":
r = &Administrator{}
case "azure-native:dbforpostgresql:Cluster":
r = &Cluster{}
case "azure-native:dbforpostgresql:Configuration":
r = &Configuration{}
case "azure-native:dbforpostgresql:Database":
r = &Database{}
case "azure-native:dbforpostgresql:FirewallRule":
r = &FirewallRule{}
case "azure-native:dbforpostgresql:Migration":
r = &Migration{}
case "azure-native:dbforpostgresql:PrivateEndpointConnection":
r = &PrivateEndpointConnection{}
case "azure-native:dbforpostgresql:Role":
r = &Role{}
case "azure-native:dbforpostgresql:Server":
r = &Server{}
case "azure-native:dbforpostgresql:VirtualEndpoint":
r = &VirtualEndpoint{}
default:
return nil, fmt.Errorf("unknown resource type: %s", typ)
}
err = ctx.RegisterResource(typ, name, nil, r, pulumi.URN_(urn))
return
}
func init() {
version, err := utilities.PkgVersion()
if err != nil {
version = semver.Version{Major: 1}
}
pulumi.RegisterResourceModule(
"azure-native",
"dbforpostgresql",
&module{version},
)
}