/
workload.go
500 lines (436 loc) · 25.9 KB
/
workload.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
// 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 assuredworkloads
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-gcp/sdk/v6/go/gcp/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/pulumi/pulumi/sdk/v3/go/pulumix"
)
// The AssuredWorkloads Workload resource
//
// ## Example Usage
// ### Basic_workload
// A basic test of a assuredworkloads api
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-gcp/sdk/v6/go/gcp/assuredworkloads"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// _, err := assuredworkloads.NewWorkload(ctx, "primary", &assuredworkloads.WorkloadArgs{
// BillingAccount: pulumi.String("billingAccounts/000000-0000000-0000000-000000"),
// ComplianceRegime: pulumi.String("FEDRAMP_MODERATE"),
// DisplayName: pulumi.String("Workload Example"),
// KmsSettings: &assuredworkloads.WorkloadKmsSettingsArgs{
// NextRotationTime: pulumi.String("9999-10-02T15:01:23Z"),
// RotationPeriod: pulumi.String("10368000s"),
// },
// Labels: pulumi.StringMap{
// "label-one": pulumi.String("value-one"),
// },
// Location: pulumi.String("us-west1"),
// Organization: pulumi.String("123456789"),
// ProvisionedResourcesParent: pulumi.String("folders/519620126891"),
// ResourceSettings: assuredworkloads.WorkloadResourceSettingArray{
// &assuredworkloads.WorkloadResourceSettingArgs{
// ResourceType: pulumi.String("CONSUMER_PROJECT"),
// },
// &assuredworkloads.WorkloadResourceSettingArgs{
// ResourceType: pulumi.String("ENCRYPTION_KEYS_PROJECT"),
// },
// &assuredworkloads.WorkloadResourceSettingArgs{
// ResourceId: pulumi.String("ring"),
// ResourceType: pulumi.String("KEYRING"),
// },
// },
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// ## Import
//
// # Workload can be imported using any of these accepted formats
//
// ```sh
//
// $ pulumi import gcp:assuredworkloads/workload:Workload default organizations/{{organization}}/locations/{{location}}/workloads/{{name}}
//
// ```
//
// ```sh
//
// $ pulumi import gcp:assuredworkloads/workload:Workload default {{organization}}/{{location}}/{{name}}
//
// ```
type Workload struct {
pulumi.CustomResourceState
// Required. Input only. The billing account used for the resources which are direct children of workload. This billing account is initially associated with the resources created as part of Workload creation. After the initial creation of these resources, the customer can change the assigned billing account. The resource name has the form `billingAccounts/{billing_account_id}`. For example, 'billingAccounts/012345-567890-ABCDEF`.
BillingAccount pulumi.StringOutput `pulumi:"billingAccount"`
// Required. Immutable. Compliance Regime associated with this workload. Possible values: COMPLIANCE_REGIME_UNSPECIFIED, IL4, CJIS, FEDRAMP_HIGH, FEDRAMP_MODERATE, US_REGIONAL_ACCESS, HIPAA, EU_REGIONS_AND_SUPPORT, CA_REGIONS_AND_SUPPORT, ITAR, AU_REGIONS_AND_US_SUPPORT, ASSURED_WORKLOADS_FOR_PARTNERS
ComplianceRegime pulumi.StringOutput `pulumi:"complianceRegime"`
// Output only. Immutable. The Workload creation timestamp.
CreateTime pulumi.StringOutput `pulumi:"createTime"`
// Required. The user-assigned display name of the Workload. When present it must be between 4 to 30 characters. Allowed characters are: lowercase and uppercase letters, numbers, hyphen, and spaces. Example: My Workload
DisplayName pulumi.StringOutput `pulumi:"displayName"`
// Input only. Settings used to create a CMEK crypto key. When set a project with a KMS CMEK key is provisioned. This field is mandatory for a subset of Compliance Regimes.
KmsSettings WorkloadKmsSettingsPtrOutput `pulumi:"kmsSettings"`
// Optional. Labels applied to the workload.
Labels pulumi.StringMapOutput `pulumi:"labels"`
// The location for the resource
Location pulumi.StringOutput `pulumi:"location"`
// Output only. The resource name of the workload.
Name pulumi.StringOutput `pulumi:"name"`
// The organization for the resource
//
// ***
Organization pulumi.StringOutput `pulumi:"organization"`
// Input only. The parent resource for the resources managed by this Assured Workload. May be either an organization or a folder. Must be the same or a child of the Workload parent. If not specified all resources are created under the Workload parent. Formats: folders/{folder_id}, organizations/{organization_id}
ProvisionedResourcesParent pulumi.StringPtrOutput `pulumi:"provisionedResourcesParent"`
// Input only. Resource properties that are used to customize workload resources. These properties (such as custom project id) will be used to create workload resources if possible. This field is optional.
ResourceSettings WorkloadResourceSettingArrayOutput `pulumi:"resourceSettings"`
// Output only. The resources associated with this workload. These resources will be created when creating the workload. If any of the projects already exist, the workload creation will fail. Always read only.
Resources WorkloadResourceArrayOutput `pulumi:"resources"`
}
// NewWorkload registers a new resource with the given unique name, arguments, and options.
func NewWorkload(ctx *pulumi.Context,
name string, args *WorkloadArgs, opts ...pulumi.ResourceOption) (*Workload, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.BillingAccount == nil {
return nil, errors.New("invalid value for required argument 'BillingAccount'")
}
if args.ComplianceRegime == nil {
return nil, errors.New("invalid value for required argument 'ComplianceRegime'")
}
if args.DisplayName == nil {
return nil, errors.New("invalid value for required argument 'DisplayName'")
}
if args.Location == nil {
return nil, errors.New("invalid value for required argument 'Location'")
}
if args.Organization == nil {
return nil, errors.New("invalid value for required argument 'Organization'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource Workload
err := ctx.RegisterResource("gcp:assuredworkloads/workload:Workload", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetWorkload gets an existing Workload 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 GetWorkload(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *WorkloadState, opts ...pulumi.ResourceOption) (*Workload, error) {
var resource Workload
err := ctx.ReadResource("gcp:assuredworkloads/workload:Workload", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering Workload resources.
type workloadState struct {
// Required. Input only. The billing account used for the resources which are direct children of workload. This billing account is initially associated with the resources created as part of Workload creation. After the initial creation of these resources, the customer can change the assigned billing account. The resource name has the form `billingAccounts/{billing_account_id}`. For example, 'billingAccounts/012345-567890-ABCDEF`.
BillingAccount *string `pulumi:"billingAccount"`
// Required. Immutable. Compliance Regime associated with this workload. Possible values: COMPLIANCE_REGIME_UNSPECIFIED, IL4, CJIS, FEDRAMP_HIGH, FEDRAMP_MODERATE, US_REGIONAL_ACCESS, HIPAA, EU_REGIONS_AND_SUPPORT, CA_REGIONS_AND_SUPPORT, ITAR, AU_REGIONS_AND_US_SUPPORT, ASSURED_WORKLOADS_FOR_PARTNERS
ComplianceRegime *string `pulumi:"complianceRegime"`
// Output only. Immutable. The Workload creation timestamp.
CreateTime *string `pulumi:"createTime"`
// Required. The user-assigned display name of the Workload. When present it must be between 4 to 30 characters. Allowed characters are: lowercase and uppercase letters, numbers, hyphen, and spaces. Example: My Workload
DisplayName *string `pulumi:"displayName"`
// Input only. Settings used to create a CMEK crypto key. When set a project with a KMS CMEK key is provisioned. This field is mandatory for a subset of Compliance Regimes.
KmsSettings *WorkloadKmsSettings `pulumi:"kmsSettings"`
// Optional. Labels applied to the workload.
Labels map[string]string `pulumi:"labels"`
// The location for the resource
Location *string `pulumi:"location"`
// Output only. The resource name of the workload.
Name *string `pulumi:"name"`
// The organization for the resource
//
// ***
Organization *string `pulumi:"organization"`
// Input only. The parent resource for the resources managed by this Assured Workload. May be either an organization or a folder. Must be the same or a child of the Workload parent. If not specified all resources are created under the Workload parent. Formats: folders/{folder_id}, organizations/{organization_id}
ProvisionedResourcesParent *string `pulumi:"provisionedResourcesParent"`
// Input only. Resource properties that are used to customize workload resources. These properties (such as custom project id) will be used to create workload resources if possible. This field is optional.
ResourceSettings []WorkloadResourceSetting `pulumi:"resourceSettings"`
// Output only. The resources associated with this workload. These resources will be created when creating the workload. If any of the projects already exist, the workload creation will fail. Always read only.
Resources []WorkloadResource `pulumi:"resources"`
}
type WorkloadState struct {
// Required. Input only. The billing account used for the resources which are direct children of workload. This billing account is initially associated with the resources created as part of Workload creation. After the initial creation of these resources, the customer can change the assigned billing account. The resource name has the form `billingAccounts/{billing_account_id}`. For example, 'billingAccounts/012345-567890-ABCDEF`.
BillingAccount pulumi.StringPtrInput
// Required. Immutable. Compliance Regime associated with this workload. Possible values: COMPLIANCE_REGIME_UNSPECIFIED, IL4, CJIS, FEDRAMP_HIGH, FEDRAMP_MODERATE, US_REGIONAL_ACCESS, HIPAA, EU_REGIONS_AND_SUPPORT, CA_REGIONS_AND_SUPPORT, ITAR, AU_REGIONS_AND_US_SUPPORT, ASSURED_WORKLOADS_FOR_PARTNERS
ComplianceRegime pulumi.StringPtrInput
// Output only. Immutable. The Workload creation timestamp.
CreateTime pulumi.StringPtrInput
// Required. The user-assigned display name of the Workload. When present it must be between 4 to 30 characters. Allowed characters are: lowercase and uppercase letters, numbers, hyphen, and spaces. Example: My Workload
DisplayName pulumi.StringPtrInput
// Input only. Settings used to create a CMEK crypto key. When set a project with a KMS CMEK key is provisioned. This field is mandatory for a subset of Compliance Regimes.
KmsSettings WorkloadKmsSettingsPtrInput
// Optional. Labels applied to the workload.
Labels pulumi.StringMapInput
// The location for the resource
Location pulumi.StringPtrInput
// Output only. The resource name of the workload.
Name pulumi.StringPtrInput
// The organization for the resource
//
// ***
Organization pulumi.StringPtrInput
// Input only. The parent resource for the resources managed by this Assured Workload. May be either an organization or a folder. Must be the same or a child of the Workload parent. If not specified all resources are created under the Workload parent. Formats: folders/{folder_id}, organizations/{organization_id}
ProvisionedResourcesParent pulumi.StringPtrInput
// Input only. Resource properties that are used to customize workload resources. These properties (such as custom project id) will be used to create workload resources if possible. This field is optional.
ResourceSettings WorkloadResourceSettingArrayInput
// Output only. The resources associated with this workload. These resources will be created when creating the workload. If any of the projects already exist, the workload creation will fail. Always read only.
Resources WorkloadResourceArrayInput
}
func (WorkloadState) ElementType() reflect.Type {
return reflect.TypeOf((*workloadState)(nil)).Elem()
}
type workloadArgs struct {
// Required. Input only. The billing account used for the resources which are direct children of workload. This billing account is initially associated with the resources created as part of Workload creation. After the initial creation of these resources, the customer can change the assigned billing account. The resource name has the form `billingAccounts/{billing_account_id}`. For example, 'billingAccounts/012345-567890-ABCDEF`.
BillingAccount string `pulumi:"billingAccount"`
// Required. Immutable. Compliance Regime associated with this workload. Possible values: COMPLIANCE_REGIME_UNSPECIFIED, IL4, CJIS, FEDRAMP_HIGH, FEDRAMP_MODERATE, US_REGIONAL_ACCESS, HIPAA, EU_REGIONS_AND_SUPPORT, CA_REGIONS_AND_SUPPORT, ITAR, AU_REGIONS_AND_US_SUPPORT, ASSURED_WORKLOADS_FOR_PARTNERS
ComplianceRegime string `pulumi:"complianceRegime"`
// Required. The user-assigned display name of the Workload. When present it must be between 4 to 30 characters. Allowed characters are: lowercase and uppercase letters, numbers, hyphen, and spaces. Example: My Workload
DisplayName string `pulumi:"displayName"`
// Input only. Settings used to create a CMEK crypto key. When set a project with a KMS CMEK key is provisioned. This field is mandatory for a subset of Compliance Regimes.
KmsSettings *WorkloadKmsSettings `pulumi:"kmsSettings"`
// Optional. Labels applied to the workload.
Labels map[string]string `pulumi:"labels"`
// The location for the resource
Location string `pulumi:"location"`
// The organization for the resource
//
// ***
Organization string `pulumi:"organization"`
// Input only. The parent resource for the resources managed by this Assured Workload. May be either an organization or a folder. Must be the same or a child of the Workload parent. If not specified all resources are created under the Workload parent. Formats: folders/{folder_id}, organizations/{organization_id}
ProvisionedResourcesParent *string `pulumi:"provisionedResourcesParent"`
// Input only. Resource properties that are used to customize workload resources. These properties (such as custom project id) will be used to create workload resources if possible. This field is optional.
ResourceSettings []WorkloadResourceSetting `pulumi:"resourceSettings"`
}
// The set of arguments for constructing a Workload resource.
type WorkloadArgs struct {
// Required. Input only. The billing account used for the resources which are direct children of workload. This billing account is initially associated with the resources created as part of Workload creation. After the initial creation of these resources, the customer can change the assigned billing account. The resource name has the form `billingAccounts/{billing_account_id}`. For example, 'billingAccounts/012345-567890-ABCDEF`.
BillingAccount pulumi.StringInput
// Required. Immutable. Compliance Regime associated with this workload. Possible values: COMPLIANCE_REGIME_UNSPECIFIED, IL4, CJIS, FEDRAMP_HIGH, FEDRAMP_MODERATE, US_REGIONAL_ACCESS, HIPAA, EU_REGIONS_AND_SUPPORT, CA_REGIONS_AND_SUPPORT, ITAR, AU_REGIONS_AND_US_SUPPORT, ASSURED_WORKLOADS_FOR_PARTNERS
ComplianceRegime pulumi.StringInput
// Required. The user-assigned display name of the Workload. When present it must be between 4 to 30 characters. Allowed characters are: lowercase and uppercase letters, numbers, hyphen, and spaces. Example: My Workload
DisplayName pulumi.StringInput
// Input only. Settings used to create a CMEK crypto key. When set a project with a KMS CMEK key is provisioned. This field is mandatory for a subset of Compliance Regimes.
KmsSettings WorkloadKmsSettingsPtrInput
// Optional. Labels applied to the workload.
Labels pulumi.StringMapInput
// The location for the resource
Location pulumi.StringInput
// The organization for the resource
//
// ***
Organization pulumi.StringInput
// Input only. The parent resource for the resources managed by this Assured Workload. May be either an organization or a folder. Must be the same or a child of the Workload parent. If not specified all resources are created under the Workload parent. Formats: folders/{folder_id}, organizations/{organization_id}
ProvisionedResourcesParent pulumi.StringPtrInput
// Input only. Resource properties that are used to customize workload resources. These properties (such as custom project id) will be used to create workload resources if possible. This field is optional.
ResourceSettings WorkloadResourceSettingArrayInput
}
func (WorkloadArgs) ElementType() reflect.Type {
return reflect.TypeOf((*workloadArgs)(nil)).Elem()
}
type WorkloadInput interface {
pulumi.Input
ToWorkloadOutput() WorkloadOutput
ToWorkloadOutputWithContext(ctx context.Context) WorkloadOutput
}
func (*Workload) ElementType() reflect.Type {
return reflect.TypeOf((**Workload)(nil)).Elem()
}
func (i *Workload) ToWorkloadOutput() WorkloadOutput {
return i.ToWorkloadOutputWithContext(context.Background())
}
func (i *Workload) ToWorkloadOutputWithContext(ctx context.Context) WorkloadOutput {
return pulumi.ToOutputWithContext(ctx, i).(WorkloadOutput)
}
func (i *Workload) ToOutput(ctx context.Context) pulumix.Output[*Workload] {
return pulumix.Output[*Workload]{
OutputState: i.ToWorkloadOutputWithContext(ctx).OutputState,
}
}
// WorkloadArrayInput is an input type that accepts WorkloadArray and WorkloadArrayOutput values.
// You can construct a concrete instance of `WorkloadArrayInput` via:
//
// WorkloadArray{ WorkloadArgs{...} }
type WorkloadArrayInput interface {
pulumi.Input
ToWorkloadArrayOutput() WorkloadArrayOutput
ToWorkloadArrayOutputWithContext(context.Context) WorkloadArrayOutput
}
type WorkloadArray []WorkloadInput
func (WorkloadArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*Workload)(nil)).Elem()
}
func (i WorkloadArray) ToWorkloadArrayOutput() WorkloadArrayOutput {
return i.ToWorkloadArrayOutputWithContext(context.Background())
}
func (i WorkloadArray) ToWorkloadArrayOutputWithContext(ctx context.Context) WorkloadArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(WorkloadArrayOutput)
}
func (i WorkloadArray) ToOutput(ctx context.Context) pulumix.Output[[]*Workload] {
return pulumix.Output[[]*Workload]{
OutputState: i.ToWorkloadArrayOutputWithContext(ctx).OutputState,
}
}
// WorkloadMapInput is an input type that accepts WorkloadMap and WorkloadMapOutput values.
// You can construct a concrete instance of `WorkloadMapInput` via:
//
// WorkloadMap{ "key": WorkloadArgs{...} }
type WorkloadMapInput interface {
pulumi.Input
ToWorkloadMapOutput() WorkloadMapOutput
ToWorkloadMapOutputWithContext(context.Context) WorkloadMapOutput
}
type WorkloadMap map[string]WorkloadInput
func (WorkloadMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*Workload)(nil)).Elem()
}
func (i WorkloadMap) ToWorkloadMapOutput() WorkloadMapOutput {
return i.ToWorkloadMapOutputWithContext(context.Background())
}
func (i WorkloadMap) ToWorkloadMapOutputWithContext(ctx context.Context) WorkloadMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(WorkloadMapOutput)
}
func (i WorkloadMap) ToOutput(ctx context.Context) pulumix.Output[map[string]*Workload] {
return pulumix.Output[map[string]*Workload]{
OutputState: i.ToWorkloadMapOutputWithContext(ctx).OutputState,
}
}
type WorkloadOutput struct{ *pulumi.OutputState }
func (WorkloadOutput) ElementType() reflect.Type {
return reflect.TypeOf((**Workload)(nil)).Elem()
}
func (o WorkloadOutput) ToWorkloadOutput() WorkloadOutput {
return o
}
func (o WorkloadOutput) ToWorkloadOutputWithContext(ctx context.Context) WorkloadOutput {
return o
}
func (o WorkloadOutput) ToOutput(ctx context.Context) pulumix.Output[*Workload] {
return pulumix.Output[*Workload]{
OutputState: o.OutputState,
}
}
// Required. Input only. The billing account used for the resources which are direct children of workload. This billing account is initially associated with the resources created as part of Workload creation. After the initial creation of these resources, the customer can change the assigned billing account. The resource name has the form `billingAccounts/{billing_account_id}`. For example, 'billingAccounts/012345-567890-ABCDEF`.
func (o WorkloadOutput) BillingAccount() pulumi.StringOutput {
return o.ApplyT(func(v *Workload) pulumi.StringOutput { return v.BillingAccount }).(pulumi.StringOutput)
}
// Required. Immutable. Compliance Regime associated with this workload. Possible values: COMPLIANCE_REGIME_UNSPECIFIED, IL4, CJIS, FEDRAMP_HIGH, FEDRAMP_MODERATE, US_REGIONAL_ACCESS, HIPAA, EU_REGIONS_AND_SUPPORT, CA_REGIONS_AND_SUPPORT, ITAR, AU_REGIONS_AND_US_SUPPORT, ASSURED_WORKLOADS_FOR_PARTNERS
func (o WorkloadOutput) ComplianceRegime() pulumi.StringOutput {
return o.ApplyT(func(v *Workload) pulumi.StringOutput { return v.ComplianceRegime }).(pulumi.StringOutput)
}
// Output only. Immutable. The Workload creation timestamp.
func (o WorkloadOutput) CreateTime() pulumi.StringOutput {
return o.ApplyT(func(v *Workload) pulumi.StringOutput { return v.CreateTime }).(pulumi.StringOutput)
}
// Required. The user-assigned display name of the Workload. When present it must be between 4 to 30 characters. Allowed characters are: lowercase and uppercase letters, numbers, hyphen, and spaces. Example: My Workload
func (o WorkloadOutput) DisplayName() pulumi.StringOutput {
return o.ApplyT(func(v *Workload) pulumi.StringOutput { return v.DisplayName }).(pulumi.StringOutput)
}
// Input only. Settings used to create a CMEK crypto key. When set a project with a KMS CMEK key is provisioned. This field is mandatory for a subset of Compliance Regimes.
func (o WorkloadOutput) KmsSettings() WorkloadKmsSettingsPtrOutput {
return o.ApplyT(func(v *Workload) WorkloadKmsSettingsPtrOutput { return v.KmsSettings }).(WorkloadKmsSettingsPtrOutput)
}
// Optional. Labels applied to the workload.
func (o WorkloadOutput) Labels() pulumi.StringMapOutput {
return o.ApplyT(func(v *Workload) pulumi.StringMapOutput { return v.Labels }).(pulumi.StringMapOutput)
}
// The location for the resource
func (o WorkloadOutput) Location() pulumi.StringOutput {
return o.ApplyT(func(v *Workload) pulumi.StringOutput { return v.Location }).(pulumi.StringOutput)
}
// Output only. The resource name of the workload.
func (o WorkloadOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *Workload) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// The organization for the resource
//
// ***
func (o WorkloadOutput) Organization() pulumi.StringOutput {
return o.ApplyT(func(v *Workload) pulumi.StringOutput { return v.Organization }).(pulumi.StringOutput)
}
// Input only. The parent resource for the resources managed by this Assured Workload. May be either an organization or a folder. Must be the same or a child of the Workload parent. If not specified all resources are created under the Workload parent. Formats: folders/{folder_id}, organizations/{organization_id}
func (o WorkloadOutput) ProvisionedResourcesParent() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Workload) pulumi.StringPtrOutput { return v.ProvisionedResourcesParent }).(pulumi.StringPtrOutput)
}
// Input only. Resource properties that are used to customize workload resources. These properties (such as custom project id) will be used to create workload resources if possible. This field is optional.
func (o WorkloadOutput) ResourceSettings() WorkloadResourceSettingArrayOutput {
return o.ApplyT(func(v *Workload) WorkloadResourceSettingArrayOutput { return v.ResourceSettings }).(WorkloadResourceSettingArrayOutput)
}
// Output only. The resources associated with this workload. These resources will be created when creating the workload. If any of the projects already exist, the workload creation will fail. Always read only.
func (o WorkloadOutput) Resources() WorkloadResourceArrayOutput {
return o.ApplyT(func(v *Workload) WorkloadResourceArrayOutput { return v.Resources }).(WorkloadResourceArrayOutput)
}
type WorkloadArrayOutput struct{ *pulumi.OutputState }
func (WorkloadArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*Workload)(nil)).Elem()
}
func (o WorkloadArrayOutput) ToWorkloadArrayOutput() WorkloadArrayOutput {
return o
}
func (o WorkloadArrayOutput) ToWorkloadArrayOutputWithContext(ctx context.Context) WorkloadArrayOutput {
return o
}
func (o WorkloadArrayOutput) ToOutput(ctx context.Context) pulumix.Output[[]*Workload] {
return pulumix.Output[[]*Workload]{
OutputState: o.OutputState,
}
}
func (o WorkloadArrayOutput) Index(i pulumi.IntInput) WorkloadOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *Workload {
return vs[0].([]*Workload)[vs[1].(int)]
}).(WorkloadOutput)
}
type WorkloadMapOutput struct{ *pulumi.OutputState }
func (WorkloadMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*Workload)(nil)).Elem()
}
func (o WorkloadMapOutput) ToWorkloadMapOutput() WorkloadMapOutput {
return o
}
func (o WorkloadMapOutput) ToWorkloadMapOutputWithContext(ctx context.Context) WorkloadMapOutput {
return o
}
func (o WorkloadMapOutput) ToOutput(ctx context.Context) pulumix.Output[map[string]*Workload] {
return pulumix.Output[map[string]*Workload]{
OutputState: o.OutputState,
}
}
func (o WorkloadMapOutput) MapIndex(k pulumi.StringInput) WorkloadOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *Workload {
return vs[0].(map[string]*Workload)[vs[1].(string)]
}).(WorkloadOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*WorkloadInput)(nil)).Elem(), &Workload{})
pulumi.RegisterInputType(reflect.TypeOf((*WorkloadArrayInput)(nil)).Elem(), WorkloadArray{})
pulumi.RegisterInputType(reflect.TypeOf((*WorkloadMapInput)(nil)).Elem(), WorkloadMap{})
pulumi.RegisterOutputType(WorkloadOutput{})
pulumi.RegisterOutputType(WorkloadArrayOutput{})
pulumi.RegisterOutputType(WorkloadMapOutput{})
}