-
Notifications
You must be signed in to change notification settings - Fork 51
/
dataLakeGen2Filesystem.go
381 lines (328 loc) · 19.8 KB
/
dataLakeGen2Filesystem.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
// 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 storage
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages a Data Lake Gen2 File System within an Azure Storage Account.
//
// > **NOTE:** This resource requires some `Storage` specific roles which are not granted by default. Some of the built-ins roles that can be attributed are [`Storage Account Contributor`](https://docs.microsoft.com/azure/role-based-access-control/built-in-roles#storage-account-contributor), [`Storage Blob Data Owner`](https://docs.microsoft.com/azure/role-based-access-control/built-in-roles#storage-blob-data-owner), [`Storage Blob Data Contributor`](https://docs.microsoft.com/azure/role-based-access-control/built-in-roles#storage-blob-data-contributor), [`Storage Blob Data Reader`](https://docs.microsoft.com/azure/role-based-access-control/built-in-roles#storage-blob-data-reader).
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v5/go/azure/core"
// "github.com/pulumi/pulumi-azure/sdk/v5/go/azure/storage"
// "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
// }
// exampleAccount, err := storage.NewAccount(ctx, "example", &storage.AccountArgs{
// Name: pulumi.String("examplestorageacc"),
// ResourceGroupName: example.Name,
// Location: example.Location,
// AccountTier: pulumi.String("Standard"),
// AccountReplicationType: pulumi.String("LRS"),
// AccountKind: pulumi.String("StorageV2"),
// IsHnsEnabled: pulumi.Bool(true),
// })
// if err != nil {
// return err
// }
// _, err = storage.NewDataLakeGen2Filesystem(ctx, "example", &storage.DataLakeGen2FilesystemArgs{
// Name: pulumi.String("example"),
// StorageAccountId: exampleAccount.ID(),
// Properties: pulumi.StringMap{
// "hello": pulumi.String("aGVsbG8="),
// },
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// ## Import
//
// Data Lake Gen2 File System's can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:storage/dataLakeGen2Filesystem:DataLakeGen2Filesystem queue1 https://account1.dfs.core.windows.net/fileSystem1
// ```
type DataLakeGen2Filesystem struct {
pulumi.CustomResourceState
// One or more `ace` blocks as defined below to specify the entries for the ACL for the path.
Aces DataLakeGen2FilesystemAceArrayOutput `pulumi:"aces"`
// The default encryption scope to use for this filesystem. Changing this forces a new resource to be created.
DefaultEncryptionScope pulumi.StringOutput `pulumi:"defaultEncryptionScope"`
// Specifies the Object ID of the Azure Active Directory Group to make the owning group of the root path (i.e. `/`). Possible values also include `$superuser`.
//
// > **NOTE:** The Storage Account requires `accountKind` to be either `StorageV2` or `BlobStorage`. In addition, `isHnsEnabled` has to be set to `true`.
Group pulumi.StringOutput `pulumi:"group"`
// The name of the Data Lake Gen2 File System which should be created within the Storage Account. Must be unique within the storage account the queue is located. Changing this forces a new resource to be created.
Name pulumi.StringOutput `pulumi:"name"`
// Specifies the Object ID of the Azure Active Directory User to make the owning user of the root path (i.e. `/`). Possible values also include `$superuser`.
Owner pulumi.StringOutput `pulumi:"owner"`
// A mapping of Key to Base64-Encoded Values which should be assigned to this Data Lake Gen2 File System.
Properties pulumi.StringMapOutput `pulumi:"properties"`
// Specifies the ID of the Storage Account in which the Data Lake Gen2 File System should exist. Changing this forces a new resource to be created.
StorageAccountId pulumi.StringOutput `pulumi:"storageAccountId"`
}
// NewDataLakeGen2Filesystem registers a new resource with the given unique name, arguments, and options.
func NewDataLakeGen2Filesystem(ctx *pulumi.Context,
name string, args *DataLakeGen2FilesystemArgs, opts ...pulumi.ResourceOption) (*DataLakeGen2Filesystem, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.StorageAccountId == nil {
return nil, errors.New("invalid value for required argument 'StorageAccountId'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource DataLakeGen2Filesystem
err := ctx.RegisterResource("azure:storage/dataLakeGen2Filesystem:DataLakeGen2Filesystem", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetDataLakeGen2Filesystem gets an existing DataLakeGen2Filesystem 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 GetDataLakeGen2Filesystem(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *DataLakeGen2FilesystemState, opts ...pulumi.ResourceOption) (*DataLakeGen2Filesystem, error) {
var resource DataLakeGen2Filesystem
err := ctx.ReadResource("azure:storage/dataLakeGen2Filesystem:DataLakeGen2Filesystem", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering DataLakeGen2Filesystem resources.
type dataLakeGen2FilesystemState struct {
// One or more `ace` blocks as defined below to specify the entries for the ACL for the path.
Aces []DataLakeGen2FilesystemAce `pulumi:"aces"`
// The default encryption scope to use for this filesystem. Changing this forces a new resource to be created.
DefaultEncryptionScope *string `pulumi:"defaultEncryptionScope"`
// Specifies the Object ID of the Azure Active Directory Group to make the owning group of the root path (i.e. `/`). Possible values also include `$superuser`.
//
// > **NOTE:** The Storage Account requires `accountKind` to be either `StorageV2` or `BlobStorage`. In addition, `isHnsEnabled` has to be set to `true`.
Group *string `pulumi:"group"`
// The name of the Data Lake Gen2 File System which should be created within the Storage Account. Must be unique within the storage account the queue is located. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// Specifies the Object ID of the Azure Active Directory User to make the owning user of the root path (i.e. `/`). Possible values also include `$superuser`.
Owner *string `pulumi:"owner"`
// A mapping of Key to Base64-Encoded Values which should be assigned to this Data Lake Gen2 File System.
Properties map[string]string `pulumi:"properties"`
// Specifies the ID of the Storage Account in which the Data Lake Gen2 File System should exist. Changing this forces a new resource to be created.
StorageAccountId *string `pulumi:"storageAccountId"`
}
type DataLakeGen2FilesystemState struct {
// One or more `ace` blocks as defined below to specify the entries for the ACL for the path.
Aces DataLakeGen2FilesystemAceArrayInput
// The default encryption scope to use for this filesystem. Changing this forces a new resource to be created.
DefaultEncryptionScope pulumi.StringPtrInput
// Specifies the Object ID of the Azure Active Directory Group to make the owning group of the root path (i.e. `/`). Possible values also include `$superuser`.
//
// > **NOTE:** The Storage Account requires `accountKind` to be either `StorageV2` or `BlobStorage`. In addition, `isHnsEnabled` has to be set to `true`.
Group pulumi.StringPtrInput
// The name of the Data Lake Gen2 File System which should be created within the Storage Account. Must be unique within the storage account the queue is located. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// Specifies the Object ID of the Azure Active Directory User to make the owning user of the root path (i.e. `/`). Possible values also include `$superuser`.
Owner pulumi.StringPtrInput
// A mapping of Key to Base64-Encoded Values which should be assigned to this Data Lake Gen2 File System.
Properties pulumi.StringMapInput
// Specifies the ID of the Storage Account in which the Data Lake Gen2 File System should exist. Changing this forces a new resource to be created.
StorageAccountId pulumi.StringPtrInput
}
func (DataLakeGen2FilesystemState) ElementType() reflect.Type {
return reflect.TypeOf((*dataLakeGen2FilesystemState)(nil)).Elem()
}
type dataLakeGen2FilesystemArgs struct {
// One or more `ace` blocks as defined below to specify the entries for the ACL for the path.
Aces []DataLakeGen2FilesystemAce `pulumi:"aces"`
// The default encryption scope to use for this filesystem. Changing this forces a new resource to be created.
DefaultEncryptionScope *string `pulumi:"defaultEncryptionScope"`
// Specifies the Object ID of the Azure Active Directory Group to make the owning group of the root path (i.e. `/`). Possible values also include `$superuser`.
//
// > **NOTE:** The Storage Account requires `accountKind` to be either `StorageV2` or `BlobStorage`. In addition, `isHnsEnabled` has to be set to `true`.
Group *string `pulumi:"group"`
// The name of the Data Lake Gen2 File System which should be created within the Storage Account. Must be unique within the storage account the queue is located. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// Specifies the Object ID of the Azure Active Directory User to make the owning user of the root path (i.e. `/`). Possible values also include `$superuser`.
Owner *string `pulumi:"owner"`
// A mapping of Key to Base64-Encoded Values which should be assigned to this Data Lake Gen2 File System.
Properties map[string]string `pulumi:"properties"`
// Specifies the ID of the Storage Account in which the Data Lake Gen2 File System should exist. Changing this forces a new resource to be created.
StorageAccountId string `pulumi:"storageAccountId"`
}
// The set of arguments for constructing a DataLakeGen2Filesystem resource.
type DataLakeGen2FilesystemArgs struct {
// One or more `ace` blocks as defined below to specify the entries for the ACL for the path.
Aces DataLakeGen2FilesystemAceArrayInput
// The default encryption scope to use for this filesystem. Changing this forces a new resource to be created.
DefaultEncryptionScope pulumi.StringPtrInput
// Specifies the Object ID of the Azure Active Directory Group to make the owning group of the root path (i.e. `/`). Possible values also include `$superuser`.
//
// > **NOTE:** The Storage Account requires `accountKind` to be either `StorageV2` or `BlobStorage`. In addition, `isHnsEnabled` has to be set to `true`.
Group pulumi.StringPtrInput
// The name of the Data Lake Gen2 File System which should be created within the Storage Account. Must be unique within the storage account the queue is located. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// Specifies the Object ID of the Azure Active Directory User to make the owning user of the root path (i.e. `/`). Possible values also include `$superuser`.
Owner pulumi.StringPtrInput
// A mapping of Key to Base64-Encoded Values which should be assigned to this Data Lake Gen2 File System.
Properties pulumi.StringMapInput
// Specifies the ID of the Storage Account in which the Data Lake Gen2 File System should exist. Changing this forces a new resource to be created.
StorageAccountId pulumi.StringInput
}
func (DataLakeGen2FilesystemArgs) ElementType() reflect.Type {
return reflect.TypeOf((*dataLakeGen2FilesystemArgs)(nil)).Elem()
}
type DataLakeGen2FilesystemInput interface {
pulumi.Input
ToDataLakeGen2FilesystemOutput() DataLakeGen2FilesystemOutput
ToDataLakeGen2FilesystemOutputWithContext(ctx context.Context) DataLakeGen2FilesystemOutput
}
func (*DataLakeGen2Filesystem) ElementType() reflect.Type {
return reflect.TypeOf((**DataLakeGen2Filesystem)(nil)).Elem()
}
func (i *DataLakeGen2Filesystem) ToDataLakeGen2FilesystemOutput() DataLakeGen2FilesystemOutput {
return i.ToDataLakeGen2FilesystemOutputWithContext(context.Background())
}
func (i *DataLakeGen2Filesystem) ToDataLakeGen2FilesystemOutputWithContext(ctx context.Context) DataLakeGen2FilesystemOutput {
return pulumi.ToOutputWithContext(ctx, i).(DataLakeGen2FilesystemOutput)
}
// DataLakeGen2FilesystemArrayInput is an input type that accepts DataLakeGen2FilesystemArray and DataLakeGen2FilesystemArrayOutput values.
// You can construct a concrete instance of `DataLakeGen2FilesystemArrayInput` via:
//
// DataLakeGen2FilesystemArray{ DataLakeGen2FilesystemArgs{...} }
type DataLakeGen2FilesystemArrayInput interface {
pulumi.Input
ToDataLakeGen2FilesystemArrayOutput() DataLakeGen2FilesystemArrayOutput
ToDataLakeGen2FilesystemArrayOutputWithContext(context.Context) DataLakeGen2FilesystemArrayOutput
}
type DataLakeGen2FilesystemArray []DataLakeGen2FilesystemInput
func (DataLakeGen2FilesystemArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*DataLakeGen2Filesystem)(nil)).Elem()
}
func (i DataLakeGen2FilesystemArray) ToDataLakeGen2FilesystemArrayOutput() DataLakeGen2FilesystemArrayOutput {
return i.ToDataLakeGen2FilesystemArrayOutputWithContext(context.Background())
}
func (i DataLakeGen2FilesystemArray) ToDataLakeGen2FilesystemArrayOutputWithContext(ctx context.Context) DataLakeGen2FilesystemArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(DataLakeGen2FilesystemArrayOutput)
}
// DataLakeGen2FilesystemMapInput is an input type that accepts DataLakeGen2FilesystemMap and DataLakeGen2FilesystemMapOutput values.
// You can construct a concrete instance of `DataLakeGen2FilesystemMapInput` via:
//
// DataLakeGen2FilesystemMap{ "key": DataLakeGen2FilesystemArgs{...} }
type DataLakeGen2FilesystemMapInput interface {
pulumi.Input
ToDataLakeGen2FilesystemMapOutput() DataLakeGen2FilesystemMapOutput
ToDataLakeGen2FilesystemMapOutputWithContext(context.Context) DataLakeGen2FilesystemMapOutput
}
type DataLakeGen2FilesystemMap map[string]DataLakeGen2FilesystemInput
func (DataLakeGen2FilesystemMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*DataLakeGen2Filesystem)(nil)).Elem()
}
func (i DataLakeGen2FilesystemMap) ToDataLakeGen2FilesystemMapOutput() DataLakeGen2FilesystemMapOutput {
return i.ToDataLakeGen2FilesystemMapOutputWithContext(context.Background())
}
func (i DataLakeGen2FilesystemMap) ToDataLakeGen2FilesystemMapOutputWithContext(ctx context.Context) DataLakeGen2FilesystemMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(DataLakeGen2FilesystemMapOutput)
}
type DataLakeGen2FilesystemOutput struct{ *pulumi.OutputState }
func (DataLakeGen2FilesystemOutput) ElementType() reflect.Type {
return reflect.TypeOf((**DataLakeGen2Filesystem)(nil)).Elem()
}
func (o DataLakeGen2FilesystemOutput) ToDataLakeGen2FilesystemOutput() DataLakeGen2FilesystemOutput {
return o
}
func (o DataLakeGen2FilesystemOutput) ToDataLakeGen2FilesystemOutputWithContext(ctx context.Context) DataLakeGen2FilesystemOutput {
return o
}
// One or more `ace` blocks as defined below to specify the entries for the ACL for the path.
func (o DataLakeGen2FilesystemOutput) Aces() DataLakeGen2FilesystemAceArrayOutput {
return o.ApplyT(func(v *DataLakeGen2Filesystem) DataLakeGen2FilesystemAceArrayOutput { return v.Aces }).(DataLakeGen2FilesystemAceArrayOutput)
}
// The default encryption scope to use for this filesystem. Changing this forces a new resource to be created.
func (o DataLakeGen2FilesystemOutput) DefaultEncryptionScope() pulumi.StringOutput {
return o.ApplyT(func(v *DataLakeGen2Filesystem) pulumi.StringOutput { return v.DefaultEncryptionScope }).(pulumi.StringOutput)
}
// Specifies the Object ID of the Azure Active Directory Group to make the owning group of the root path (i.e. `/`). Possible values also include `$superuser`.
//
// > **NOTE:** The Storage Account requires `accountKind` to be either `StorageV2` or `BlobStorage`. In addition, `isHnsEnabled` has to be set to `true`.
func (o DataLakeGen2FilesystemOutput) Group() pulumi.StringOutput {
return o.ApplyT(func(v *DataLakeGen2Filesystem) pulumi.StringOutput { return v.Group }).(pulumi.StringOutput)
}
// The name of the Data Lake Gen2 File System which should be created within the Storage Account. Must be unique within the storage account the queue is located. Changing this forces a new resource to be created.
func (o DataLakeGen2FilesystemOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *DataLakeGen2Filesystem) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// Specifies the Object ID of the Azure Active Directory User to make the owning user of the root path (i.e. `/`). Possible values also include `$superuser`.
func (o DataLakeGen2FilesystemOutput) Owner() pulumi.StringOutput {
return o.ApplyT(func(v *DataLakeGen2Filesystem) pulumi.StringOutput { return v.Owner }).(pulumi.StringOutput)
}
// A mapping of Key to Base64-Encoded Values which should be assigned to this Data Lake Gen2 File System.
func (o DataLakeGen2FilesystemOutput) Properties() pulumi.StringMapOutput {
return o.ApplyT(func(v *DataLakeGen2Filesystem) pulumi.StringMapOutput { return v.Properties }).(pulumi.StringMapOutput)
}
// Specifies the ID of the Storage Account in which the Data Lake Gen2 File System should exist. Changing this forces a new resource to be created.
func (o DataLakeGen2FilesystemOutput) StorageAccountId() pulumi.StringOutput {
return o.ApplyT(func(v *DataLakeGen2Filesystem) pulumi.StringOutput { return v.StorageAccountId }).(pulumi.StringOutput)
}
type DataLakeGen2FilesystemArrayOutput struct{ *pulumi.OutputState }
func (DataLakeGen2FilesystemArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*DataLakeGen2Filesystem)(nil)).Elem()
}
func (o DataLakeGen2FilesystemArrayOutput) ToDataLakeGen2FilesystemArrayOutput() DataLakeGen2FilesystemArrayOutput {
return o
}
func (o DataLakeGen2FilesystemArrayOutput) ToDataLakeGen2FilesystemArrayOutputWithContext(ctx context.Context) DataLakeGen2FilesystemArrayOutput {
return o
}
func (o DataLakeGen2FilesystemArrayOutput) Index(i pulumi.IntInput) DataLakeGen2FilesystemOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *DataLakeGen2Filesystem {
return vs[0].([]*DataLakeGen2Filesystem)[vs[1].(int)]
}).(DataLakeGen2FilesystemOutput)
}
type DataLakeGen2FilesystemMapOutput struct{ *pulumi.OutputState }
func (DataLakeGen2FilesystemMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*DataLakeGen2Filesystem)(nil)).Elem()
}
func (o DataLakeGen2FilesystemMapOutput) ToDataLakeGen2FilesystemMapOutput() DataLakeGen2FilesystemMapOutput {
return o
}
func (o DataLakeGen2FilesystemMapOutput) ToDataLakeGen2FilesystemMapOutputWithContext(ctx context.Context) DataLakeGen2FilesystemMapOutput {
return o
}
func (o DataLakeGen2FilesystemMapOutput) MapIndex(k pulumi.StringInput) DataLakeGen2FilesystemOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *DataLakeGen2Filesystem {
return vs[0].(map[string]*DataLakeGen2Filesystem)[vs[1].(string)]
}).(DataLakeGen2FilesystemOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*DataLakeGen2FilesystemInput)(nil)).Elem(), &DataLakeGen2Filesystem{})
pulumi.RegisterInputType(reflect.TypeOf((*DataLakeGen2FilesystemArrayInput)(nil)).Elem(), DataLakeGen2FilesystemArray{})
pulumi.RegisterInputType(reflect.TypeOf((*DataLakeGen2FilesystemMapInput)(nil)).Elem(), DataLakeGen2FilesystemMap{})
pulumi.RegisterOutputType(DataLakeGen2FilesystemOutput{})
pulumi.RegisterOutputType(DataLakeGen2FilesystemArrayOutput{})
pulumi.RegisterOutputType(DataLakeGen2FilesystemMapOutput{})
}