/
server.go
508 lines (448 loc) · 28.5 KB
/
server.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
// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
package mariadb
import (
"context"
"reflect"
"github.com/pkg/errors"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)
// Manages a MariaDB Server.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
// "github.com/pulumi/pulumi-azure/sdk/v3/go/azure/core"
// "github.com/pulumi/pulumi-azure/sdk/v3/go/azure/mariadb"
// "github.com/pulumi/pulumi/sdk/v2/go/pulumi"
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// exampleResourceGroup, err := core.NewResourceGroup(ctx, "exampleResourceGroup", &core.ResourceGroupArgs{
// Location: pulumi.String("West Europe"),
// })
// if err != nil {
// return err
// }
// _, err = mariadb.NewServer(ctx, "exampleServer", &mariadb.ServerArgs{
// Location: exampleResourceGroup.Location,
// ResourceGroupName: exampleResourceGroup.Name,
// AdministratorLogin: pulumi.String("mariadbadmin"),
// AdministratorLoginPassword: pulumi.String("H@Sh1CoR3!"),
// SkuName: pulumi.String("B_Gen5_2"),
// StorageMb: pulumi.Int(5120),
// Version: pulumi.String("10.2"),
// AutoGrowEnabled: pulumi.Bool(true),
// BackupRetentionDays: pulumi.Int(7),
// GeoRedundantBackupEnabled: pulumi.Bool(false),
// PublicNetworkAccessEnabled: pulumi.Bool(false),
// SslEnforcementEnabled: pulumi.Bool(true),
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
// ```
//
// ## Import
//
// MariaDB Server's can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:mariadb/server:Server server1 /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.DBforMariaDB/servers/server1
// ```
type Server struct {
pulumi.CustomResourceState
// The Administrator Login for the MariaDB Server. Changing this forces a new resource to be created.
AdministratorLogin pulumi.StringOutput `pulumi:"administratorLogin"`
// The Password associated with the `administratorLogin` for the MariaDB Server.
AdministratorLoginPassword pulumi.StringPtrOutput `pulumi:"administratorLoginPassword"`
// Enable/Disable auto-growing of the storage. Storage auto-grow prevents your server from running out of storage and becoming read-only. If storage auto grow is enabled, the storage automatically grows without impacting the workload. The default value if not explicitly specified is `true`.
AutoGrowEnabled pulumi.BoolOutput `pulumi:"autoGrowEnabled"`
// Backup retention days for the server, supported values are between `7` and `35` days.
BackupRetentionDays pulumi.IntOutput `pulumi:"backupRetentionDays"`
// The creation mode. Can be used to restore or replicate existing servers. Possible values are `Default`, `Replica`, `GeoRestore`, and `PointInTimeRestore`. Defaults to `Default`.
CreateMode pulumi.StringPtrOutput `pulumi:"createMode"`
// For creation modes other than `Default`, the source server ID to use.
CreationSourceServerId pulumi.StringPtrOutput `pulumi:"creationSourceServerId"`
// The FQDN of the MariaDB Server.
Fqdn pulumi.StringOutput `pulumi:"fqdn"`
// Turn Geo-redundant server backups on/off. This allows you to choose between locally redundant or geo-redundant backup storage in the General Purpose and Memory Optimized tiers. When the backups are stored in geo-redundant backup storage, they are not only stored within the region in which your server is hosted, but are also replicated to a paired data center. This provides better protection and ability to restore your server in a different region in the event of a disaster. This is not supported for the Basic tier.
GeoRedundantBackupEnabled pulumi.BoolOutput `pulumi:"geoRedundantBackupEnabled"`
// 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 MariaDB Server. Changing this forces a new resource to be created.
Name pulumi.StringOutput `pulumi:"name"`
// Whether or not public network access is allowed for this server. Defaults to `true`.
PublicNetworkAccessEnabled pulumi.BoolPtrOutput `pulumi:"publicNetworkAccessEnabled"`
// The name of the resource group in which to create the MariaDB Server. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"`
// When `createMode` is `PointInTimeRestore`, specifies the point in time to restore from `creationSourceServerId`.
RestorePointInTime pulumi.StringPtrOutput `pulumi:"restorePointInTime"`
// Specifies the SKU Name for this MariaDB Server. The name of the SKU, follows the `tier` + `family` + `cores` pattern (e.g. `B_Gen4_1`, `GP_Gen5_8`). For more information see the [product documentation](https://docs.microsoft.com/en-us/rest/api/mariadb/servers/create#sku).
SkuName pulumi.StringOutput `pulumi:"skuName"`
// Deprecated: this has been moved to the boolean attribute `ssl_enforcement_enabled` and will be removed in version 3.0 of the provider.
SslEnforcement pulumi.StringOutput `pulumi:"sslEnforcement"`
// Specifies if SSL should be enforced on connections. Possible values are `true` and `false`.
SslEnforcementEnabled pulumi.BoolPtrOutput `pulumi:"sslEnforcementEnabled"`
// Max storage allowed for a server. Possible values are between `5120` MB (5GB) and `1024000`MB (1TB) for the Basic SKU and between `5120` MB (5GB) and `4096000` MB (4TB) for General Purpose/Memory Optimized SKUs. For more information see the [product documentation](https://docs.microsoft.com/en-us/rest/api/mariadb/servers/create#storageprofile).
StorageMb pulumi.IntOutput `pulumi:"storageMb"`
// Deprecated: all storage_profile properties have been moved to the top level. This block will be removed in version 3.0 of the provider.
StorageProfile ServerStorageProfileOutput `pulumi:"storageProfile"`
// A mapping of tags to assign to the resource.
Tags pulumi.StringMapOutput `pulumi:"tags"`
// Specifies the version of MariaDB to use. Possible values are `10.2` and `10.3`. Changing this forces a new resource to be created.
Version pulumi.StringOutput `pulumi:"version"`
}
// NewServer registers a new resource with the given unique name, arguments, and options.
func NewServer(ctx *pulumi.Context,
name string, args *ServerArgs, opts ...pulumi.ResourceOption) (*Server, 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'")
}
if args.SkuName == nil {
return nil, errors.New("invalid value for required argument 'SkuName'")
}
if args.Version == nil {
return nil, errors.New("invalid value for required argument 'Version'")
}
var resource Server
err := ctx.RegisterResource("azure:mariadb/server:Server", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetServer gets an existing Server 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 GetServer(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *ServerState, opts ...pulumi.ResourceOption) (*Server, error) {
var resource Server
err := ctx.ReadResource("azure:mariadb/server:Server", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering Server resources.
type serverState struct {
// The Administrator Login for the MariaDB Server. Changing this forces a new resource to be created.
AdministratorLogin *string `pulumi:"administratorLogin"`
// The Password associated with the `administratorLogin` for the MariaDB Server.
AdministratorLoginPassword *string `pulumi:"administratorLoginPassword"`
// Enable/Disable auto-growing of the storage. Storage auto-grow prevents your server from running out of storage and becoming read-only. If storage auto grow is enabled, the storage automatically grows without impacting the workload. The default value if not explicitly specified is `true`.
AutoGrowEnabled *bool `pulumi:"autoGrowEnabled"`
// Backup retention days for the server, supported values are between `7` and `35` days.
BackupRetentionDays *int `pulumi:"backupRetentionDays"`
// The creation mode. Can be used to restore or replicate existing servers. Possible values are `Default`, `Replica`, `GeoRestore`, and `PointInTimeRestore`. Defaults to `Default`.
CreateMode *string `pulumi:"createMode"`
// For creation modes other than `Default`, the source server ID to use.
CreationSourceServerId *string `pulumi:"creationSourceServerId"`
// The FQDN of the MariaDB Server.
Fqdn *string `pulumi:"fqdn"`
// Turn Geo-redundant server backups on/off. This allows you to choose between locally redundant or geo-redundant backup storage in the General Purpose and Memory Optimized tiers. When the backups are stored in geo-redundant backup storage, they are not only stored within the region in which your server is hosted, but are also replicated to a paired data center. This provides better protection and ability to restore your server in a different region in the event of a disaster. This is not supported for the Basic tier.
GeoRedundantBackupEnabled *bool `pulumi:"geoRedundantBackupEnabled"`
// 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 MariaDB Server. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// Whether or not public network access is allowed for this server. Defaults to `true`.
PublicNetworkAccessEnabled *bool `pulumi:"publicNetworkAccessEnabled"`
// The name of the resource group in which to create the MariaDB Server. Changing this forces a new resource to be created.
ResourceGroupName *string `pulumi:"resourceGroupName"`
// When `createMode` is `PointInTimeRestore`, specifies the point in time to restore from `creationSourceServerId`.
RestorePointInTime *string `pulumi:"restorePointInTime"`
// Specifies the SKU Name for this MariaDB Server. The name of the SKU, follows the `tier` + `family` + `cores` pattern (e.g. `B_Gen4_1`, `GP_Gen5_8`). For more information see the [product documentation](https://docs.microsoft.com/en-us/rest/api/mariadb/servers/create#sku).
SkuName *string `pulumi:"skuName"`
// Deprecated: this has been moved to the boolean attribute `ssl_enforcement_enabled` and will be removed in version 3.0 of the provider.
SslEnforcement *string `pulumi:"sslEnforcement"`
// Specifies if SSL should be enforced on connections. Possible values are `true` and `false`.
SslEnforcementEnabled *bool `pulumi:"sslEnforcementEnabled"`
// Max storage allowed for a server. Possible values are between `5120` MB (5GB) and `1024000`MB (1TB) for the Basic SKU and between `5120` MB (5GB) and `4096000` MB (4TB) for General Purpose/Memory Optimized SKUs. For more information see the [product documentation](https://docs.microsoft.com/en-us/rest/api/mariadb/servers/create#storageprofile).
StorageMb *int `pulumi:"storageMb"`
// Deprecated: all storage_profile properties have been moved to the top level. This block will be removed in version 3.0 of the provider.
StorageProfile *ServerStorageProfile `pulumi:"storageProfile"`
// A mapping of tags to assign to the resource.
Tags map[string]string `pulumi:"tags"`
// Specifies the version of MariaDB to use. Possible values are `10.2` and `10.3`. Changing this forces a new resource to be created.
Version *string `pulumi:"version"`
}
type ServerState struct {
// The Administrator Login for the MariaDB Server. Changing this forces a new resource to be created.
AdministratorLogin pulumi.StringPtrInput
// The Password associated with the `administratorLogin` for the MariaDB Server.
AdministratorLoginPassword pulumi.StringPtrInput
// Enable/Disable auto-growing of the storage. Storage auto-grow prevents your server from running out of storage and becoming read-only. If storage auto grow is enabled, the storage automatically grows without impacting the workload. The default value if not explicitly specified is `true`.
AutoGrowEnabled pulumi.BoolPtrInput
// Backup retention days for the server, supported values are between `7` and `35` days.
BackupRetentionDays pulumi.IntPtrInput
// The creation mode. Can be used to restore or replicate existing servers. Possible values are `Default`, `Replica`, `GeoRestore`, and `PointInTimeRestore`. Defaults to `Default`.
CreateMode pulumi.StringPtrInput
// For creation modes other than `Default`, the source server ID to use.
CreationSourceServerId pulumi.StringPtrInput
// The FQDN of the MariaDB Server.
Fqdn pulumi.StringPtrInput
// Turn Geo-redundant server backups on/off. This allows you to choose between locally redundant or geo-redundant backup storage in the General Purpose and Memory Optimized tiers. When the backups are stored in geo-redundant backup storage, they are not only stored within the region in which your server is hosted, but are also replicated to a paired data center. This provides better protection and ability to restore your server in a different region in the event of a disaster. This is not supported for the Basic tier.
GeoRedundantBackupEnabled 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 MariaDB Server. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// Whether or not public network access is allowed for this server. Defaults to `true`.
PublicNetworkAccessEnabled pulumi.BoolPtrInput
// The name of the resource group in which to create the MariaDB Server. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringPtrInput
// When `createMode` is `PointInTimeRestore`, specifies the point in time to restore from `creationSourceServerId`.
RestorePointInTime pulumi.StringPtrInput
// Specifies the SKU Name for this MariaDB Server. The name of the SKU, follows the `tier` + `family` + `cores` pattern (e.g. `B_Gen4_1`, `GP_Gen5_8`). For more information see the [product documentation](https://docs.microsoft.com/en-us/rest/api/mariadb/servers/create#sku).
SkuName pulumi.StringPtrInput
// Deprecated: this has been moved to the boolean attribute `ssl_enforcement_enabled` and will be removed in version 3.0 of the provider.
SslEnforcement pulumi.StringPtrInput
// Specifies if SSL should be enforced on connections. Possible values are `true` and `false`.
SslEnforcementEnabled pulumi.BoolPtrInput
// Max storage allowed for a server. Possible values are between `5120` MB (5GB) and `1024000`MB (1TB) for the Basic SKU and between `5120` MB (5GB) and `4096000` MB (4TB) for General Purpose/Memory Optimized SKUs. For more information see the [product documentation](https://docs.microsoft.com/en-us/rest/api/mariadb/servers/create#storageprofile).
StorageMb pulumi.IntPtrInput
// Deprecated: all storage_profile properties have been moved to the top level. This block will be removed in version 3.0 of the provider.
StorageProfile ServerStorageProfilePtrInput
// A mapping of tags to assign to the resource.
Tags pulumi.StringMapInput
// Specifies the version of MariaDB to use. Possible values are `10.2` and `10.3`. Changing this forces a new resource to be created.
Version pulumi.StringPtrInput
}
func (ServerState) ElementType() reflect.Type {
return reflect.TypeOf((*serverState)(nil)).Elem()
}
type serverArgs struct {
// The Administrator Login for the MariaDB Server. Changing this forces a new resource to be created.
AdministratorLogin *string `pulumi:"administratorLogin"`
// The Password associated with the `administratorLogin` for the MariaDB Server.
AdministratorLoginPassword *string `pulumi:"administratorLoginPassword"`
// Enable/Disable auto-growing of the storage. Storage auto-grow prevents your server from running out of storage and becoming read-only. If storage auto grow is enabled, the storage automatically grows without impacting the workload. The default value if not explicitly specified is `true`.
AutoGrowEnabled *bool `pulumi:"autoGrowEnabled"`
// Backup retention days for the server, supported values are between `7` and `35` days.
BackupRetentionDays *int `pulumi:"backupRetentionDays"`
// The creation mode. Can be used to restore or replicate existing servers. Possible values are `Default`, `Replica`, `GeoRestore`, and `PointInTimeRestore`. Defaults to `Default`.
CreateMode *string `pulumi:"createMode"`
// For creation modes other than `Default`, the source server ID to use.
CreationSourceServerId *string `pulumi:"creationSourceServerId"`
// Turn Geo-redundant server backups on/off. This allows you to choose between locally redundant or geo-redundant backup storage in the General Purpose and Memory Optimized tiers. When the backups are stored in geo-redundant backup storage, they are not only stored within the region in which your server is hosted, but are also replicated to a paired data center. This provides better protection and ability to restore your server in a different region in the event of a disaster. This is not supported for the Basic tier.
GeoRedundantBackupEnabled *bool `pulumi:"geoRedundantBackupEnabled"`
// 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 MariaDB Server. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// Whether or not public network access is allowed for this server. Defaults to `true`.
PublicNetworkAccessEnabled *bool `pulumi:"publicNetworkAccessEnabled"`
// The name of the resource group in which to create the MariaDB Server. Changing this forces a new resource to be created.
ResourceGroupName string `pulumi:"resourceGroupName"`
// When `createMode` is `PointInTimeRestore`, specifies the point in time to restore from `creationSourceServerId`.
RestorePointInTime *string `pulumi:"restorePointInTime"`
// Specifies the SKU Name for this MariaDB Server. The name of the SKU, follows the `tier` + `family` + `cores` pattern (e.g. `B_Gen4_1`, `GP_Gen5_8`). For more information see the [product documentation](https://docs.microsoft.com/en-us/rest/api/mariadb/servers/create#sku).
SkuName string `pulumi:"skuName"`
// Deprecated: this has been moved to the boolean attribute `ssl_enforcement_enabled` and will be removed in version 3.0 of the provider.
SslEnforcement *string `pulumi:"sslEnforcement"`
// Specifies if SSL should be enforced on connections. Possible values are `true` and `false`.
SslEnforcementEnabled *bool `pulumi:"sslEnforcementEnabled"`
// Max storage allowed for a server. Possible values are between `5120` MB (5GB) and `1024000`MB (1TB) for the Basic SKU and between `5120` MB (5GB) and `4096000` MB (4TB) for General Purpose/Memory Optimized SKUs. For more information see the [product documentation](https://docs.microsoft.com/en-us/rest/api/mariadb/servers/create#storageprofile).
StorageMb *int `pulumi:"storageMb"`
// Deprecated: all storage_profile properties have been moved to the top level. This block will be removed in version 3.0 of the provider.
StorageProfile *ServerStorageProfile `pulumi:"storageProfile"`
// A mapping of tags to assign to the resource.
Tags map[string]string `pulumi:"tags"`
// Specifies the version of MariaDB to use. Possible values are `10.2` and `10.3`. Changing this forces a new resource to be created.
Version string `pulumi:"version"`
}
// The set of arguments for constructing a Server resource.
type ServerArgs struct {
// The Administrator Login for the MariaDB Server. Changing this forces a new resource to be created.
AdministratorLogin pulumi.StringPtrInput
// The Password associated with the `administratorLogin` for the MariaDB Server.
AdministratorLoginPassword pulumi.StringPtrInput
// Enable/Disable auto-growing of the storage. Storage auto-grow prevents your server from running out of storage and becoming read-only. If storage auto grow is enabled, the storage automatically grows without impacting the workload. The default value if not explicitly specified is `true`.
AutoGrowEnabled pulumi.BoolPtrInput
// Backup retention days for the server, supported values are between `7` and `35` days.
BackupRetentionDays pulumi.IntPtrInput
// The creation mode. Can be used to restore or replicate existing servers. Possible values are `Default`, `Replica`, `GeoRestore`, and `PointInTimeRestore`. Defaults to `Default`.
CreateMode pulumi.StringPtrInput
// For creation modes other than `Default`, the source server ID to use.
CreationSourceServerId pulumi.StringPtrInput
// Turn Geo-redundant server backups on/off. This allows you to choose between locally redundant or geo-redundant backup storage in the General Purpose and Memory Optimized tiers. When the backups are stored in geo-redundant backup storage, they are not only stored within the region in which your server is hosted, but are also replicated to a paired data center. This provides better protection and ability to restore your server in a different region in the event of a disaster. This is not supported for the Basic tier.
GeoRedundantBackupEnabled 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 MariaDB Server. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// Whether or not public network access is allowed for this server. Defaults to `true`.
PublicNetworkAccessEnabled pulumi.BoolPtrInput
// The name of the resource group in which to create the MariaDB Server. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringInput
// When `createMode` is `PointInTimeRestore`, specifies the point in time to restore from `creationSourceServerId`.
RestorePointInTime pulumi.StringPtrInput
// Specifies the SKU Name for this MariaDB Server. The name of the SKU, follows the `tier` + `family` + `cores` pattern (e.g. `B_Gen4_1`, `GP_Gen5_8`). For more information see the [product documentation](https://docs.microsoft.com/en-us/rest/api/mariadb/servers/create#sku).
SkuName pulumi.StringInput
// Deprecated: this has been moved to the boolean attribute `ssl_enforcement_enabled` and will be removed in version 3.0 of the provider.
SslEnforcement pulumi.StringPtrInput
// Specifies if SSL should be enforced on connections. Possible values are `true` and `false`.
SslEnforcementEnabled pulumi.BoolPtrInput
// Max storage allowed for a server. Possible values are between `5120` MB (5GB) and `1024000`MB (1TB) for the Basic SKU and between `5120` MB (5GB) and `4096000` MB (4TB) for General Purpose/Memory Optimized SKUs. For more information see the [product documentation](https://docs.microsoft.com/en-us/rest/api/mariadb/servers/create#storageprofile).
StorageMb pulumi.IntPtrInput
// Deprecated: all storage_profile properties have been moved to the top level. This block will be removed in version 3.0 of the provider.
StorageProfile ServerStorageProfilePtrInput
// A mapping of tags to assign to the resource.
Tags pulumi.StringMapInput
// Specifies the version of MariaDB to use. Possible values are `10.2` and `10.3`. Changing this forces a new resource to be created.
Version pulumi.StringInput
}
func (ServerArgs) ElementType() reflect.Type {
return reflect.TypeOf((*serverArgs)(nil)).Elem()
}
type ServerInput interface {
pulumi.Input
ToServerOutput() ServerOutput
ToServerOutputWithContext(ctx context.Context) ServerOutput
}
func (*Server) ElementType() reflect.Type {
return reflect.TypeOf((*Server)(nil))
}
func (i *Server) ToServerOutput() ServerOutput {
return i.ToServerOutputWithContext(context.Background())
}
func (i *Server) ToServerOutputWithContext(ctx context.Context) ServerOutput {
return pulumi.ToOutputWithContext(ctx, i).(ServerOutput)
}
func (i *Server) ToServerPtrOutput() ServerPtrOutput {
return i.ToServerPtrOutputWithContext(context.Background())
}
func (i *Server) ToServerPtrOutputWithContext(ctx context.Context) ServerPtrOutput {
return pulumi.ToOutputWithContext(ctx, i).(ServerPtrOutput)
}
type ServerPtrInput interface {
pulumi.Input
ToServerPtrOutput() ServerPtrOutput
ToServerPtrOutputWithContext(ctx context.Context) ServerPtrOutput
}
type serverPtrType ServerArgs
func (*serverPtrType) ElementType() reflect.Type {
return reflect.TypeOf((**Server)(nil))
}
func (i *serverPtrType) ToServerPtrOutput() ServerPtrOutput {
return i.ToServerPtrOutputWithContext(context.Background())
}
func (i *serverPtrType) ToServerPtrOutputWithContext(ctx context.Context) ServerPtrOutput {
return pulumi.ToOutputWithContext(ctx, i).(ServerPtrOutput)
}
// ServerArrayInput is an input type that accepts ServerArray and ServerArrayOutput values.
// You can construct a concrete instance of `ServerArrayInput` via:
//
// ServerArray{ ServerArgs{...} }
type ServerArrayInput interface {
pulumi.Input
ToServerArrayOutput() ServerArrayOutput
ToServerArrayOutputWithContext(context.Context) ServerArrayOutput
}
type ServerArray []ServerInput
func (ServerArray) ElementType() reflect.Type {
return reflect.TypeOf(([]*Server)(nil))
}
func (i ServerArray) ToServerArrayOutput() ServerArrayOutput {
return i.ToServerArrayOutputWithContext(context.Background())
}
func (i ServerArray) ToServerArrayOutputWithContext(ctx context.Context) ServerArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(ServerArrayOutput)
}
// ServerMapInput is an input type that accepts ServerMap and ServerMapOutput values.
// You can construct a concrete instance of `ServerMapInput` via:
//
// ServerMap{ "key": ServerArgs{...} }
type ServerMapInput interface {
pulumi.Input
ToServerMapOutput() ServerMapOutput
ToServerMapOutputWithContext(context.Context) ServerMapOutput
}
type ServerMap map[string]ServerInput
func (ServerMap) ElementType() reflect.Type {
return reflect.TypeOf((map[string]*Server)(nil))
}
func (i ServerMap) ToServerMapOutput() ServerMapOutput {
return i.ToServerMapOutputWithContext(context.Background())
}
func (i ServerMap) ToServerMapOutputWithContext(ctx context.Context) ServerMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(ServerMapOutput)
}
type ServerOutput struct {
*pulumi.OutputState
}
func (ServerOutput) ElementType() reflect.Type {
return reflect.TypeOf((*Server)(nil))
}
func (o ServerOutput) ToServerOutput() ServerOutput {
return o
}
func (o ServerOutput) ToServerOutputWithContext(ctx context.Context) ServerOutput {
return o
}
func (o ServerOutput) ToServerPtrOutput() ServerPtrOutput {
return o.ToServerPtrOutputWithContext(context.Background())
}
func (o ServerOutput) ToServerPtrOutputWithContext(ctx context.Context) ServerPtrOutput {
return o.ApplyT(func(v Server) *Server {
return &v
}).(ServerPtrOutput)
}
type ServerPtrOutput struct {
*pulumi.OutputState
}
func (ServerPtrOutput) ElementType() reflect.Type {
return reflect.TypeOf((**Server)(nil))
}
func (o ServerPtrOutput) ToServerPtrOutput() ServerPtrOutput {
return o
}
func (o ServerPtrOutput) ToServerPtrOutputWithContext(ctx context.Context) ServerPtrOutput {
return o
}
type ServerArrayOutput struct{ *pulumi.OutputState }
func (ServerArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]Server)(nil))
}
func (o ServerArrayOutput) ToServerArrayOutput() ServerArrayOutput {
return o
}
func (o ServerArrayOutput) ToServerArrayOutputWithContext(ctx context.Context) ServerArrayOutput {
return o
}
func (o ServerArrayOutput) Index(i pulumi.IntInput) ServerOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) Server {
return vs[0].([]Server)[vs[1].(int)]
}).(ServerOutput)
}
type ServerMapOutput struct{ *pulumi.OutputState }
func (ServerMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]Server)(nil))
}
func (o ServerMapOutput) ToServerMapOutput() ServerMapOutput {
return o
}
func (o ServerMapOutput) ToServerMapOutputWithContext(ctx context.Context) ServerMapOutput {
return o
}
func (o ServerMapOutput) MapIndex(k pulumi.StringInput) ServerOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) Server {
return vs[0].(map[string]Server)[vs[1].(string)]
}).(ServerOutput)
}
func init() {
pulumi.RegisterOutputType(ServerOutput{})
pulumi.RegisterOutputType(ServerPtrOutput{})
pulumi.RegisterOutputType(ServerArrayOutput{})
pulumi.RegisterOutputType(ServerMapOutput{})
}