/
configurationStore.go
677 lines (614 loc) · 33 KB
/
configurationStore.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
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
// 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 appconfiguration
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v5/go/azure/appconfiguration"
// "github.com/pulumi/pulumi-azure/sdk/v5/go/azure/core"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
// Name: pulumi.String("example-resources"),
// Location: pulumi.String("West Europe"),
// })
// if err != nil {
// return err
// }
// _, err = appconfiguration.NewConfigurationStore(ctx, "appconf", &appconfiguration.ConfigurationStoreArgs{
// Name: pulumi.String("appConf1"),
// ResourceGroupName: example.Name,
// Location: example.Location,
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// ### Encryption)
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v5/go/azure/appconfiguration"
// "github.com/pulumi/pulumi-azure/sdk/v5/go/azure/authorization"
// "github.com/pulumi/pulumi-azure/sdk/v5/go/azure/core"
// "github.com/pulumi/pulumi-azure/sdk/v5/go/azure/keyvault"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
// Name: pulumi.String("example-resources"),
// Location: pulumi.String("West Europe"),
// })
// if err != nil {
// return err
// }
// exampleUserAssignedIdentity, err := authorization.NewUserAssignedIdentity(ctx, "example", &authorization.UserAssignedIdentityArgs{
// Name: pulumi.String("example-identity"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// })
// if err != nil {
// return err
// }
// current, err := core.GetClientConfig(ctx, nil, nil)
// if err != nil {
// return err
// }
// exampleKeyVault, err := keyvault.NewKeyVault(ctx, "example", &keyvault.KeyVaultArgs{
// Name: pulumi.String("exampleKVt123"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// TenantId: pulumi.String(current.TenantId),
// SkuName: pulumi.String("standard"),
// SoftDeleteRetentionDays: pulumi.Int(7),
// PurgeProtectionEnabled: pulumi.Bool(true),
// })
// if err != nil {
// return err
// }
// _, err = keyvault.NewAccessPolicy(ctx, "server", &keyvault.AccessPolicyArgs{
// KeyVaultId: exampleKeyVault.ID(),
// TenantId: pulumi.String(current.TenantId),
// ObjectId: exampleUserAssignedIdentity.PrincipalId,
// KeyPermissions: pulumi.StringArray{
// pulumi.String("Get"),
// pulumi.String("UnwrapKey"),
// pulumi.String("WrapKey"),
// },
// SecretPermissions: pulumi.StringArray{
// pulumi.String("Get"),
// },
// })
// if err != nil {
// return err
// }
// _, err = keyvault.NewAccessPolicy(ctx, "client", &keyvault.AccessPolicyArgs{
// KeyVaultId: exampleKeyVault.ID(),
// TenantId: pulumi.String(current.TenantId),
// ObjectId: pulumi.String(current.ObjectId),
// KeyPermissions: pulumi.StringArray{
// pulumi.String("Get"),
// pulumi.String("Create"),
// pulumi.String("Delete"),
// pulumi.String("List"),
// pulumi.String("Restore"),
// pulumi.String("Recover"),
// pulumi.String("UnwrapKey"),
// pulumi.String("WrapKey"),
// pulumi.String("Purge"),
// pulumi.String("Encrypt"),
// pulumi.String("Decrypt"),
// pulumi.String("Sign"),
// pulumi.String("Verify"),
// pulumi.String("GetRotationPolicy"),
// },
// SecretPermissions: pulumi.StringArray{
// pulumi.String("Get"),
// },
// })
// if err != nil {
// return err
// }
// exampleKey, err := keyvault.NewKey(ctx, "example", &keyvault.KeyArgs{
// Name: pulumi.String("exampleKVkey"),
// KeyVaultId: exampleKeyVault.ID(),
// KeyType: pulumi.String("RSA"),
// KeySize: pulumi.Int(2048),
// KeyOpts: pulumi.StringArray{
// pulumi.String("decrypt"),
// pulumi.String("encrypt"),
// pulumi.String("sign"),
// pulumi.String("unwrapKey"),
// pulumi.String("verify"),
// pulumi.String("wrapKey"),
// },
// })
// if err != nil {
// return err
// }
// _, err = appconfiguration.NewConfigurationStore(ctx, "example", &appconfiguration.ConfigurationStoreArgs{
// Name: pulumi.String("appConf2"),
// ResourceGroupName: example.Name,
// Location: example.Location,
// Sku: pulumi.String("standard"),
// LocalAuthEnabled: pulumi.Bool(true),
// PublicNetworkAccess: pulumi.String("Enabled"),
// PurgeProtectionEnabled: pulumi.Bool(false),
// SoftDeleteRetentionDays: pulumi.Int(1),
// Identity: &appconfiguration.ConfigurationStoreIdentityArgs{
// Type: pulumi.String("UserAssigned"),
// IdentityIds: pulumi.StringArray{
// exampleUserAssignedIdentity.ID(),
// },
// },
// Encryption: &appconfiguration.ConfigurationStoreEncryptionArgs{
// KeyVaultKeyIdentifier: exampleKey.ID(),
// IdentityClientId: exampleUserAssignedIdentity.ClientId,
// },
// Replicas: appconfiguration.ConfigurationStoreReplicaArray{
// &appconfiguration.ConfigurationStoreReplicaArgs{
// Name: pulumi.String("replica1"),
// Location: pulumi.String("West US"),
// },
// },
// Tags: pulumi.StringMap{
// "environment": pulumi.String("development"),
// },
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// ## Import
//
// App Configurations can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:appconfiguration/configurationStore:ConfigurationStore appconf /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup1/providers/Microsoft.AppConfiguration/configurationStores/appConf1
// ```
type ConfigurationStore struct {
pulumi.CustomResourceState
// An `encryption` block as defined below.
Encryption ConfigurationStoreEncryptionPtrOutput `pulumi:"encryption"`
// The URL of the App Configuration Replica.
Endpoint pulumi.StringOutput `pulumi:"endpoint"`
// An `identity` block as defined below.
//
// > **NOTE:** Azure does not allow a downgrade from `standard` to `free`.
Identity ConfigurationStoreIdentityPtrOutput `pulumi:"identity"`
// Whether local authentication methods is enabled. Defaults to `true`.
LocalAuthEnabled pulumi.BoolPtrOutput `pulumi:"localAuthEnabled"`
// Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
Location pulumi.StringOutput `pulumi:"location"`
// Specifies the name of the App Configuration. Changing this forces a new resource to be created.
Name pulumi.StringOutput `pulumi:"name"`
// A `primaryReadKey` block as defined below containing the primary read access key.
PrimaryReadKeys ConfigurationStorePrimaryReadKeyArrayOutput `pulumi:"primaryReadKeys"`
// A `primaryWriteKey` block as defined below containing the primary write access key.
PrimaryWriteKeys ConfigurationStorePrimaryWriteKeyArrayOutput `pulumi:"primaryWriteKeys"`
// The Public Network Access setting of the App Configuration. Possible values are `Enabled` and `Disabled`.
//
// > **NOTE:** If `publicNetworkAccess` is not specified, the App Configuration will be created as `Automatic`. However, once a different value is defined, can not be set again as automatic.
PublicNetworkAccess pulumi.StringPtrOutput `pulumi:"publicNetworkAccess"`
// Whether Purge Protection is enabled. This field only works for `standard` sku. Defaults to `false`.
//
// !> **Note:** Once Purge Protection has been enabled it's not possible to disable it. Deleting the App Configuration with Purge Protection enabled will schedule the App Configuration to be deleted (which will happen by Azure in the configured number of days).
PurgeProtectionEnabled pulumi.BoolPtrOutput `pulumi:"purgeProtectionEnabled"`
// One or more `replica` blocks as defined below.
Replicas ConfigurationStoreReplicaArrayOutput `pulumi:"replicas"`
// The name of the resource group in which to create the App Configuration. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"`
// A `secondaryReadKey` block as defined below containing the secondary read access key.
SecondaryReadKeys ConfigurationStoreSecondaryReadKeyArrayOutput `pulumi:"secondaryReadKeys"`
// A `secondaryWriteKey` block as defined below containing the secondary write access key.
SecondaryWriteKeys ConfigurationStoreSecondaryWriteKeyArrayOutput `pulumi:"secondaryWriteKeys"`
// The SKU name of the App Configuration. Possible values are `free` and `standard`. Defaults to `free`.
Sku pulumi.StringPtrOutput `pulumi:"sku"`
// The number of days that items should be retained for once soft-deleted. This field only works for `standard` sku. This value can be between `1` and `7` days. Defaults to `7`. Changing this forces a new resource to be created.
//
// > **Note:** If Purge Protection is enabled, this field can only be configured one time and cannot be updated.
SoftDeleteRetentionDays pulumi.IntPtrOutput `pulumi:"softDeleteRetentionDays"`
// A mapping of tags to assign to the resource.
Tags pulumi.StringMapOutput `pulumi:"tags"`
}
// NewConfigurationStore registers a new resource with the given unique name, arguments, and options.
func NewConfigurationStore(ctx *pulumi.Context,
name string, args *ConfigurationStoreArgs, opts ...pulumi.ResourceOption) (*ConfigurationStore, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.ResourceGroupName == nil {
return nil, errors.New("invalid value for required argument 'ResourceGroupName'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource ConfigurationStore
err := ctx.RegisterResource("azure:appconfiguration/configurationStore:ConfigurationStore", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetConfigurationStore gets an existing ConfigurationStore 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 GetConfigurationStore(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *ConfigurationStoreState, opts ...pulumi.ResourceOption) (*ConfigurationStore, error) {
var resource ConfigurationStore
err := ctx.ReadResource("azure:appconfiguration/configurationStore:ConfigurationStore", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering ConfigurationStore resources.
type configurationStoreState struct {
// An `encryption` block as defined below.
Encryption *ConfigurationStoreEncryption `pulumi:"encryption"`
// The URL of the App Configuration Replica.
Endpoint *string `pulumi:"endpoint"`
// An `identity` block as defined below.
//
// > **NOTE:** Azure does not allow a downgrade from `standard` to `free`.
Identity *ConfigurationStoreIdentity `pulumi:"identity"`
// Whether local authentication methods is enabled. Defaults to `true`.
LocalAuthEnabled *bool `pulumi:"localAuthEnabled"`
// Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
Location *string `pulumi:"location"`
// Specifies the name of the App Configuration. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// A `primaryReadKey` block as defined below containing the primary read access key.
PrimaryReadKeys []ConfigurationStorePrimaryReadKey `pulumi:"primaryReadKeys"`
// A `primaryWriteKey` block as defined below containing the primary write access key.
PrimaryWriteKeys []ConfigurationStorePrimaryWriteKey `pulumi:"primaryWriteKeys"`
// The Public Network Access setting of the App Configuration. Possible values are `Enabled` and `Disabled`.
//
// > **NOTE:** If `publicNetworkAccess` is not specified, the App Configuration will be created as `Automatic`. However, once a different value is defined, can not be set again as automatic.
PublicNetworkAccess *string `pulumi:"publicNetworkAccess"`
// Whether Purge Protection is enabled. This field only works for `standard` sku. Defaults to `false`.
//
// !> **Note:** Once Purge Protection has been enabled it's not possible to disable it. Deleting the App Configuration with Purge Protection enabled will schedule the App Configuration to be deleted (which will happen by Azure in the configured number of days).
PurgeProtectionEnabled *bool `pulumi:"purgeProtectionEnabled"`
// One or more `replica` blocks as defined below.
Replicas []ConfigurationStoreReplica `pulumi:"replicas"`
// The name of the resource group in which to create the App Configuration. Changing this forces a new resource to be created.
ResourceGroupName *string `pulumi:"resourceGroupName"`
// A `secondaryReadKey` block as defined below containing the secondary read access key.
SecondaryReadKeys []ConfigurationStoreSecondaryReadKey `pulumi:"secondaryReadKeys"`
// A `secondaryWriteKey` block as defined below containing the secondary write access key.
SecondaryWriteKeys []ConfigurationStoreSecondaryWriteKey `pulumi:"secondaryWriteKeys"`
// The SKU name of the App Configuration. Possible values are `free` and `standard`. Defaults to `free`.
Sku *string `pulumi:"sku"`
// The number of days that items should be retained for once soft-deleted. This field only works for `standard` sku. This value can be between `1` and `7` days. Defaults to `7`. Changing this forces a new resource to be created.
//
// > **Note:** If Purge Protection is enabled, this field can only be configured one time and cannot be updated.
SoftDeleteRetentionDays *int `pulumi:"softDeleteRetentionDays"`
// A mapping of tags to assign to the resource.
Tags map[string]string `pulumi:"tags"`
}
type ConfigurationStoreState struct {
// An `encryption` block as defined below.
Encryption ConfigurationStoreEncryptionPtrInput
// The URL of the App Configuration Replica.
Endpoint pulumi.StringPtrInput
// An `identity` block as defined below.
//
// > **NOTE:** Azure does not allow a downgrade from `standard` to `free`.
Identity ConfigurationStoreIdentityPtrInput
// Whether local authentication methods is enabled. Defaults to `true`.
LocalAuthEnabled pulumi.BoolPtrInput
// Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
Location pulumi.StringPtrInput
// Specifies the name of the App Configuration. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// A `primaryReadKey` block as defined below containing the primary read access key.
PrimaryReadKeys ConfigurationStorePrimaryReadKeyArrayInput
// A `primaryWriteKey` block as defined below containing the primary write access key.
PrimaryWriteKeys ConfigurationStorePrimaryWriteKeyArrayInput
// The Public Network Access setting of the App Configuration. Possible values are `Enabled` and `Disabled`.
//
// > **NOTE:** If `publicNetworkAccess` is not specified, the App Configuration will be created as `Automatic`. However, once a different value is defined, can not be set again as automatic.
PublicNetworkAccess pulumi.StringPtrInput
// Whether Purge Protection is enabled. This field only works for `standard` sku. Defaults to `false`.
//
// !> **Note:** Once Purge Protection has been enabled it's not possible to disable it. Deleting the App Configuration with Purge Protection enabled will schedule the App Configuration to be deleted (which will happen by Azure in the configured number of days).
PurgeProtectionEnabled pulumi.BoolPtrInput
// One or more `replica` blocks as defined below.
Replicas ConfigurationStoreReplicaArrayInput
// The name of the resource group in which to create the App Configuration. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringPtrInput
// A `secondaryReadKey` block as defined below containing the secondary read access key.
SecondaryReadKeys ConfigurationStoreSecondaryReadKeyArrayInput
// A `secondaryWriteKey` block as defined below containing the secondary write access key.
SecondaryWriteKeys ConfigurationStoreSecondaryWriteKeyArrayInput
// The SKU name of the App Configuration. Possible values are `free` and `standard`. Defaults to `free`.
Sku pulumi.StringPtrInput
// The number of days that items should be retained for once soft-deleted. This field only works for `standard` sku. This value can be between `1` and `7` days. Defaults to `7`. Changing this forces a new resource to be created.
//
// > **Note:** If Purge Protection is enabled, this field can only be configured one time and cannot be updated.
SoftDeleteRetentionDays pulumi.IntPtrInput
// A mapping of tags to assign to the resource.
Tags pulumi.StringMapInput
}
func (ConfigurationStoreState) ElementType() reflect.Type {
return reflect.TypeOf((*configurationStoreState)(nil)).Elem()
}
type configurationStoreArgs struct {
// An `encryption` block as defined below.
Encryption *ConfigurationStoreEncryption `pulumi:"encryption"`
// An `identity` block as defined below.
//
// > **NOTE:** Azure does not allow a downgrade from `standard` to `free`.
Identity *ConfigurationStoreIdentity `pulumi:"identity"`
// Whether local authentication methods is enabled. Defaults to `true`.
LocalAuthEnabled *bool `pulumi:"localAuthEnabled"`
// Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
Location *string `pulumi:"location"`
// Specifies the name of the App Configuration. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// The Public Network Access setting of the App Configuration. Possible values are `Enabled` and `Disabled`.
//
// > **NOTE:** If `publicNetworkAccess` is not specified, the App Configuration will be created as `Automatic`. However, once a different value is defined, can not be set again as automatic.
PublicNetworkAccess *string `pulumi:"publicNetworkAccess"`
// Whether Purge Protection is enabled. This field only works for `standard` sku. Defaults to `false`.
//
// !> **Note:** Once Purge Protection has been enabled it's not possible to disable it. Deleting the App Configuration with Purge Protection enabled will schedule the App Configuration to be deleted (which will happen by Azure in the configured number of days).
PurgeProtectionEnabled *bool `pulumi:"purgeProtectionEnabled"`
// One or more `replica` blocks as defined below.
Replicas []ConfigurationStoreReplica `pulumi:"replicas"`
// The name of the resource group in which to create the App Configuration. Changing this forces a new resource to be created.
ResourceGroupName string `pulumi:"resourceGroupName"`
// The SKU name of the App Configuration. Possible values are `free` and `standard`. Defaults to `free`.
Sku *string `pulumi:"sku"`
// The number of days that items should be retained for once soft-deleted. This field only works for `standard` sku. This value can be between `1` and `7` days. Defaults to `7`. Changing this forces a new resource to be created.
//
// > **Note:** If Purge Protection is enabled, this field can only be configured one time and cannot be updated.
SoftDeleteRetentionDays *int `pulumi:"softDeleteRetentionDays"`
// A mapping of tags to assign to the resource.
Tags map[string]string `pulumi:"tags"`
}
// The set of arguments for constructing a ConfigurationStore resource.
type ConfigurationStoreArgs struct {
// An `encryption` block as defined below.
Encryption ConfigurationStoreEncryptionPtrInput
// An `identity` block as defined below.
//
// > **NOTE:** Azure does not allow a downgrade from `standard` to `free`.
Identity ConfigurationStoreIdentityPtrInput
// Whether local authentication methods is enabled. Defaults to `true`.
LocalAuthEnabled pulumi.BoolPtrInput
// Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
Location pulumi.StringPtrInput
// Specifies the name of the App Configuration. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// The Public Network Access setting of the App Configuration. Possible values are `Enabled` and `Disabled`.
//
// > **NOTE:** If `publicNetworkAccess` is not specified, the App Configuration will be created as `Automatic`. However, once a different value is defined, can not be set again as automatic.
PublicNetworkAccess pulumi.StringPtrInput
// Whether Purge Protection is enabled. This field only works for `standard` sku. Defaults to `false`.
//
// !> **Note:** Once Purge Protection has been enabled it's not possible to disable it. Deleting the App Configuration with Purge Protection enabled will schedule the App Configuration to be deleted (which will happen by Azure in the configured number of days).
PurgeProtectionEnabled pulumi.BoolPtrInput
// One or more `replica` blocks as defined below.
Replicas ConfigurationStoreReplicaArrayInput
// The name of the resource group in which to create the App Configuration. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringInput
// The SKU name of the App Configuration. Possible values are `free` and `standard`. Defaults to `free`.
Sku pulumi.StringPtrInput
// The number of days that items should be retained for once soft-deleted. This field only works for `standard` sku. This value can be between `1` and `7` days. Defaults to `7`. Changing this forces a new resource to be created.
//
// > **Note:** If Purge Protection is enabled, this field can only be configured one time and cannot be updated.
SoftDeleteRetentionDays pulumi.IntPtrInput
// A mapping of tags to assign to the resource.
Tags pulumi.StringMapInput
}
func (ConfigurationStoreArgs) ElementType() reflect.Type {
return reflect.TypeOf((*configurationStoreArgs)(nil)).Elem()
}
type ConfigurationStoreInput interface {
pulumi.Input
ToConfigurationStoreOutput() ConfigurationStoreOutput
ToConfigurationStoreOutputWithContext(ctx context.Context) ConfigurationStoreOutput
}
func (*ConfigurationStore) ElementType() reflect.Type {
return reflect.TypeOf((**ConfigurationStore)(nil)).Elem()
}
func (i *ConfigurationStore) ToConfigurationStoreOutput() ConfigurationStoreOutput {
return i.ToConfigurationStoreOutputWithContext(context.Background())
}
func (i *ConfigurationStore) ToConfigurationStoreOutputWithContext(ctx context.Context) ConfigurationStoreOutput {
return pulumi.ToOutputWithContext(ctx, i).(ConfigurationStoreOutput)
}
// ConfigurationStoreArrayInput is an input type that accepts ConfigurationStoreArray and ConfigurationStoreArrayOutput values.
// You can construct a concrete instance of `ConfigurationStoreArrayInput` via:
//
// ConfigurationStoreArray{ ConfigurationStoreArgs{...} }
type ConfigurationStoreArrayInput interface {
pulumi.Input
ToConfigurationStoreArrayOutput() ConfigurationStoreArrayOutput
ToConfigurationStoreArrayOutputWithContext(context.Context) ConfigurationStoreArrayOutput
}
type ConfigurationStoreArray []ConfigurationStoreInput
func (ConfigurationStoreArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*ConfigurationStore)(nil)).Elem()
}
func (i ConfigurationStoreArray) ToConfigurationStoreArrayOutput() ConfigurationStoreArrayOutput {
return i.ToConfigurationStoreArrayOutputWithContext(context.Background())
}
func (i ConfigurationStoreArray) ToConfigurationStoreArrayOutputWithContext(ctx context.Context) ConfigurationStoreArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(ConfigurationStoreArrayOutput)
}
// ConfigurationStoreMapInput is an input type that accepts ConfigurationStoreMap and ConfigurationStoreMapOutput values.
// You can construct a concrete instance of `ConfigurationStoreMapInput` via:
//
// ConfigurationStoreMap{ "key": ConfigurationStoreArgs{...} }
type ConfigurationStoreMapInput interface {
pulumi.Input
ToConfigurationStoreMapOutput() ConfigurationStoreMapOutput
ToConfigurationStoreMapOutputWithContext(context.Context) ConfigurationStoreMapOutput
}
type ConfigurationStoreMap map[string]ConfigurationStoreInput
func (ConfigurationStoreMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*ConfigurationStore)(nil)).Elem()
}
func (i ConfigurationStoreMap) ToConfigurationStoreMapOutput() ConfigurationStoreMapOutput {
return i.ToConfigurationStoreMapOutputWithContext(context.Background())
}
func (i ConfigurationStoreMap) ToConfigurationStoreMapOutputWithContext(ctx context.Context) ConfigurationStoreMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(ConfigurationStoreMapOutput)
}
type ConfigurationStoreOutput struct{ *pulumi.OutputState }
func (ConfigurationStoreOutput) ElementType() reflect.Type {
return reflect.TypeOf((**ConfigurationStore)(nil)).Elem()
}
func (o ConfigurationStoreOutput) ToConfigurationStoreOutput() ConfigurationStoreOutput {
return o
}
func (o ConfigurationStoreOutput) ToConfigurationStoreOutputWithContext(ctx context.Context) ConfigurationStoreOutput {
return o
}
// An `encryption` block as defined below.
func (o ConfigurationStoreOutput) Encryption() ConfigurationStoreEncryptionPtrOutput {
return o.ApplyT(func(v *ConfigurationStore) ConfigurationStoreEncryptionPtrOutput { return v.Encryption }).(ConfigurationStoreEncryptionPtrOutput)
}
// The URL of the App Configuration Replica.
func (o ConfigurationStoreOutput) Endpoint() pulumi.StringOutput {
return o.ApplyT(func(v *ConfigurationStore) pulumi.StringOutput { return v.Endpoint }).(pulumi.StringOutput)
}
// An `identity` block as defined below.
//
// > **NOTE:** Azure does not allow a downgrade from `standard` to `free`.
func (o ConfigurationStoreOutput) Identity() ConfigurationStoreIdentityPtrOutput {
return o.ApplyT(func(v *ConfigurationStore) ConfigurationStoreIdentityPtrOutput { return v.Identity }).(ConfigurationStoreIdentityPtrOutput)
}
// Whether local authentication methods is enabled. Defaults to `true`.
func (o ConfigurationStoreOutput) LocalAuthEnabled() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *ConfigurationStore) pulumi.BoolPtrOutput { return v.LocalAuthEnabled }).(pulumi.BoolPtrOutput)
}
// Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
func (o ConfigurationStoreOutput) Location() pulumi.StringOutput {
return o.ApplyT(func(v *ConfigurationStore) pulumi.StringOutput { return v.Location }).(pulumi.StringOutput)
}
// Specifies the name of the App Configuration. Changing this forces a new resource to be created.
func (o ConfigurationStoreOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *ConfigurationStore) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// A `primaryReadKey` block as defined below containing the primary read access key.
func (o ConfigurationStoreOutput) PrimaryReadKeys() ConfigurationStorePrimaryReadKeyArrayOutput {
return o.ApplyT(func(v *ConfigurationStore) ConfigurationStorePrimaryReadKeyArrayOutput { return v.PrimaryReadKeys }).(ConfigurationStorePrimaryReadKeyArrayOutput)
}
// A `primaryWriteKey` block as defined below containing the primary write access key.
func (o ConfigurationStoreOutput) PrimaryWriteKeys() ConfigurationStorePrimaryWriteKeyArrayOutput {
return o.ApplyT(func(v *ConfigurationStore) ConfigurationStorePrimaryWriteKeyArrayOutput { return v.PrimaryWriteKeys }).(ConfigurationStorePrimaryWriteKeyArrayOutput)
}
// The Public Network Access setting of the App Configuration. Possible values are `Enabled` and `Disabled`.
//
// > **NOTE:** If `publicNetworkAccess` is not specified, the App Configuration will be created as `Automatic`. However, once a different value is defined, can not be set again as automatic.
func (o ConfigurationStoreOutput) PublicNetworkAccess() pulumi.StringPtrOutput {
return o.ApplyT(func(v *ConfigurationStore) pulumi.StringPtrOutput { return v.PublicNetworkAccess }).(pulumi.StringPtrOutput)
}
// Whether Purge Protection is enabled. This field only works for `standard` sku. Defaults to `false`.
//
// !> **Note:** Once Purge Protection has been enabled it's not possible to disable it. Deleting the App Configuration with Purge Protection enabled will schedule the App Configuration to be deleted (which will happen by Azure in the configured number of days).
func (o ConfigurationStoreOutput) PurgeProtectionEnabled() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *ConfigurationStore) pulumi.BoolPtrOutput { return v.PurgeProtectionEnabled }).(pulumi.BoolPtrOutput)
}
// One or more `replica` blocks as defined below.
func (o ConfigurationStoreOutput) Replicas() ConfigurationStoreReplicaArrayOutput {
return o.ApplyT(func(v *ConfigurationStore) ConfigurationStoreReplicaArrayOutput { return v.Replicas }).(ConfigurationStoreReplicaArrayOutput)
}
// The name of the resource group in which to create the App Configuration. Changing this forces a new resource to be created.
func (o ConfigurationStoreOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v *ConfigurationStore) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput)
}
// A `secondaryReadKey` block as defined below containing the secondary read access key.
func (o ConfigurationStoreOutput) SecondaryReadKeys() ConfigurationStoreSecondaryReadKeyArrayOutput {
return o.ApplyT(func(v *ConfigurationStore) ConfigurationStoreSecondaryReadKeyArrayOutput { return v.SecondaryReadKeys }).(ConfigurationStoreSecondaryReadKeyArrayOutput)
}
// A `secondaryWriteKey` block as defined below containing the secondary write access key.
func (o ConfigurationStoreOutput) SecondaryWriteKeys() ConfigurationStoreSecondaryWriteKeyArrayOutput {
return o.ApplyT(func(v *ConfigurationStore) ConfigurationStoreSecondaryWriteKeyArrayOutput {
return v.SecondaryWriteKeys
}).(ConfigurationStoreSecondaryWriteKeyArrayOutput)
}
// The SKU name of the App Configuration. Possible values are `free` and `standard`. Defaults to `free`.
func (o ConfigurationStoreOutput) Sku() pulumi.StringPtrOutput {
return o.ApplyT(func(v *ConfigurationStore) pulumi.StringPtrOutput { return v.Sku }).(pulumi.StringPtrOutput)
}
// The number of days that items should be retained for once soft-deleted. This field only works for `standard` sku. This value can be between `1` and `7` days. Defaults to `7`. Changing this forces a new resource to be created.
//
// > **Note:** If Purge Protection is enabled, this field can only be configured one time and cannot be updated.
func (o ConfigurationStoreOutput) SoftDeleteRetentionDays() pulumi.IntPtrOutput {
return o.ApplyT(func(v *ConfigurationStore) pulumi.IntPtrOutput { return v.SoftDeleteRetentionDays }).(pulumi.IntPtrOutput)
}
// A mapping of tags to assign to the resource.
func (o ConfigurationStoreOutput) Tags() pulumi.StringMapOutput {
return o.ApplyT(func(v *ConfigurationStore) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput)
}
type ConfigurationStoreArrayOutput struct{ *pulumi.OutputState }
func (ConfigurationStoreArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*ConfigurationStore)(nil)).Elem()
}
func (o ConfigurationStoreArrayOutput) ToConfigurationStoreArrayOutput() ConfigurationStoreArrayOutput {
return o
}
func (o ConfigurationStoreArrayOutput) ToConfigurationStoreArrayOutputWithContext(ctx context.Context) ConfigurationStoreArrayOutput {
return o
}
func (o ConfigurationStoreArrayOutput) Index(i pulumi.IntInput) ConfigurationStoreOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *ConfigurationStore {
return vs[0].([]*ConfigurationStore)[vs[1].(int)]
}).(ConfigurationStoreOutput)
}
type ConfigurationStoreMapOutput struct{ *pulumi.OutputState }
func (ConfigurationStoreMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*ConfigurationStore)(nil)).Elem()
}
func (o ConfigurationStoreMapOutput) ToConfigurationStoreMapOutput() ConfigurationStoreMapOutput {
return o
}
func (o ConfigurationStoreMapOutput) ToConfigurationStoreMapOutputWithContext(ctx context.Context) ConfigurationStoreMapOutput {
return o
}
func (o ConfigurationStoreMapOutput) MapIndex(k pulumi.StringInput) ConfigurationStoreOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *ConfigurationStore {
return vs[0].(map[string]*ConfigurationStore)[vs[1].(string)]
}).(ConfigurationStoreOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*ConfigurationStoreInput)(nil)).Elem(), &ConfigurationStore{})
pulumi.RegisterInputType(reflect.TypeOf((*ConfigurationStoreArrayInput)(nil)).Elem(), ConfigurationStoreArray{})
pulumi.RegisterInputType(reflect.TypeOf((*ConfigurationStoreMapInput)(nil)).Elem(), ConfigurationStoreMap{})
pulumi.RegisterOutputType(ConfigurationStoreOutput{})
pulumi.RegisterOutputType(ConfigurationStoreArrayOutput{})
pulumi.RegisterOutputType(ConfigurationStoreMapOutput{})
}