This repository has been archived by the owner on Aug 15, 2022. It is now read-only.
generated from pulumi/pulumi-tf-provider-boilerplate
/
init.go
86 lines (78 loc) · 1.79 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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
// 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 cls
import (
"fmt"
"github.com/blang/semver"
"github.com/pulumi/pulumi-tctest/sdk/go/tctest"
"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 "tctest:Cls/config:Config":
r = &Config{}
case "tctest:Cls/configAttachment:ConfigAttachment":
r = &ConfigAttachment{}
case "tctest:Cls/configExtra:ConfigExtra":
r = &ConfigExtra{}
case "tctest:Cls/cosShipper:CosShipper":
r = &CosShipper{}
case "tctest:Cls/logset:Logset":
r = &Logset{}
case "tctest:Cls/machineGroup:MachineGroup":
r = &MachineGroup{}
case "tctest:Cls/topic:Topic":
r = &Topic{}
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 := tctest.PkgVersion()
if err != nil {
version = semver.Version{Major: 1}
}
pulumi.RegisterResourceModule(
"tctest",
"Cls/config",
&module{version},
)
pulumi.RegisterResourceModule(
"tctest",
"Cls/configAttachment",
&module{version},
)
pulumi.RegisterResourceModule(
"tctest",
"Cls/configExtra",
&module{version},
)
pulumi.RegisterResourceModule(
"tctest",
"Cls/cosShipper",
&module{version},
)
pulumi.RegisterResourceModule(
"tctest",
"Cls/logset",
&module{version},
)
pulumi.RegisterResourceModule(
"tctest",
"Cls/machineGroup",
&module{version},
)
pulumi.RegisterResourceModule(
"tctest",
"Cls/topic",
&module{version},
)
}