generated from pulumi/pulumi-component-provider-go-boilerplate
/
kubeControllerManagerInstall.go
287 lines (233 loc) · 12.3 KB
/
kubeControllerManagerInstall.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
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
// Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package remote
import (
"context"
"reflect"
"errors"
pulumiCommand "github.com/pulumi/pulumi-command/sdk/go/command/remote"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/unstoppablemango/pulumi-kubernetes-the-hard-way/sdk/go/kubernetes-the-hard-way/internal"
"github.com/unstoppablemango/pulumi-kubernetes-the-hard-way/sdk/go/kubernetes-the-hard-way/tools"
)
// Installs kube-controller-manager on a remote system.
type KubeControllerManagerInstall struct {
pulumi.ResourceState
// The CPU architecture to install.
Architecture ArchitectureOutput `pulumi:"architecture"`
// The name of the installed binary.
BinName pulumi.StringPtrOutput `pulumi:"binName"`
// The parameters with which to connect to the remote host.
Connection pulumiCommand.ConnectionOutput `pulumi:"connection"`
// The directory to install the binary to.
Directory pulumi.StringOutput `pulumi:"directory"`
// The download operation.
Download DownloadOutput `pulumi:"download"`
// The mkdir operation.
Mkdir tools.MkdirOutput `pulumi:"mkdir"`
// The mktemp operation.
Mktemp tools.MktempOutput `pulumi:"mktemp"`
// The mv operation.
Mv tools.MvOutput `pulumi:"mv"`
// The path to the installed binary.
Path pulumi.StringOutput `pulumi:"path"`
// The rm operation.
Rm tools.RmOutput `pulumi:"rm"`
// The url used to download the binary.
Url pulumi.StringOutput `pulumi:"url"`
// The version to install.
Version pulumi.StringOutput `pulumi:"version"`
}
// NewKubeControllerManagerInstall registers a new resource with the given unique name, arguments, and options.
func NewKubeControllerManagerInstall(ctx *pulumi.Context,
name string, args *KubeControllerManagerInstallArgs, opts ...pulumi.ResourceOption) (*KubeControllerManagerInstall, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.Connection == nil {
return nil, errors.New("invalid value for required argument 'Connection'")
}
args.Connection = args.Connection.ToConnectionOutput().ApplyT(func(v pulumiCommand.Connection) pulumiCommand.Connection { return *v.Defaults() }).(pulumiCommand.ConnectionOutput)
if args.Directory == nil {
args.Directory = pulumi.StringPtr("/usr/local/bin")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource KubeControllerManagerInstall
err := ctx.RegisterRemoteComponentResource("kubernetes-the-hard-way:remote:KubeControllerManagerInstall", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
type kubeControllerManagerInstallArgs struct {
// The CPU architecture to install.
Architecture *Architecture `pulumi:"architecture"`
// The parameters with which to connect to the remote host.
Connection pulumiCommand.Connection `pulumi:"connection"`
// The directory to install the binary to.
Directory *string `pulumi:"directory"`
// The version to install.
Version *string `pulumi:"version"`
}
// The set of arguments for constructing a KubeControllerManagerInstall resource.
type KubeControllerManagerInstallArgs struct {
// The CPU architecture to install.
Architecture ArchitecturePtrInput
// The parameters with which to connect to the remote host.
Connection pulumiCommand.ConnectionInput
// The directory to install the binary to.
Directory pulumi.StringPtrInput
// The version to install.
Version pulumi.StringPtrInput
}
func (KubeControllerManagerInstallArgs) ElementType() reflect.Type {
return reflect.TypeOf((*kubeControllerManagerInstallArgs)(nil)).Elem()
}
type KubeControllerManagerInstallInput interface {
pulumi.Input
ToKubeControllerManagerInstallOutput() KubeControllerManagerInstallOutput
ToKubeControllerManagerInstallOutputWithContext(ctx context.Context) KubeControllerManagerInstallOutput
}
func (*KubeControllerManagerInstall) ElementType() reflect.Type {
return reflect.TypeOf((**KubeControllerManagerInstall)(nil)).Elem()
}
func (i *KubeControllerManagerInstall) ToKubeControllerManagerInstallOutput() KubeControllerManagerInstallOutput {
return i.ToKubeControllerManagerInstallOutputWithContext(context.Background())
}
func (i *KubeControllerManagerInstall) ToKubeControllerManagerInstallOutputWithContext(ctx context.Context) KubeControllerManagerInstallOutput {
return pulumi.ToOutputWithContext(ctx, i).(KubeControllerManagerInstallOutput)
}
// KubeControllerManagerInstallArrayInput is an input type that accepts KubeControllerManagerInstallArray and KubeControllerManagerInstallArrayOutput values.
// You can construct a concrete instance of `KubeControllerManagerInstallArrayInput` via:
//
// KubeControllerManagerInstallArray{ KubeControllerManagerInstallArgs{...} }
type KubeControllerManagerInstallArrayInput interface {
pulumi.Input
ToKubeControllerManagerInstallArrayOutput() KubeControllerManagerInstallArrayOutput
ToKubeControllerManagerInstallArrayOutputWithContext(context.Context) KubeControllerManagerInstallArrayOutput
}
type KubeControllerManagerInstallArray []KubeControllerManagerInstallInput
func (KubeControllerManagerInstallArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*KubeControllerManagerInstall)(nil)).Elem()
}
func (i KubeControllerManagerInstallArray) ToKubeControllerManagerInstallArrayOutput() KubeControllerManagerInstallArrayOutput {
return i.ToKubeControllerManagerInstallArrayOutputWithContext(context.Background())
}
func (i KubeControllerManagerInstallArray) ToKubeControllerManagerInstallArrayOutputWithContext(ctx context.Context) KubeControllerManagerInstallArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(KubeControllerManagerInstallArrayOutput)
}
// KubeControllerManagerInstallMapInput is an input type that accepts KubeControllerManagerInstallMap and KubeControllerManagerInstallMapOutput values.
// You can construct a concrete instance of `KubeControllerManagerInstallMapInput` via:
//
// KubeControllerManagerInstallMap{ "key": KubeControllerManagerInstallArgs{...} }
type KubeControllerManagerInstallMapInput interface {
pulumi.Input
ToKubeControllerManagerInstallMapOutput() KubeControllerManagerInstallMapOutput
ToKubeControllerManagerInstallMapOutputWithContext(context.Context) KubeControllerManagerInstallMapOutput
}
type KubeControllerManagerInstallMap map[string]KubeControllerManagerInstallInput
func (KubeControllerManagerInstallMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*KubeControllerManagerInstall)(nil)).Elem()
}
func (i KubeControllerManagerInstallMap) ToKubeControllerManagerInstallMapOutput() KubeControllerManagerInstallMapOutput {
return i.ToKubeControllerManagerInstallMapOutputWithContext(context.Background())
}
func (i KubeControllerManagerInstallMap) ToKubeControllerManagerInstallMapOutputWithContext(ctx context.Context) KubeControllerManagerInstallMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(KubeControllerManagerInstallMapOutput)
}
type KubeControllerManagerInstallOutput struct{ *pulumi.OutputState }
func (KubeControllerManagerInstallOutput) ElementType() reflect.Type {
return reflect.TypeOf((**KubeControllerManagerInstall)(nil)).Elem()
}
func (o KubeControllerManagerInstallOutput) ToKubeControllerManagerInstallOutput() KubeControllerManagerInstallOutput {
return o
}
func (o KubeControllerManagerInstallOutput) ToKubeControllerManagerInstallOutputWithContext(ctx context.Context) KubeControllerManagerInstallOutput {
return o
}
// The CPU architecture to install.
func (o KubeControllerManagerInstallOutput) Architecture() ArchitectureOutput {
return o.ApplyT(func(v *KubeControllerManagerInstall) ArchitectureOutput { return v.Architecture }).(ArchitectureOutput)
}
// The name of the installed binary.
func (o KubeControllerManagerInstallOutput) BinName() pulumi.StringPtrOutput {
return o.ApplyT(func(v *KubeControllerManagerInstall) pulumi.StringPtrOutput { return v.BinName }).(pulumi.StringPtrOutput)
}
// The parameters with which to connect to the remote host.
func (o KubeControllerManagerInstallOutput) Connection() pulumiCommand.ConnectionOutput {
return o.ApplyT(func(v *KubeControllerManagerInstall) pulumiCommand.ConnectionOutput { return v.Connection }).(pulumiCommand.ConnectionOutput)
}
// The directory to install the binary to.
func (o KubeControllerManagerInstallOutput) Directory() pulumi.StringOutput {
return o.ApplyT(func(v *KubeControllerManagerInstall) pulumi.StringOutput { return v.Directory }).(pulumi.StringOutput)
}
// The download operation.
func (o KubeControllerManagerInstallOutput) Download() DownloadOutput {
return o.ApplyT(func(v *KubeControllerManagerInstall) DownloadOutput { return v.Download }).(DownloadOutput)
}
// The mkdir operation.
func (o KubeControllerManagerInstallOutput) Mkdir() tools.MkdirOutput {
return o.ApplyT(func(v *KubeControllerManagerInstall) tools.MkdirOutput { return v.Mkdir }).(tools.MkdirOutput)
}
// The mktemp operation.
func (o KubeControllerManagerInstallOutput) Mktemp() tools.MktempOutput {
return o.ApplyT(func(v *KubeControllerManagerInstall) tools.MktempOutput { return v.Mktemp }).(tools.MktempOutput)
}
// The mv operation.
func (o KubeControllerManagerInstallOutput) Mv() tools.MvOutput {
return o.ApplyT(func(v *KubeControllerManagerInstall) tools.MvOutput { return v.Mv }).(tools.MvOutput)
}
// The path to the installed binary.
func (o KubeControllerManagerInstallOutput) Path() pulumi.StringOutput {
return o.ApplyT(func(v *KubeControllerManagerInstall) pulumi.StringOutput { return v.Path }).(pulumi.StringOutput)
}
// The rm operation.
func (o KubeControllerManagerInstallOutput) Rm() tools.RmOutput {
return o.ApplyT(func(v *KubeControllerManagerInstall) tools.RmOutput { return v.Rm }).(tools.RmOutput)
}
// The url used to download the binary.
func (o KubeControllerManagerInstallOutput) Url() pulumi.StringOutput {
return o.ApplyT(func(v *KubeControllerManagerInstall) pulumi.StringOutput { return v.Url }).(pulumi.StringOutput)
}
// The version to install.
func (o KubeControllerManagerInstallOutput) Version() pulumi.StringOutput {
return o.ApplyT(func(v *KubeControllerManagerInstall) pulumi.StringOutput { return v.Version }).(pulumi.StringOutput)
}
type KubeControllerManagerInstallArrayOutput struct{ *pulumi.OutputState }
func (KubeControllerManagerInstallArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*KubeControllerManagerInstall)(nil)).Elem()
}
func (o KubeControllerManagerInstallArrayOutput) ToKubeControllerManagerInstallArrayOutput() KubeControllerManagerInstallArrayOutput {
return o
}
func (o KubeControllerManagerInstallArrayOutput) ToKubeControllerManagerInstallArrayOutputWithContext(ctx context.Context) KubeControllerManagerInstallArrayOutput {
return o
}
func (o KubeControllerManagerInstallArrayOutput) Index(i pulumi.IntInput) KubeControllerManagerInstallOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *KubeControllerManagerInstall {
return vs[0].([]*KubeControllerManagerInstall)[vs[1].(int)]
}).(KubeControllerManagerInstallOutput)
}
type KubeControllerManagerInstallMapOutput struct{ *pulumi.OutputState }
func (KubeControllerManagerInstallMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*KubeControllerManagerInstall)(nil)).Elem()
}
func (o KubeControllerManagerInstallMapOutput) ToKubeControllerManagerInstallMapOutput() KubeControllerManagerInstallMapOutput {
return o
}
func (o KubeControllerManagerInstallMapOutput) ToKubeControllerManagerInstallMapOutputWithContext(ctx context.Context) KubeControllerManagerInstallMapOutput {
return o
}
func (o KubeControllerManagerInstallMapOutput) MapIndex(k pulumi.StringInput) KubeControllerManagerInstallOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *KubeControllerManagerInstall {
return vs[0].(map[string]*KubeControllerManagerInstall)[vs[1].(string)]
}).(KubeControllerManagerInstallOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*KubeControllerManagerInstallInput)(nil)).Elem(), &KubeControllerManagerInstall{})
pulumi.RegisterInputType(reflect.TypeOf((*KubeControllerManagerInstallArrayInput)(nil)).Elem(), KubeControllerManagerInstallArray{})
pulumi.RegisterInputType(reflect.TypeOf((*KubeControllerManagerInstallMapInput)(nil)).Elem(), KubeControllerManagerInstallMap{})
pulumi.RegisterOutputType(KubeControllerManagerInstallOutput{})
pulumi.RegisterOutputType(KubeControllerManagerInstallArrayOutput{})
pulumi.RegisterOutputType(KubeControllerManagerInstallMapOutput{})
}