-
Notifications
You must be signed in to change notification settings - Fork 2
/
init.go
43 lines (35 loc) · 975 Bytes
/
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
// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
package profile
import (
"fmt"
"github.com/blang/semver"
"github.com/pulumi/pulumi-okta/sdk/v2/go/okta"
"github.com/pulumi/pulumi/sdk/v2/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 "okta:profile/mapping:Mapping":
r, err = NewMapping(ctx, name, nil, pulumi.URN_(urn))
default:
return nil, fmt.Errorf("unknown resource type: %s", typ)
}
return
}
func init() {
version, err := okta.PkgVersion()
if err != nil {
fmt.Println("failed to determine package version. defaulting to v1: %v", err)
}
pulumi.RegisterResourceModule(
"okta",
"profile/mapping",
&module{version},
)
}