-
Notifications
You must be signed in to change notification settings - Fork 51
/
managedInstanceTransparentDataEncryption.go
489 lines (440 loc) · 24.2 KB
/
managedInstanceTransparentDataEncryption.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
// 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 mssql
import (
"context"
"reflect"
"github.com/pkg/errors"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages the transparent data encryption configuration for a MSSQL Managed Instance
//
// > **NOTE:** Once transparent data encryption is enabled on a MS SQL instance, it is not possible to remove TDE. You will be able to switch between 'ServiceManaged' and 'CustomerManaged' keys, but will not be able to remove encryption. For safety when this resource is deleted, the TDE mode will automatically be set to 'ServiceManaged'. See `keyVaultUri` for more information on how to specify the key types. As SQL Managed Instance only supports a single configuration for encryption settings, this resource will replace the current encryption settings on the server.
//
// > **Note:** See [documentation](https://docs.microsoft.com/azure/azure-sql/database/transparent-data-encryption-byok-overview) for important information on how handle lifecycle management of the keys to prevent data lockout.
//
// ## Example Usage
// ### With Service Managed Key
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v5/go/azure/core"
// "github.com/pulumi/pulumi-azure/sdk/v5/go/azure/mssql"
// "github.com/pulumi/pulumi-azure/sdk/v5/go/azure/network"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// exampleResourceGroup, err := core.NewResourceGroup(ctx, "exampleResourceGroup", &core.ResourceGroupArgs{
// Location: pulumi.String("EastUs"),
// })
// if err != nil {
// return err
// }
// exampleVirtualNetwork, err := network.NewVirtualNetwork(ctx, "exampleVirtualNetwork", &network.VirtualNetworkArgs{
// ResourceGroupName: exampleResourceGroup.Name,
// AddressSpaces: pulumi.StringArray{
// pulumi.String("10.0.0.0/16"),
// },
// Location: pulumi.Any(azurerm_resource_group.Test.Location),
// })
// if err != nil {
// return err
// }
// exampleSubnet, err := network.NewSubnet(ctx, "exampleSubnet", &network.SubnetArgs{
// ResourceGroupName: exampleResourceGroup.Name,
// VirtualNetworkName: exampleVirtualNetwork.Name,
// AddressPrefixes: pulumi.StringArray{
// pulumi.String("10.0.0.0/24"),
// },
// Delegations: network.SubnetDelegationArray{
// &network.SubnetDelegationArgs{
// Name: pulumi.String("managedinstancedelegation"),
// ServiceDelegation: &network.SubnetDelegationServiceDelegationArgs{
// Name: pulumi.String("Microsoft.Sql/managedInstances"),
// Actions: pulumi.StringArray{
// pulumi.String("Microsoft.Network/virtualNetworks/subnets/join/action"),
// pulumi.String("Microsoft.Network/virtualNetworks/subnets/prepareNetworkPolicies/action"),
// pulumi.String("Microsoft.Network/virtualNetworks/subnets/unprepareNetworkPolicies/action"),
// },
// },
// },
// },
// })
// if err != nil {
// return err
// }
// exampleManagedInstance, err := mssql.NewManagedInstance(ctx, "exampleManagedInstance", &mssql.ManagedInstanceArgs{
// ResourceGroupName: exampleResourceGroup.Name,
// Location: exampleResourceGroup.Location,
// LicenseType: pulumi.String("BasePrice"),
// SkuName: pulumi.String("GP_Gen5"),
// StorageSizeInGb: pulumi.Int(32),
// SubnetId: exampleSubnet.ID(),
// Vcores: pulumi.Int(4),
// AdministratorLogin: pulumi.String("missadministrator"),
// AdministratorLoginPassword: pulumi.String("NCC-1701-D"),
// Identity: &mssql.ManagedInstanceIdentityArgs{
// Type: pulumi.String("SystemAssigned"),
// },
// })
// if err != nil {
// return err
// }
// _, err = mssql.NewManagedInstanceTransparentDataEncryption(ctx, "exampleManagedInstanceTransparentDataEncryption", &mssql.ManagedInstanceTransparentDataEncryptionArgs{
// ManagedInstanceId: exampleManagedInstance.ID(),
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
// ### With Customer Managed Key
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v5/go/azure/core"
// "github.com/pulumi/pulumi-azure/sdk/v5/go/azure/keyvault"
// "github.com/pulumi/pulumi-azure/sdk/v5/go/azure/mssql"
// "github.com/pulumi/pulumi-azure/sdk/v5/go/azure/network"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// current, err := core.GetClientConfig(ctx, nil, nil)
// if err != nil {
// return err
// }
// exampleResourceGroup, err := core.NewResourceGroup(ctx, "exampleResourceGroup", &core.ResourceGroupArgs{
// Location: pulumi.String("EastUs"),
// })
// if err != nil {
// return err
// }
// exampleVirtualNetwork, err := network.NewVirtualNetwork(ctx, "exampleVirtualNetwork", &network.VirtualNetworkArgs{
// ResourceGroupName: exampleResourceGroup.Name,
// AddressSpaces: pulumi.StringArray{
// pulumi.String("10.0.0.0/16"),
// },
// Location: pulumi.Any(azurerm_resource_group.Test.Location),
// })
// if err != nil {
// return err
// }
// exampleSubnet, err := network.NewSubnet(ctx, "exampleSubnet", &network.SubnetArgs{
// ResourceGroupName: exampleResourceGroup.Name,
// VirtualNetworkName: exampleVirtualNetwork.Name,
// AddressPrefixes: pulumi.StringArray{
// pulumi.String("10.0.0.0/24"),
// },
// Delegations: network.SubnetDelegationArray{
// &network.SubnetDelegationArgs{
// Name: pulumi.String("managedinstancedelegation"),
// ServiceDelegation: &network.SubnetDelegationServiceDelegationArgs{
// Name: pulumi.String("Microsoft.Sql/managedInstances"),
// Actions: pulumi.StringArray{
// pulumi.String("Microsoft.Network/virtualNetworks/subnets/join/action"),
// pulumi.String("Microsoft.Network/virtualNetworks/subnets/prepareNetworkPolicies/action"),
// pulumi.String("Microsoft.Network/virtualNetworks/subnets/unprepareNetworkPolicies/action"),
// },
// },
// },
// },
// })
// if err != nil {
// return err
// }
// exampleManagedInstance, err := mssql.NewManagedInstance(ctx, "exampleManagedInstance", &mssql.ManagedInstanceArgs{
// ResourceGroupName: exampleResourceGroup.Name,
// Location: exampleResourceGroup.Location,
// LicenseType: pulumi.String("BasePrice"),
// SkuName: pulumi.String("GP_Gen5"),
// StorageSizeInGb: pulumi.Int(32),
// SubnetId: exampleSubnet.ID(),
// Vcores: pulumi.Int(4),
// AdministratorLogin: pulumi.String("missadministrator"),
// AdministratorLoginPassword: pulumi.String("NCC-1701-D"),
// Identity: &mssql.ManagedInstanceIdentityArgs{
// Type: pulumi.String("SystemAssigned"),
// },
// })
// if err != nil {
// return err
// }
// exampleKeyVault, err := keyvault.NewKeyVault(ctx, "exampleKeyVault", &keyvault.KeyVaultArgs{
// Location: exampleResourceGroup.Location,
// ResourceGroupName: exampleResourceGroup.Name,
// EnabledForDiskEncryption: pulumi.Bool(true),
// TenantId: *pulumi.String(current.TenantId),
// SoftDeleteRetentionDays: pulumi.Int(7),
// PurgeProtectionEnabled: pulumi.Bool(false),
// SkuName: pulumi.String("standard"),
// AccessPolicies: keyvault.KeyVaultAccessPolicyArray{
// &keyvault.KeyVaultAccessPolicyArgs{
// TenantId: *pulumi.String(current.TenantId),
// ObjectId: *pulumi.String(current.ObjectId),
// KeyPermissions: pulumi.StringArray{
// pulumi.String("Get"),
// pulumi.String("List"),
// pulumi.String("Create"),
// pulumi.String("Delete"),
// pulumi.String("Update"),
// pulumi.String("Recover"),
// pulumi.String("Purge"),
// },
// },
// &keyvault.KeyVaultAccessPolicyArgs{
// TenantId: exampleManagedInstance.Identity.ApplyT(func(identity mssql.ManagedInstanceIdentity) (*string, error) {
// return &identity.TenantId, nil
// }).(pulumi.StringPtrOutput),
// ObjectId: exampleManagedInstance.Identity.ApplyT(func(identity mssql.ManagedInstanceIdentity) (*string, error) {
// return &identity.PrincipalId, nil
// }).(pulumi.StringPtrOutput),
// KeyPermissions: pulumi.StringArray{
// pulumi.String("Get"),
// pulumi.String("WrapKey"),
// pulumi.String("UnwrapKey"),
// },
// },
// },
// })
// if err != nil {
// return err
// }
// exampleKey, err := keyvault.NewKey(ctx, "exampleKey", &keyvault.KeyArgs{
// KeyVaultId: exampleKeyVault.ID(),
// KeyType: pulumi.String("RSA"),
// KeySize: pulumi.Int(2048),
// KeyOpts: pulumi.StringArray{
// pulumi.String("unwrapKey"),
// pulumi.String("wrapKey"),
// },
// }, pulumi.DependsOn([]pulumi.Resource{
// exampleKeyVault,
// }))
// if err != nil {
// return err
// }
// _, err = mssql.NewManagedInstanceTransparentDataEncryption(ctx, "exampleManagedInstanceTransparentDataEncryption", &mssql.ManagedInstanceTransparentDataEncryptionArgs{
// ManagedInstanceId: exampleManagedInstance.ID(),
// KeyVaultKeyId: exampleKey.ID(),
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// ## Import
//
// SQL Managed Instance Transparent Data Encryption can be imported using the resource id, e.g.
//
// ```sh
//
// $ pulumi import azure:mssql/managedInstanceTransparentDataEncryption:ManagedInstanceTransparentDataEncryption example /subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/group1/providers/Microsoft.Sql/managedInstances/instance1/encryptionProtector/current
//
// ```
type ManagedInstanceTransparentDataEncryption struct {
pulumi.CustomResourceState
// When enabled, the SQL Managed Instance will continuously check the key vault for any new versions of the key being used as the TDE protector. If a new version of the key is detected, the TDE protector on the SQL Managed Instance will be automatically rotated to the latest key version within 60 minutes.
AutoRotationEnabled pulumi.BoolPtrOutput `pulumi:"autoRotationEnabled"`
// To use customer managed keys from Azure Key Vault, provide the AKV Key ID. To use service managed keys, omit this field.
KeyVaultKeyId pulumi.StringPtrOutput `pulumi:"keyVaultKeyId"`
// Specifies the name of the MS SQL Managed Instance. Changing this forces a new resource to be created.
ManagedInstanceId pulumi.StringOutput `pulumi:"managedInstanceId"`
}
// NewManagedInstanceTransparentDataEncryption registers a new resource with the given unique name, arguments, and options.
func NewManagedInstanceTransparentDataEncryption(ctx *pulumi.Context,
name string, args *ManagedInstanceTransparentDataEncryptionArgs, opts ...pulumi.ResourceOption) (*ManagedInstanceTransparentDataEncryption, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.ManagedInstanceId == nil {
return nil, errors.New("invalid value for required argument 'ManagedInstanceId'")
}
var resource ManagedInstanceTransparentDataEncryption
err := ctx.RegisterResource("azure:mssql/managedInstanceTransparentDataEncryption:ManagedInstanceTransparentDataEncryption", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetManagedInstanceTransparentDataEncryption gets an existing ManagedInstanceTransparentDataEncryption 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 GetManagedInstanceTransparentDataEncryption(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *ManagedInstanceTransparentDataEncryptionState, opts ...pulumi.ResourceOption) (*ManagedInstanceTransparentDataEncryption, error) {
var resource ManagedInstanceTransparentDataEncryption
err := ctx.ReadResource("azure:mssql/managedInstanceTransparentDataEncryption:ManagedInstanceTransparentDataEncryption", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering ManagedInstanceTransparentDataEncryption resources.
type managedInstanceTransparentDataEncryptionState struct {
// When enabled, the SQL Managed Instance will continuously check the key vault for any new versions of the key being used as the TDE protector. If a new version of the key is detected, the TDE protector on the SQL Managed Instance will be automatically rotated to the latest key version within 60 minutes.
AutoRotationEnabled *bool `pulumi:"autoRotationEnabled"`
// To use customer managed keys from Azure Key Vault, provide the AKV Key ID. To use service managed keys, omit this field.
KeyVaultKeyId *string `pulumi:"keyVaultKeyId"`
// Specifies the name of the MS SQL Managed Instance. Changing this forces a new resource to be created.
ManagedInstanceId *string `pulumi:"managedInstanceId"`
}
type ManagedInstanceTransparentDataEncryptionState struct {
// When enabled, the SQL Managed Instance will continuously check the key vault for any new versions of the key being used as the TDE protector. If a new version of the key is detected, the TDE protector on the SQL Managed Instance will be automatically rotated to the latest key version within 60 minutes.
AutoRotationEnabled pulumi.BoolPtrInput
// To use customer managed keys from Azure Key Vault, provide the AKV Key ID. To use service managed keys, omit this field.
KeyVaultKeyId pulumi.StringPtrInput
// Specifies the name of the MS SQL Managed Instance. Changing this forces a new resource to be created.
ManagedInstanceId pulumi.StringPtrInput
}
func (ManagedInstanceTransparentDataEncryptionState) ElementType() reflect.Type {
return reflect.TypeOf((*managedInstanceTransparentDataEncryptionState)(nil)).Elem()
}
type managedInstanceTransparentDataEncryptionArgs struct {
// When enabled, the SQL Managed Instance will continuously check the key vault for any new versions of the key being used as the TDE protector. If a new version of the key is detected, the TDE protector on the SQL Managed Instance will be automatically rotated to the latest key version within 60 minutes.
AutoRotationEnabled *bool `pulumi:"autoRotationEnabled"`
// To use customer managed keys from Azure Key Vault, provide the AKV Key ID. To use service managed keys, omit this field.
KeyVaultKeyId *string `pulumi:"keyVaultKeyId"`
// Specifies the name of the MS SQL Managed Instance. Changing this forces a new resource to be created.
ManagedInstanceId string `pulumi:"managedInstanceId"`
}
// The set of arguments for constructing a ManagedInstanceTransparentDataEncryption resource.
type ManagedInstanceTransparentDataEncryptionArgs struct {
// When enabled, the SQL Managed Instance will continuously check the key vault for any new versions of the key being used as the TDE protector. If a new version of the key is detected, the TDE protector on the SQL Managed Instance will be automatically rotated to the latest key version within 60 minutes.
AutoRotationEnabled pulumi.BoolPtrInput
// To use customer managed keys from Azure Key Vault, provide the AKV Key ID. To use service managed keys, omit this field.
KeyVaultKeyId pulumi.StringPtrInput
// Specifies the name of the MS SQL Managed Instance. Changing this forces a new resource to be created.
ManagedInstanceId pulumi.StringInput
}
func (ManagedInstanceTransparentDataEncryptionArgs) ElementType() reflect.Type {
return reflect.TypeOf((*managedInstanceTransparentDataEncryptionArgs)(nil)).Elem()
}
type ManagedInstanceTransparentDataEncryptionInput interface {
pulumi.Input
ToManagedInstanceTransparentDataEncryptionOutput() ManagedInstanceTransparentDataEncryptionOutput
ToManagedInstanceTransparentDataEncryptionOutputWithContext(ctx context.Context) ManagedInstanceTransparentDataEncryptionOutput
}
func (*ManagedInstanceTransparentDataEncryption) ElementType() reflect.Type {
return reflect.TypeOf((**ManagedInstanceTransparentDataEncryption)(nil)).Elem()
}
func (i *ManagedInstanceTransparentDataEncryption) ToManagedInstanceTransparentDataEncryptionOutput() ManagedInstanceTransparentDataEncryptionOutput {
return i.ToManagedInstanceTransparentDataEncryptionOutputWithContext(context.Background())
}
func (i *ManagedInstanceTransparentDataEncryption) ToManagedInstanceTransparentDataEncryptionOutputWithContext(ctx context.Context) ManagedInstanceTransparentDataEncryptionOutput {
return pulumi.ToOutputWithContext(ctx, i).(ManagedInstanceTransparentDataEncryptionOutput)
}
// ManagedInstanceTransparentDataEncryptionArrayInput is an input type that accepts ManagedInstanceTransparentDataEncryptionArray and ManagedInstanceTransparentDataEncryptionArrayOutput values.
// You can construct a concrete instance of `ManagedInstanceTransparentDataEncryptionArrayInput` via:
//
// ManagedInstanceTransparentDataEncryptionArray{ ManagedInstanceTransparentDataEncryptionArgs{...} }
type ManagedInstanceTransparentDataEncryptionArrayInput interface {
pulumi.Input
ToManagedInstanceTransparentDataEncryptionArrayOutput() ManagedInstanceTransparentDataEncryptionArrayOutput
ToManagedInstanceTransparentDataEncryptionArrayOutputWithContext(context.Context) ManagedInstanceTransparentDataEncryptionArrayOutput
}
type ManagedInstanceTransparentDataEncryptionArray []ManagedInstanceTransparentDataEncryptionInput
func (ManagedInstanceTransparentDataEncryptionArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*ManagedInstanceTransparentDataEncryption)(nil)).Elem()
}
func (i ManagedInstanceTransparentDataEncryptionArray) ToManagedInstanceTransparentDataEncryptionArrayOutput() ManagedInstanceTransparentDataEncryptionArrayOutput {
return i.ToManagedInstanceTransparentDataEncryptionArrayOutputWithContext(context.Background())
}
func (i ManagedInstanceTransparentDataEncryptionArray) ToManagedInstanceTransparentDataEncryptionArrayOutputWithContext(ctx context.Context) ManagedInstanceTransparentDataEncryptionArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(ManagedInstanceTransparentDataEncryptionArrayOutput)
}
// ManagedInstanceTransparentDataEncryptionMapInput is an input type that accepts ManagedInstanceTransparentDataEncryptionMap and ManagedInstanceTransparentDataEncryptionMapOutput values.
// You can construct a concrete instance of `ManagedInstanceTransparentDataEncryptionMapInput` via:
//
// ManagedInstanceTransparentDataEncryptionMap{ "key": ManagedInstanceTransparentDataEncryptionArgs{...} }
type ManagedInstanceTransparentDataEncryptionMapInput interface {
pulumi.Input
ToManagedInstanceTransparentDataEncryptionMapOutput() ManagedInstanceTransparentDataEncryptionMapOutput
ToManagedInstanceTransparentDataEncryptionMapOutputWithContext(context.Context) ManagedInstanceTransparentDataEncryptionMapOutput
}
type ManagedInstanceTransparentDataEncryptionMap map[string]ManagedInstanceTransparentDataEncryptionInput
func (ManagedInstanceTransparentDataEncryptionMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*ManagedInstanceTransparentDataEncryption)(nil)).Elem()
}
func (i ManagedInstanceTransparentDataEncryptionMap) ToManagedInstanceTransparentDataEncryptionMapOutput() ManagedInstanceTransparentDataEncryptionMapOutput {
return i.ToManagedInstanceTransparentDataEncryptionMapOutputWithContext(context.Background())
}
func (i ManagedInstanceTransparentDataEncryptionMap) ToManagedInstanceTransparentDataEncryptionMapOutputWithContext(ctx context.Context) ManagedInstanceTransparentDataEncryptionMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(ManagedInstanceTransparentDataEncryptionMapOutput)
}
type ManagedInstanceTransparentDataEncryptionOutput struct{ *pulumi.OutputState }
func (ManagedInstanceTransparentDataEncryptionOutput) ElementType() reflect.Type {
return reflect.TypeOf((**ManagedInstanceTransparentDataEncryption)(nil)).Elem()
}
func (o ManagedInstanceTransparentDataEncryptionOutput) ToManagedInstanceTransparentDataEncryptionOutput() ManagedInstanceTransparentDataEncryptionOutput {
return o
}
func (o ManagedInstanceTransparentDataEncryptionOutput) ToManagedInstanceTransparentDataEncryptionOutputWithContext(ctx context.Context) ManagedInstanceTransparentDataEncryptionOutput {
return o
}
// When enabled, the SQL Managed Instance will continuously check the key vault for any new versions of the key being used as the TDE protector. If a new version of the key is detected, the TDE protector on the SQL Managed Instance will be automatically rotated to the latest key version within 60 minutes.
func (o ManagedInstanceTransparentDataEncryptionOutput) AutoRotationEnabled() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *ManagedInstanceTransparentDataEncryption) pulumi.BoolPtrOutput { return v.AutoRotationEnabled }).(pulumi.BoolPtrOutput)
}
// To use customer managed keys from Azure Key Vault, provide the AKV Key ID. To use service managed keys, omit this field.
func (o ManagedInstanceTransparentDataEncryptionOutput) KeyVaultKeyId() pulumi.StringPtrOutput {
return o.ApplyT(func(v *ManagedInstanceTransparentDataEncryption) pulumi.StringPtrOutput { return v.KeyVaultKeyId }).(pulumi.StringPtrOutput)
}
// Specifies the name of the MS SQL Managed Instance. Changing this forces a new resource to be created.
func (o ManagedInstanceTransparentDataEncryptionOutput) ManagedInstanceId() pulumi.StringOutput {
return o.ApplyT(func(v *ManagedInstanceTransparentDataEncryption) pulumi.StringOutput { return v.ManagedInstanceId }).(pulumi.StringOutput)
}
type ManagedInstanceTransparentDataEncryptionArrayOutput struct{ *pulumi.OutputState }
func (ManagedInstanceTransparentDataEncryptionArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*ManagedInstanceTransparentDataEncryption)(nil)).Elem()
}
func (o ManagedInstanceTransparentDataEncryptionArrayOutput) ToManagedInstanceTransparentDataEncryptionArrayOutput() ManagedInstanceTransparentDataEncryptionArrayOutput {
return o
}
func (o ManagedInstanceTransparentDataEncryptionArrayOutput) ToManagedInstanceTransparentDataEncryptionArrayOutputWithContext(ctx context.Context) ManagedInstanceTransparentDataEncryptionArrayOutput {
return o
}
func (o ManagedInstanceTransparentDataEncryptionArrayOutput) Index(i pulumi.IntInput) ManagedInstanceTransparentDataEncryptionOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *ManagedInstanceTransparentDataEncryption {
return vs[0].([]*ManagedInstanceTransparentDataEncryption)[vs[1].(int)]
}).(ManagedInstanceTransparentDataEncryptionOutput)
}
type ManagedInstanceTransparentDataEncryptionMapOutput struct{ *pulumi.OutputState }
func (ManagedInstanceTransparentDataEncryptionMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*ManagedInstanceTransparentDataEncryption)(nil)).Elem()
}
func (o ManagedInstanceTransparentDataEncryptionMapOutput) ToManagedInstanceTransparentDataEncryptionMapOutput() ManagedInstanceTransparentDataEncryptionMapOutput {
return o
}
func (o ManagedInstanceTransparentDataEncryptionMapOutput) ToManagedInstanceTransparentDataEncryptionMapOutputWithContext(ctx context.Context) ManagedInstanceTransparentDataEncryptionMapOutput {
return o
}
func (o ManagedInstanceTransparentDataEncryptionMapOutput) MapIndex(k pulumi.StringInput) ManagedInstanceTransparentDataEncryptionOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *ManagedInstanceTransparentDataEncryption {
return vs[0].(map[string]*ManagedInstanceTransparentDataEncryption)[vs[1].(string)]
}).(ManagedInstanceTransparentDataEncryptionOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*ManagedInstanceTransparentDataEncryptionInput)(nil)).Elem(), &ManagedInstanceTransparentDataEncryption{})
pulumi.RegisterInputType(reflect.TypeOf((*ManagedInstanceTransparentDataEncryptionArrayInput)(nil)).Elem(), ManagedInstanceTransparentDataEncryptionArray{})
pulumi.RegisterInputType(reflect.TypeOf((*ManagedInstanceTransparentDataEncryptionMapInput)(nil)).Elem(), ManagedInstanceTransparentDataEncryptionMap{})
pulumi.RegisterOutputType(ManagedInstanceTransparentDataEncryptionOutput{})
pulumi.RegisterOutputType(ManagedInstanceTransparentDataEncryptionArrayOutput{})
pulumi.RegisterOutputType(ManagedInstanceTransparentDataEncryptionMapOutput{})
}