forked from cloud-toolkit/cloud-toolkit-aws
/
certManager.go
206 lines (161 loc) · 6.75 KB
/
certManager.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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
// Code generated by Pulumi SDK Generator DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package kubernetes
import (
"context"
"reflect"
"github.com/pkg/errors"
"github.com/pulumi/pulumi-kubernetes/sdk/v3/go/kubernetes/apiextensions"
corev1 "github.com/pulumi/pulumi-kubernetes/sdk/v3/go/kubernetes/core/v1"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
type CertManager struct {
pulumi.ResourceState
// The ArgoCD Application to deploy the component.
Application apiextensions.CustomResourceOutput `pulumi:"application"`
// The IAM roles for service accounts.
Irsa IrsaOutput `pulumi:"irsa"`
// The Namespace used to deploy the component.
Namespace corev1.NamespaceOutput `pulumi:"namespace"`
}
// NewCertManager registers a new resource with the given unique name, arguments, and options.
func NewCertManager(ctx *pulumi.Context,
name string, args *CertManagerArgs, opts ...pulumi.ResourceOption) (*CertManager, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.ZoneArns == nil {
return nil, errors.New("invalid value for required argument 'ZoneArns'")
}
opts = pkgResourceDefaultOpts(opts)
var resource CertManager
err := ctx.RegisterRemoteComponentResource("cloud-toolkit-aws:kubernetes:CertManager", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
type certManagerArgs struct {
// The list of DNS Zone arn to be used by CertManager.
ZoneArns []string `pulumi:"zoneArns"`
}
// The set of arguments for constructing a CertManager resource.
type CertManagerArgs struct {
// The list of DNS Zone arn to be used by CertManager.
ZoneArns pulumi.StringArrayInput
}
func (CertManagerArgs) ElementType() reflect.Type {
return reflect.TypeOf((*certManagerArgs)(nil)).Elem()
}
type CertManagerInput interface {
pulumi.Input
ToCertManagerOutput() CertManagerOutput
ToCertManagerOutputWithContext(ctx context.Context) CertManagerOutput
}
func (*CertManager) ElementType() reflect.Type {
return reflect.TypeOf((**CertManager)(nil)).Elem()
}
func (i *CertManager) ToCertManagerOutput() CertManagerOutput {
return i.ToCertManagerOutputWithContext(context.Background())
}
func (i *CertManager) ToCertManagerOutputWithContext(ctx context.Context) CertManagerOutput {
return pulumi.ToOutputWithContext(ctx, i).(CertManagerOutput)
}
// CertManagerArrayInput is an input type that accepts CertManagerArray and CertManagerArrayOutput values.
// You can construct a concrete instance of `CertManagerArrayInput` via:
//
// CertManagerArray{ CertManagerArgs{...} }
type CertManagerArrayInput interface {
pulumi.Input
ToCertManagerArrayOutput() CertManagerArrayOutput
ToCertManagerArrayOutputWithContext(context.Context) CertManagerArrayOutput
}
type CertManagerArray []CertManagerInput
func (CertManagerArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*CertManager)(nil)).Elem()
}
func (i CertManagerArray) ToCertManagerArrayOutput() CertManagerArrayOutput {
return i.ToCertManagerArrayOutputWithContext(context.Background())
}
func (i CertManagerArray) ToCertManagerArrayOutputWithContext(ctx context.Context) CertManagerArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(CertManagerArrayOutput)
}
// CertManagerMapInput is an input type that accepts CertManagerMap and CertManagerMapOutput values.
// You can construct a concrete instance of `CertManagerMapInput` via:
//
// CertManagerMap{ "key": CertManagerArgs{...} }
type CertManagerMapInput interface {
pulumi.Input
ToCertManagerMapOutput() CertManagerMapOutput
ToCertManagerMapOutputWithContext(context.Context) CertManagerMapOutput
}
type CertManagerMap map[string]CertManagerInput
func (CertManagerMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*CertManager)(nil)).Elem()
}
func (i CertManagerMap) ToCertManagerMapOutput() CertManagerMapOutput {
return i.ToCertManagerMapOutputWithContext(context.Background())
}
func (i CertManagerMap) ToCertManagerMapOutputWithContext(ctx context.Context) CertManagerMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(CertManagerMapOutput)
}
type CertManagerOutput struct{ *pulumi.OutputState }
func (CertManagerOutput) ElementType() reflect.Type {
return reflect.TypeOf((**CertManager)(nil)).Elem()
}
func (o CertManagerOutput) ToCertManagerOutput() CertManagerOutput {
return o
}
func (o CertManagerOutput) ToCertManagerOutputWithContext(ctx context.Context) CertManagerOutput {
return o
}
// The ArgoCD Application to deploy the component.
func (o CertManagerOutput) Application() apiextensions.CustomResourceOutput {
return o.ApplyT(func(v *CertManager) apiextensions.CustomResourceOutput { return v.Application }).(apiextensions.CustomResourceOutput)
}
// The IAM roles for service accounts.
func (o CertManagerOutput) Irsa() IrsaOutput {
return o.ApplyT(func(v *CertManager) IrsaOutput { return v.Irsa }).(IrsaOutput)
}
// The Namespace used to deploy the component.
func (o CertManagerOutput) Namespace() corev1.NamespaceOutput {
return o.ApplyT(func(v *CertManager) corev1.NamespaceOutput { return v.Namespace }).(corev1.NamespaceOutput)
}
type CertManagerArrayOutput struct{ *pulumi.OutputState }
func (CertManagerArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*CertManager)(nil)).Elem()
}
func (o CertManagerArrayOutput) ToCertManagerArrayOutput() CertManagerArrayOutput {
return o
}
func (o CertManagerArrayOutput) ToCertManagerArrayOutputWithContext(ctx context.Context) CertManagerArrayOutput {
return o
}
func (o CertManagerArrayOutput) Index(i pulumi.IntInput) CertManagerOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *CertManager {
return vs[0].([]*CertManager)[vs[1].(int)]
}).(CertManagerOutput)
}
type CertManagerMapOutput struct{ *pulumi.OutputState }
func (CertManagerMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*CertManager)(nil)).Elem()
}
func (o CertManagerMapOutput) ToCertManagerMapOutput() CertManagerMapOutput {
return o
}
func (o CertManagerMapOutput) ToCertManagerMapOutputWithContext(ctx context.Context) CertManagerMapOutput {
return o
}
func (o CertManagerMapOutput) MapIndex(k pulumi.StringInput) CertManagerOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *CertManager {
return vs[0].(map[string]*CertManager)[vs[1].(string)]
}).(CertManagerOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*CertManagerInput)(nil)).Elem(), &CertManager{})
pulumi.RegisterInputType(reflect.TypeOf((*CertManagerArrayInput)(nil)).Elem(), CertManagerArray{})
pulumi.RegisterInputType(reflect.TypeOf((*CertManagerMapInput)(nil)).Elem(), CertManagerMap{})
pulumi.RegisterOutputType(CertManagerOutput{})
pulumi.RegisterOutputType(CertManagerArrayOutput{})
pulumi.RegisterOutputType(CertManagerMapOutput{})
}