generated from pulumi/pulumi-tf-provider-boilerplate
/
container.go
658 lines (586 loc) · 26.8 KB
/
container.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
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
// 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 ct
import (
"context"
"reflect"
"errors"
"github.com/muhlba91/pulumi-proxmoxve/sdk/v6/go/proxmoxve/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages a container.
//
// ## Import
//
// Instances can be imported using the `node_name` and the `vm_id`, e.g.,
//
// bash
//
// ```sh
// $ pulumi import proxmoxve:CT/container:Container ubuntu_container first-node/1234
// ```
type Container struct {
pulumi.CustomResourceState
// The cloning configuration.
Clone ContainerClonePtrOutput `pulumi:"clone"`
// Console.
Console ContainerConsolePtrOutput `pulumi:"console"`
// The CPU configuration.
Cpu ContainerCpuPtrOutput `pulumi:"cpu"`
// The description.
Description pulumi.StringPtrOutput `pulumi:"description"`
// The disk configuration.
Disk ContainerDiskPtrOutput `pulumi:"disk"`
// The container feature flags. Changing flags (except nesting) is only allowed for `root@pam` authenticated user.
Features ContainerFeaturesPtrOutput `pulumi:"features"`
// The identifier for a file containing a hook script (needs to be executable).
HookScriptFileId pulumi.StringPtrOutput `pulumi:"hookScriptFileId"`
// The initialization configuration.
Initialization ContainerInitializationPtrOutput `pulumi:"initialization"`
// The memory configuration.
Memory ContainerMemoryPtrOutput `pulumi:"memory"`
// A mount point
MountPoints ContainerMountPointArrayOutput `pulumi:"mountPoints"`
// A network interface (multiple blocks
// supported).
NetworkInterfaces ContainerNetworkInterfaceArrayOutput `pulumi:"networkInterfaces"`
// The name of the node to assign the container to.
NodeName pulumi.StringOutput `pulumi:"nodeName"`
// The Operating System configuration.
OperatingSystem ContainerOperatingSystemPtrOutput `pulumi:"operatingSystem"`
// The identifier for a pool to assign the container to.
PoolId pulumi.StringPtrOutput `pulumi:"poolId"`
// Automatically start container when the host
// system boots (defaults to `true`).
StartOnBoot pulumi.BoolPtrOutput `pulumi:"startOnBoot"`
// Whether to start the container (defaults to `true`).
Started pulumi.BoolPtrOutput `pulumi:"started"`
// Defines startup and shutdown behavior of the container.
Startup ContainerStartupPtrOutput `pulumi:"startup"`
// A list of tags the container tags. This is only meta
// information (defaults to `[]`). Note: Proxmox always sorts the container tags.
// If the list in template is not sorted, then Proxmox will always report a
// difference on the resource. You may use the `ignoreChanges` lifecycle
// meta-argument to ignore changes to this attribute.
Tags pulumi.StringArrayOutput `pulumi:"tags"`
// Whether to create a template (defaults to `false`).
Template pulumi.BoolPtrOutput `pulumi:"template"`
// Timeout for cloning a container in seconds (defaults to 1800).
TimeoutClone pulumi.IntPtrOutput `pulumi:"timeoutClone"`
// Timeout for creating a container in seconds (defaults to 1800).
TimeoutCreate pulumi.IntPtrOutput `pulumi:"timeoutCreate"`
// Timeout for deleting a container in seconds (defaults to 60).
TimeoutDelete pulumi.IntPtrOutput `pulumi:"timeoutDelete"`
// Start container timeout
//
// Deprecated: This field is deprecated and will be removed in a future release. An overall operation timeout (`timeoutCreate` / `timeoutClone`) is used instead.
TimeoutStart pulumi.IntPtrOutput `pulumi:"timeoutStart"`
// Timeout for updating a container in seconds (defaults to 1800).
TimeoutUpdate pulumi.IntPtrOutput `pulumi:"timeoutUpdate"`
// Whether the container runs as unprivileged on
// the host (defaults to `false`).
Unprivileged pulumi.BoolPtrOutput `pulumi:"unprivileged"`
// The container identifier
VmId pulumi.IntPtrOutput `pulumi:"vmId"`
}
// NewContainer registers a new resource with the given unique name, arguments, and options.
func NewContainer(ctx *pulumi.Context,
name string, args *ContainerArgs, opts ...pulumi.ResourceOption) (*Container, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.NodeName == nil {
return nil, errors.New("invalid value for required argument 'NodeName'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource Container
err := ctx.RegisterResource("proxmoxve:CT/container:Container", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetContainer gets an existing Container resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetContainer(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *ContainerState, opts ...pulumi.ResourceOption) (*Container, error) {
var resource Container
err := ctx.ReadResource("proxmoxve:CT/container:Container", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering Container resources.
type containerState struct {
// The cloning configuration.
Clone *ContainerClone `pulumi:"clone"`
// Console.
Console *ContainerConsole `pulumi:"console"`
// The CPU configuration.
Cpu *ContainerCpu `pulumi:"cpu"`
// The description.
Description *string `pulumi:"description"`
// The disk configuration.
Disk *ContainerDisk `pulumi:"disk"`
// The container feature flags. Changing flags (except nesting) is only allowed for `root@pam` authenticated user.
Features *ContainerFeatures `pulumi:"features"`
// The identifier for a file containing a hook script (needs to be executable).
HookScriptFileId *string `pulumi:"hookScriptFileId"`
// The initialization configuration.
Initialization *ContainerInitialization `pulumi:"initialization"`
// The memory configuration.
Memory *ContainerMemory `pulumi:"memory"`
// A mount point
MountPoints []ContainerMountPoint `pulumi:"mountPoints"`
// A network interface (multiple blocks
// supported).
NetworkInterfaces []ContainerNetworkInterface `pulumi:"networkInterfaces"`
// The name of the node to assign the container to.
NodeName *string `pulumi:"nodeName"`
// The Operating System configuration.
OperatingSystem *ContainerOperatingSystem `pulumi:"operatingSystem"`
// The identifier for a pool to assign the container to.
PoolId *string `pulumi:"poolId"`
// Automatically start container when the host
// system boots (defaults to `true`).
StartOnBoot *bool `pulumi:"startOnBoot"`
// Whether to start the container (defaults to `true`).
Started *bool `pulumi:"started"`
// Defines startup and shutdown behavior of the container.
Startup *ContainerStartup `pulumi:"startup"`
// A list of tags the container tags. This is only meta
// information (defaults to `[]`). Note: Proxmox always sorts the container tags.
// If the list in template is not sorted, then Proxmox will always report a
// difference on the resource. You may use the `ignoreChanges` lifecycle
// meta-argument to ignore changes to this attribute.
Tags []string `pulumi:"tags"`
// Whether to create a template (defaults to `false`).
Template *bool `pulumi:"template"`
// Timeout for cloning a container in seconds (defaults to 1800).
TimeoutClone *int `pulumi:"timeoutClone"`
// Timeout for creating a container in seconds (defaults to 1800).
TimeoutCreate *int `pulumi:"timeoutCreate"`
// Timeout for deleting a container in seconds (defaults to 60).
TimeoutDelete *int `pulumi:"timeoutDelete"`
// Start container timeout
//
// Deprecated: This field is deprecated and will be removed in a future release. An overall operation timeout (`timeoutCreate` / `timeoutClone`) is used instead.
TimeoutStart *int `pulumi:"timeoutStart"`
// Timeout for updating a container in seconds (defaults to 1800).
TimeoutUpdate *int `pulumi:"timeoutUpdate"`
// Whether the container runs as unprivileged on
// the host (defaults to `false`).
Unprivileged *bool `pulumi:"unprivileged"`
// The container identifier
VmId *int `pulumi:"vmId"`
}
type ContainerState struct {
// The cloning configuration.
Clone ContainerClonePtrInput
// Console.
Console ContainerConsolePtrInput
// The CPU configuration.
Cpu ContainerCpuPtrInput
// The description.
Description pulumi.StringPtrInput
// The disk configuration.
Disk ContainerDiskPtrInput
// The container feature flags. Changing flags (except nesting) is only allowed for `root@pam` authenticated user.
Features ContainerFeaturesPtrInput
// The identifier for a file containing a hook script (needs to be executable).
HookScriptFileId pulumi.StringPtrInput
// The initialization configuration.
Initialization ContainerInitializationPtrInput
// The memory configuration.
Memory ContainerMemoryPtrInput
// A mount point
MountPoints ContainerMountPointArrayInput
// A network interface (multiple blocks
// supported).
NetworkInterfaces ContainerNetworkInterfaceArrayInput
// The name of the node to assign the container to.
NodeName pulumi.StringPtrInput
// The Operating System configuration.
OperatingSystem ContainerOperatingSystemPtrInput
// The identifier for a pool to assign the container to.
PoolId pulumi.StringPtrInput
// Automatically start container when the host
// system boots (defaults to `true`).
StartOnBoot pulumi.BoolPtrInput
// Whether to start the container (defaults to `true`).
Started pulumi.BoolPtrInput
// Defines startup and shutdown behavior of the container.
Startup ContainerStartupPtrInput
// A list of tags the container tags. This is only meta
// information (defaults to `[]`). Note: Proxmox always sorts the container tags.
// If the list in template is not sorted, then Proxmox will always report a
// difference on the resource. You may use the `ignoreChanges` lifecycle
// meta-argument to ignore changes to this attribute.
Tags pulumi.StringArrayInput
// Whether to create a template (defaults to `false`).
Template pulumi.BoolPtrInput
// Timeout for cloning a container in seconds (defaults to 1800).
TimeoutClone pulumi.IntPtrInput
// Timeout for creating a container in seconds (defaults to 1800).
TimeoutCreate pulumi.IntPtrInput
// Timeout for deleting a container in seconds (defaults to 60).
TimeoutDelete pulumi.IntPtrInput
// Start container timeout
//
// Deprecated: This field is deprecated and will be removed in a future release. An overall operation timeout (`timeoutCreate` / `timeoutClone`) is used instead.
TimeoutStart pulumi.IntPtrInput
// Timeout for updating a container in seconds (defaults to 1800).
TimeoutUpdate pulumi.IntPtrInput
// Whether the container runs as unprivileged on
// the host (defaults to `false`).
Unprivileged pulumi.BoolPtrInput
// The container identifier
VmId pulumi.IntPtrInput
}
func (ContainerState) ElementType() reflect.Type {
return reflect.TypeOf((*containerState)(nil)).Elem()
}
type containerArgs struct {
// The cloning configuration.
Clone *ContainerClone `pulumi:"clone"`
// Console.
Console *ContainerConsole `pulumi:"console"`
// The CPU configuration.
Cpu *ContainerCpu `pulumi:"cpu"`
// The description.
Description *string `pulumi:"description"`
// The disk configuration.
Disk *ContainerDisk `pulumi:"disk"`
// The container feature flags. Changing flags (except nesting) is only allowed for `root@pam` authenticated user.
Features *ContainerFeatures `pulumi:"features"`
// The identifier for a file containing a hook script (needs to be executable).
HookScriptFileId *string `pulumi:"hookScriptFileId"`
// The initialization configuration.
Initialization *ContainerInitialization `pulumi:"initialization"`
// The memory configuration.
Memory *ContainerMemory `pulumi:"memory"`
// A mount point
MountPoints []ContainerMountPoint `pulumi:"mountPoints"`
// A network interface (multiple blocks
// supported).
NetworkInterfaces []ContainerNetworkInterface `pulumi:"networkInterfaces"`
// The name of the node to assign the container to.
NodeName string `pulumi:"nodeName"`
// The Operating System configuration.
OperatingSystem *ContainerOperatingSystem `pulumi:"operatingSystem"`
// The identifier for a pool to assign the container to.
PoolId *string `pulumi:"poolId"`
// Automatically start container when the host
// system boots (defaults to `true`).
StartOnBoot *bool `pulumi:"startOnBoot"`
// Whether to start the container (defaults to `true`).
Started *bool `pulumi:"started"`
// Defines startup and shutdown behavior of the container.
Startup *ContainerStartup `pulumi:"startup"`
// A list of tags the container tags. This is only meta
// information (defaults to `[]`). Note: Proxmox always sorts the container tags.
// If the list in template is not sorted, then Proxmox will always report a
// difference on the resource. You may use the `ignoreChanges` lifecycle
// meta-argument to ignore changes to this attribute.
Tags []string `pulumi:"tags"`
// Whether to create a template (defaults to `false`).
Template *bool `pulumi:"template"`
// Timeout for cloning a container in seconds (defaults to 1800).
TimeoutClone *int `pulumi:"timeoutClone"`
// Timeout for creating a container in seconds (defaults to 1800).
TimeoutCreate *int `pulumi:"timeoutCreate"`
// Timeout for deleting a container in seconds (defaults to 60).
TimeoutDelete *int `pulumi:"timeoutDelete"`
// Start container timeout
//
// Deprecated: This field is deprecated and will be removed in a future release. An overall operation timeout (`timeoutCreate` / `timeoutClone`) is used instead.
TimeoutStart *int `pulumi:"timeoutStart"`
// Timeout for updating a container in seconds (defaults to 1800).
TimeoutUpdate *int `pulumi:"timeoutUpdate"`
// Whether the container runs as unprivileged on
// the host (defaults to `false`).
Unprivileged *bool `pulumi:"unprivileged"`
// The container identifier
VmId *int `pulumi:"vmId"`
}
// The set of arguments for constructing a Container resource.
type ContainerArgs struct {
// The cloning configuration.
Clone ContainerClonePtrInput
// Console.
Console ContainerConsolePtrInput
// The CPU configuration.
Cpu ContainerCpuPtrInput
// The description.
Description pulumi.StringPtrInput
// The disk configuration.
Disk ContainerDiskPtrInput
// The container feature flags. Changing flags (except nesting) is only allowed for `root@pam` authenticated user.
Features ContainerFeaturesPtrInput
// The identifier for a file containing a hook script (needs to be executable).
HookScriptFileId pulumi.StringPtrInput
// The initialization configuration.
Initialization ContainerInitializationPtrInput
// The memory configuration.
Memory ContainerMemoryPtrInput
// A mount point
MountPoints ContainerMountPointArrayInput
// A network interface (multiple blocks
// supported).
NetworkInterfaces ContainerNetworkInterfaceArrayInput
// The name of the node to assign the container to.
NodeName pulumi.StringInput
// The Operating System configuration.
OperatingSystem ContainerOperatingSystemPtrInput
// The identifier for a pool to assign the container to.
PoolId pulumi.StringPtrInput
// Automatically start container when the host
// system boots (defaults to `true`).
StartOnBoot pulumi.BoolPtrInput
// Whether to start the container (defaults to `true`).
Started pulumi.BoolPtrInput
// Defines startup and shutdown behavior of the container.
Startup ContainerStartupPtrInput
// A list of tags the container tags. This is only meta
// information (defaults to `[]`). Note: Proxmox always sorts the container tags.
// If the list in template is not sorted, then Proxmox will always report a
// difference on the resource. You may use the `ignoreChanges` lifecycle
// meta-argument to ignore changes to this attribute.
Tags pulumi.StringArrayInput
// Whether to create a template (defaults to `false`).
Template pulumi.BoolPtrInput
// Timeout for cloning a container in seconds (defaults to 1800).
TimeoutClone pulumi.IntPtrInput
// Timeout for creating a container in seconds (defaults to 1800).
TimeoutCreate pulumi.IntPtrInput
// Timeout for deleting a container in seconds (defaults to 60).
TimeoutDelete pulumi.IntPtrInput
// Start container timeout
//
// Deprecated: This field is deprecated and will be removed in a future release. An overall operation timeout (`timeoutCreate` / `timeoutClone`) is used instead.
TimeoutStart pulumi.IntPtrInput
// Timeout for updating a container in seconds (defaults to 1800).
TimeoutUpdate pulumi.IntPtrInput
// Whether the container runs as unprivileged on
// the host (defaults to `false`).
Unprivileged pulumi.BoolPtrInput
// The container identifier
VmId pulumi.IntPtrInput
}
func (ContainerArgs) ElementType() reflect.Type {
return reflect.TypeOf((*containerArgs)(nil)).Elem()
}
type ContainerInput interface {
pulumi.Input
ToContainerOutput() ContainerOutput
ToContainerOutputWithContext(ctx context.Context) ContainerOutput
}
func (*Container) ElementType() reflect.Type {
return reflect.TypeOf((**Container)(nil)).Elem()
}
func (i *Container) ToContainerOutput() ContainerOutput {
return i.ToContainerOutputWithContext(context.Background())
}
func (i *Container) ToContainerOutputWithContext(ctx context.Context) ContainerOutput {
return pulumi.ToOutputWithContext(ctx, i).(ContainerOutput)
}
// ContainerArrayInput is an input type that accepts ContainerArray and ContainerArrayOutput values.
// You can construct a concrete instance of `ContainerArrayInput` via:
//
// ContainerArray{ ContainerArgs{...} }
type ContainerArrayInput interface {
pulumi.Input
ToContainerArrayOutput() ContainerArrayOutput
ToContainerArrayOutputWithContext(context.Context) ContainerArrayOutput
}
type ContainerArray []ContainerInput
func (ContainerArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*Container)(nil)).Elem()
}
func (i ContainerArray) ToContainerArrayOutput() ContainerArrayOutput {
return i.ToContainerArrayOutputWithContext(context.Background())
}
func (i ContainerArray) ToContainerArrayOutputWithContext(ctx context.Context) ContainerArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(ContainerArrayOutput)
}
// ContainerMapInput is an input type that accepts ContainerMap and ContainerMapOutput values.
// You can construct a concrete instance of `ContainerMapInput` via:
//
// ContainerMap{ "key": ContainerArgs{...} }
type ContainerMapInput interface {
pulumi.Input
ToContainerMapOutput() ContainerMapOutput
ToContainerMapOutputWithContext(context.Context) ContainerMapOutput
}
type ContainerMap map[string]ContainerInput
func (ContainerMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*Container)(nil)).Elem()
}
func (i ContainerMap) ToContainerMapOutput() ContainerMapOutput {
return i.ToContainerMapOutputWithContext(context.Background())
}
func (i ContainerMap) ToContainerMapOutputWithContext(ctx context.Context) ContainerMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(ContainerMapOutput)
}
type ContainerOutput struct{ *pulumi.OutputState }
func (ContainerOutput) ElementType() reflect.Type {
return reflect.TypeOf((**Container)(nil)).Elem()
}
func (o ContainerOutput) ToContainerOutput() ContainerOutput {
return o
}
func (o ContainerOutput) ToContainerOutputWithContext(ctx context.Context) ContainerOutput {
return o
}
// The cloning configuration.
func (o ContainerOutput) Clone() ContainerClonePtrOutput {
return o.ApplyT(func(v *Container) ContainerClonePtrOutput { return v.Clone }).(ContainerClonePtrOutput)
}
// Console.
func (o ContainerOutput) Console() ContainerConsolePtrOutput {
return o.ApplyT(func(v *Container) ContainerConsolePtrOutput { return v.Console }).(ContainerConsolePtrOutput)
}
// The CPU configuration.
func (o ContainerOutput) Cpu() ContainerCpuPtrOutput {
return o.ApplyT(func(v *Container) ContainerCpuPtrOutput { return v.Cpu }).(ContainerCpuPtrOutput)
}
// The description.
func (o ContainerOutput) Description() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Container) pulumi.StringPtrOutput { return v.Description }).(pulumi.StringPtrOutput)
}
// The disk configuration.
func (o ContainerOutput) Disk() ContainerDiskPtrOutput {
return o.ApplyT(func(v *Container) ContainerDiskPtrOutput { return v.Disk }).(ContainerDiskPtrOutput)
}
// The container feature flags. Changing flags (except nesting) is only allowed for `root@pam` authenticated user.
func (o ContainerOutput) Features() ContainerFeaturesPtrOutput {
return o.ApplyT(func(v *Container) ContainerFeaturesPtrOutput { return v.Features }).(ContainerFeaturesPtrOutput)
}
// The identifier for a file containing a hook script (needs to be executable).
func (o ContainerOutput) HookScriptFileId() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Container) pulumi.StringPtrOutput { return v.HookScriptFileId }).(pulumi.StringPtrOutput)
}
// The initialization configuration.
func (o ContainerOutput) Initialization() ContainerInitializationPtrOutput {
return o.ApplyT(func(v *Container) ContainerInitializationPtrOutput { return v.Initialization }).(ContainerInitializationPtrOutput)
}
// The memory configuration.
func (o ContainerOutput) Memory() ContainerMemoryPtrOutput {
return o.ApplyT(func(v *Container) ContainerMemoryPtrOutput { return v.Memory }).(ContainerMemoryPtrOutput)
}
// A mount point
func (o ContainerOutput) MountPoints() ContainerMountPointArrayOutput {
return o.ApplyT(func(v *Container) ContainerMountPointArrayOutput { return v.MountPoints }).(ContainerMountPointArrayOutput)
}
// A network interface (multiple blocks
// supported).
func (o ContainerOutput) NetworkInterfaces() ContainerNetworkInterfaceArrayOutput {
return o.ApplyT(func(v *Container) ContainerNetworkInterfaceArrayOutput { return v.NetworkInterfaces }).(ContainerNetworkInterfaceArrayOutput)
}
// The name of the node to assign the container to.
func (o ContainerOutput) NodeName() pulumi.StringOutput {
return o.ApplyT(func(v *Container) pulumi.StringOutput { return v.NodeName }).(pulumi.StringOutput)
}
// The Operating System configuration.
func (o ContainerOutput) OperatingSystem() ContainerOperatingSystemPtrOutput {
return o.ApplyT(func(v *Container) ContainerOperatingSystemPtrOutput { return v.OperatingSystem }).(ContainerOperatingSystemPtrOutput)
}
// The identifier for a pool to assign the container to.
func (o ContainerOutput) PoolId() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Container) pulumi.StringPtrOutput { return v.PoolId }).(pulumi.StringPtrOutput)
}
// Automatically start container when the host
// system boots (defaults to `true`).
func (o ContainerOutput) StartOnBoot() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *Container) pulumi.BoolPtrOutput { return v.StartOnBoot }).(pulumi.BoolPtrOutput)
}
// Whether to start the container (defaults to `true`).
func (o ContainerOutput) Started() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *Container) pulumi.BoolPtrOutput { return v.Started }).(pulumi.BoolPtrOutput)
}
// Defines startup and shutdown behavior of the container.
func (o ContainerOutput) Startup() ContainerStartupPtrOutput {
return o.ApplyT(func(v *Container) ContainerStartupPtrOutput { return v.Startup }).(ContainerStartupPtrOutput)
}
// A list of tags the container tags. This is only meta
// information (defaults to `[]`). Note: Proxmox always sorts the container tags.
// If the list in template is not sorted, then Proxmox will always report a
// difference on the resource. You may use the `ignoreChanges` lifecycle
// meta-argument to ignore changes to this attribute.
func (o ContainerOutput) Tags() pulumi.StringArrayOutput {
return o.ApplyT(func(v *Container) pulumi.StringArrayOutput { return v.Tags }).(pulumi.StringArrayOutput)
}
// Whether to create a template (defaults to `false`).
func (o ContainerOutput) Template() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *Container) pulumi.BoolPtrOutput { return v.Template }).(pulumi.BoolPtrOutput)
}
// Timeout for cloning a container in seconds (defaults to 1800).
func (o ContainerOutput) TimeoutClone() pulumi.IntPtrOutput {
return o.ApplyT(func(v *Container) pulumi.IntPtrOutput { return v.TimeoutClone }).(pulumi.IntPtrOutput)
}
// Timeout for creating a container in seconds (defaults to 1800).
func (o ContainerOutput) TimeoutCreate() pulumi.IntPtrOutput {
return o.ApplyT(func(v *Container) pulumi.IntPtrOutput { return v.TimeoutCreate }).(pulumi.IntPtrOutput)
}
// Timeout for deleting a container in seconds (defaults to 60).
func (o ContainerOutput) TimeoutDelete() pulumi.IntPtrOutput {
return o.ApplyT(func(v *Container) pulumi.IntPtrOutput { return v.TimeoutDelete }).(pulumi.IntPtrOutput)
}
// Start container timeout
//
// Deprecated: This field is deprecated and will be removed in a future release. An overall operation timeout (`timeoutCreate` / `timeoutClone`) is used instead.
func (o ContainerOutput) TimeoutStart() pulumi.IntPtrOutput {
return o.ApplyT(func(v *Container) pulumi.IntPtrOutput { return v.TimeoutStart }).(pulumi.IntPtrOutput)
}
// Timeout for updating a container in seconds (defaults to 1800).
func (o ContainerOutput) TimeoutUpdate() pulumi.IntPtrOutput {
return o.ApplyT(func(v *Container) pulumi.IntPtrOutput { return v.TimeoutUpdate }).(pulumi.IntPtrOutput)
}
// Whether the container runs as unprivileged on
// the host (defaults to `false`).
func (o ContainerOutput) Unprivileged() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *Container) pulumi.BoolPtrOutput { return v.Unprivileged }).(pulumi.BoolPtrOutput)
}
// The container identifier
func (o ContainerOutput) VmId() pulumi.IntPtrOutput {
return o.ApplyT(func(v *Container) pulumi.IntPtrOutput { return v.VmId }).(pulumi.IntPtrOutput)
}
type ContainerArrayOutput struct{ *pulumi.OutputState }
func (ContainerArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*Container)(nil)).Elem()
}
func (o ContainerArrayOutput) ToContainerArrayOutput() ContainerArrayOutput {
return o
}
func (o ContainerArrayOutput) ToContainerArrayOutputWithContext(ctx context.Context) ContainerArrayOutput {
return o
}
func (o ContainerArrayOutput) Index(i pulumi.IntInput) ContainerOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *Container {
return vs[0].([]*Container)[vs[1].(int)]
}).(ContainerOutput)
}
type ContainerMapOutput struct{ *pulumi.OutputState }
func (ContainerMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*Container)(nil)).Elem()
}
func (o ContainerMapOutput) ToContainerMapOutput() ContainerMapOutput {
return o
}
func (o ContainerMapOutput) ToContainerMapOutputWithContext(ctx context.Context) ContainerMapOutput {
return o
}
func (o ContainerMapOutput) MapIndex(k pulumi.StringInput) ContainerOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *Container {
return vs[0].(map[string]*Container)[vs[1].(string)]
}).(ContainerOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*ContainerInput)(nil)).Elem(), &Container{})
pulumi.RegisterInputType(reflect.TypeOf((*ContainerArrayInput)(nil)).Elem(), ContainerArray{})
pulumi.RegisterInputType(reflect.TypeOf((*ContainerMapInput)(nil)).Elem(), ContainerMap{})
pulumi.RegisterOutputType(ContainerOutput{})
pulumi.RegisterOutputType(ContainerArrayOutput{})
pulumi.RegisterOutputType(ContainerMapOutput{})
}