-
Notifications
You must be signed in to change notification settings - Fork 50
/
init.go
51 lines (43 loc) · 1.1 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
// Code generated by the Pulumi Terraform Bridge (tfgen) Tool DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package role
import (
"fmt"
"github.com/blang/semver"
"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/internal"
"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:role/assignment:Assignment":
r = &Assignment{}
case "azure:role/definition:Definition":
r = &Definition{}
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 := internal.PkgVersion()
if err != nil {
version = semver.Version{Major: 1}
}
pulumi.RegisterResourceModule(
"azure",
"role/assignment",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"role/definition",
&module{version},
)
}