/
instance.go
753 lines (693 loc) · 43.5 KB
/
instance.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
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
// *** 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 rds
import (
"context"
"reflect"
"github.com/pkg/errors"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)
// Provides an RDS instance resource. A DB instance is an isolated database environment in the cloud. A DB instance can contain multiple user-created databases.
//
// For information about RDS and how to use it, see [What is ApsaraDB for RDS](https://www.alibabacloud.com/help/en/doc-detail/26092.htm).
//
// ## Example Usage
// ### Create a RDS MySQL instance
//
// ```go
// package main
//
// import (
// "github.com/pulumi/pulumi-alicloud/sdk/v2/go/alicloud"
// "github.com/pulumi/pulumi-alicloud/sdk/v2/go/alicloud/rds"
// "github.com/pulumi/pulumi-alicloud/sdk/v2/go/alicloud/vpc"
// "github.com/pulumi/pulumi/sdk/v2/go/pulumi"
// "github.com/pulumi/pulumi/sdk/v2/go/pulumi/config"
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// cfg := config.New(ctx, "")
// name := "tf-testaccdbinstance"
// if param := cfg.Get("name"); param != "" {
// name = param
// }
// creation := "Rds"
// if param := cfg.Get("creation"); param != "" {
// creation = param
// }
// opt0 := creation
// exampleZones, err := alicloud.GetZones(ctx, &alicloud.GetZonesArgs{
// AvailableResourceCreation: &opt0,
// }, nil)
// if err != nil {
// return err
// }
// exampleNetwork, err := vpc.NewNetwork(ctx, "exampleNetwork", &vpc.NetworkArgs{
// CidrBlock: pulumi.String("172.16.0.0/16"),
// })
// if err != nil {
// return err
// }
// exampleSwitch, err := vpc.NewSwitch(ctx, "exampleSwitch", &vpc.SwitchArgs{
// VpcId: exampleNetwork.ID(),
// CidrBlock: pulumi.String("172.16.0.0/24"),
// AvailabilityZone: pulumi.String(exampleZones.Zones[0].Id),
// })
// if err != nil {
// return err
// }
// _, err = rds.NewInstance(ctx, "exampleInstance", &rds.InstanceArgs{
// Engine: pulumi.String("MySQL"),
// EngineVersion: pulumi.String("5.6"),
// InstanceType: pulumi.String("rds.mysql.s2.large"),
// InstanceStorage: pulumi.Int(30),
// InstanceChargeType: pulumi.String("Postpaid"),
// InstanceName: pulumi.String(name),
// VswitchId: exampleSwitch.ID(),
// MonitoringPeriod: pulumi.Int(60),
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
// ```
//
// ## Import
//
// RDS instance can be imported using the id, e.g.
//
// ```sh
// $ pulumi import alicloud:rds/instance:Instance example rm-abc12345678
// ```
type Instance struct {
pulumi.CustomResourceState
// Whether to renewal a DB instance automatically or not. It is valid when instanceChargeType is `PrePaid`. Default to `false`.
AutoRenew pulumi.BoolPtrOutput `pulumi:"autoRenew"`
// Auto-renewal period of an instance, in the unit of the month. It is valid when instanceChargeType is `PrePaid`. Valid value:[1~12], Default to 1.
AutoRenewPeriod pulumi.IntPtrOutput `pulumi:"autoRenewPeriod"`
// The upgrade method to use. Valid values:
// - Auto: Instances are automatically upgraded to a higher minor version.
// - Manual: Instances are forcibly upgraded to a higher minor version when the current version is unpublished.
AutoUpgradeMinorVersion pulumi.StringOutput `pulumi:"autoUpgradeMinorVersion"`
// RDS database connection string.
ConnectionString pulumi.StringOutput `pulumi:"connectionString"`
// The storage type of the instance. Valid values:
// - local_ssd: specifies to use local SSDs. This value is recommended.
// - cloud_ssd: specifies to use standard SSDs.
// - cloud_essd: specifies to use enhanced SSDs (ESSDs).
// - cloud_essd2: specifies to use enhanced SSDs (ESSDs).
// - cloud_essd3: specifies to use enhanced SSDs (ESSDs).
DbInstanceStorageType pulumi.StringOutput `pulumi:"dbInstanceStorageType"`
// The key id of the KMS. Used for encrypting a disk if not null. Only for PostgreSQL, MySQL.
EncryptionKey pulumi.StringPtrOutput `pulumi:"encryptionKey"`
// Database type. Value options: MySQL, SQLServer, PostgreSQL, and PPAS.
Engine pulumi.StringOutput `pulumi:"engine"`
// Database version. Value options can refer to the latest docs [CreateDBInstance](https://www.alibabacloud.com/help/doc-detail/26228.htm) `EngineVersion`.
EngineVersion pulumi.StringOutput `pulumi:"engineVersion"`
// Set it to true to make some parameter efficient when modifying them. Default to false.
ForceRestart pulumi.BoolPtrOutput `pulumi:"forceRestart"`
// Valid values are `Prepaid`, `Postpaid`, Default to `Postpaid`. Currently, the resource only supports PostPaid to PrePaid.
InstanceChargeType pulumi.StringPtrOutput `pulumi:"instanceChargeType"`
// The name of DB instance. It a string of 2 to 256 characters.
InstanceName pulumi.StringPtrOutput `pulumi:"instanceName"`
// User-defined DB instance storage space. Value range:
// - [5, 2000] for MySQL/PostgreSQL/PPAS HA dual node edition;
// - [20,1000] for MySQL 5.7 basic single node edition;
// - [10, 2000] for SQL Server 2008R2;
// - [20,2000] for SQL Server 2012 basic single node edition
// Increase progressively at a rate of 5 GB. For details, see [Instance type table](https://www.alibabacloud.com/help/doc-detail/26312.htm).
// Note: There is extra 5 GB storage for SQL Server Instance and it is not in specified `instanceStorage`.
InstanceStorage pulumi.IntOutput `pulumi:"instanceStorage"`
// DB Instance type. For details, see [Instance type table](https://www.alibabacloud.com/help/doc-detail/26312.htm).
InstanceType pulumi.StringOutput `pulumi:"instanceType"`
// Maintainable time period format of the instance: HH:MMZ-HH:MMZ (UTC time)
MaintainTime pulumi.StringOutput `pulumi:"maintainTime"`
// The monitoring frequency in seconds. Valid values are 5, 60, 300. Defaults to 300.
MonitoringPeriod pulumi.IntOutput `pulumi:"monitoringPeriod"`
// Set of parameters needs to be set after DB instance was launched. Available parameters can refer to the latest docs [View database parameter templates](https://www.alibabacloud.com/help/doc-detail/26284.htm) .
Parameters InstanceParameterArrayOutput `pulumi:"parameters"`
// The duration that you will buy DB instance (in month). It is valid when instanceChargeType is `PrePaid`. Valid values: [1~9], 12, 24, 36. Default to 1.
Period pulumi.IntPtrOutput `pulumi:"period"`
// RDS database connection port.
Port pulumi.StringOutput `pulumi:"port"`
// The ID of resource group which the DB instance belongs.
ResourceGroupId pulumi.StringOutput `pulumi:"resourceGroupId"`
// It has been deprecated from 1.69.0 and use `securityGroupIds` instead.
//
// Deprecated: Attribute `security_group_id` has been deprecated from 1.69.0 and use `security_group_ids` instead.
SecurityGroupId pulumi.StringOutput `pulumi:"securityGroupId"`
// , Available in 1.69.0+) The list IDs to join ECS Security Group. At most supports three security groups.
SecurityGroupIds pulumi.StringArrayOutput `pulumi:"securityGroupIds"`
// Valid values are `normal`, `safety`, Default to `normal`. support `safety` switch to high security access mode
SecurityIpMode pulumi.StringPtrOutput `pulumi:"securityIpMode"`
// List of IP addresses allowed to access all databases of an instance. The list contains up to 1,000 IP addresses, separated by commas. Supported formats include 0.0.0.0/0, 10.23.12.24 (IP), and 10.23.12.24/24 (Classless Inter-Domain Routing (CIDR) mode. /24 represents the length of the prefix in an IP address. The range of the prefix length is [1,32]).
SecurityIps pulumi.StringArrayOutput `pulumi:"securityIps"`
// The sql collector keep time of the instance. Valid values are `30`, `180`, `365`, `1095`, `1825`, Default to `30`.
SqlCollectorConfigValue pulumi.IntPtrOutput `pulumi:"sqlCollectorConfigValue"`
// The sql collector status of the instance. Valid values are `Enabled`, `Disabled`, Default to `Disabled`.
SqlCollectorStatus pulumi.StringOutput `pulumi:"sqlCollectorStatus"`
// Actions performed on SSL functions, Valid values: `Open`: turn on SSL encryption; `Close`: turn off SSL encryption; `Update`: update SSL certificate. See more [engine and engineVersion limitation](https://www.alibabacloud.com/help/zh/doc-detail/26254.htm).
SslAction pulumi.StringOutput `pulumi:"sslAction"`
// Status of the SSL feature. `Yes`: SSL is turned on; `No`: SSL is turned off.
SslStatus pulumi.StringOutput `pulumi:"sslStatus"`
// A mapping of tags to assign to the resource.
// - Key: It can be up to 64 characters in length. It cannot begin with "aliyun", "acs:", "http://", or "https://". It cannot be a null string.
// - Value: It can be up to 128 characters in length. It cannot begin with "aliyun", "acs:", "http://", or "https://". It can be a null string.
Tags pulumi.MapOutput `pulumi:"tags"`
// The TDE(Transparent Data Encryption) status. See more [engine and engineVersion limitation](https://www.alibabacloud.com/help/zh/doc-detail/26256.htm).
TdeStatus pulumi.StringPtrOutput `pulumi:"tdeStatus"`
// The virtual switch ID to launch DB instances in one VPC. If there are multiple vswitches, separate them with commas.
VswitchId pulumi.StringPtrOutput `pulumi:"vswitchId"`
// The Zone to launch the DB instance. From version 1.8.1, it supports multiple zone.
// If it is a multi-zone and `vswitchId` is specified, the vswitch must in the one of them.
// The multiple zone ID can be retrieved by setting `multi` to "true" in the data source `getZones`.
ZoneId pulumi.StringOutput `pulumi:"zoneId"`
// The region ID of the secondary instance if you create a secondary instance. If you set this parameter to the same value as the ZoneId parameter, the instance is deployed in a single zone. Otherwise, the instance is deployed in multiple zones.
ZoneIdSlaveA pulumi.StringPtrOutput `pulumi:"zoneIdSlaveA"`
// The region ID of the log instance if you create a log instance. If you set this parameter to the same value as the ZoneId parameter, the instance is deployed in a single zone. Otherwise, the instance is deployed in multiple zones.
ZoneIdSlaveB pulumi.StringPtrOutput `pulumi:"zoneIdSlaveB"`
}
// NewInstance registers a new resource with the given unique name, arguments, and options.
func NewInstance(ctx *pulumi.Context,
name string, args *InstanceArgs, opts ...pulumi.ResourceOption) (*Instance, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.Engine == nil {
return nil, errors.New("invalid value for required argument 'Engine'")
}
if args.EngineVersion == nil {
return nil, errors.New("invalid value for required argument 'EngineVersion'")
}
if args.InstanceStorage == nil {
return nil, errors.New("invalid value for required argument 'InstanceStorage'")
}
if args.InstanceType == nil {
return nil, errors.New("invalid value for required argument 'InstanceType'")
}
var resource Instance
err := ctx.RegisterResource("alicloud:rds/instance:Instance", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetInstance gets an existing Instance 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 GetInstance(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *InstanceState, opts ...pulumi.ResourceOption) (*Instance, error) {
var resource Instance
err := ctx.ReadResource("alicloud:rds/instance:Instance", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering Instance resources.
type instanceState struct {
// Whether to renewal a DB instance automatically or not. It is valid when instanceChargeType is `PrePaid`. Default to `false`.
AutoRenew *bool `pulumi:"autoRenew"`
// Auto-renewal period of an instance, in the unit of the month. It is valid when instanceChargeType is `PrePaid`. Valid value:[1~12], Default to 1.
AutoRenewPeriod *int `pulumi:"autoRenewPeriod"`
// The upgrade method to use. Valid values:
// - Auto: Instances are automatically upgraded to a higher minor version.
// - Manual: Instances are forcibly upgraded to a higher minor version when the current version is unpublished.
AutoUpgradeMinorVersion *string `pulumi:"autoUpgradeMinorVersion"`
// RDS database connection string.
ConnectionString *string `pulumi:"connectionString"`
// The storage type of the instance. Valid values:
// - local_ssd: specifies to use local SSDs. This value is recommended.
// - cloud_ssd: specifies to use standard SSDs.
// - cloud_essd: specifies to use enhanced SSDs (ESSDs).
// - cloud_essd2: specifies to use enhanced SSDs (ESSDs).
// - cloud_essd3: specifies to use enhanced SSDs (ESSDs).
DbInstanceStorageType *string `pulumi:"dbInstanceStorageType"`
// The key id of the KMS. Used for encrypting a disk if not null. Only for PostgreSQL, MySQL.
EncryptionKey *string `pulumi:"encryptionKey"`
// Database type. Value options: MySQL, SQLServer, PostgreSQL, and PPAS.
Engine *string `pulumi:"engine"`
// Database version. Value options can refer to the latest docs [CreateDBInstance](https://www.alibabacloud.com/help/doc-detail/26228.htm) `EngineVersion`.
EngineVersion *string `pulumi:"engineVersion"`
// Set it to true to make some parameter efficient when modifying them. Default to false.
ForceRestart *bool `pulumi:"forceRestart"`
// Valid values are `Prepaid`, `Postpaid`, Default to `Postpaid`. Currently, the resource only supports PostPaid to PrePaid.
InstanceChargeType *string `pulumi:"instanceChargeType"`
// The name of DB instance. It a string of 2 to 256 characters.
InstanceName *string `pulumi:"instanceName"`
// User-defined DB instance storage space. Value range:
// - [5, 2000] for MySQL/PostgreSQL/PPAS HA dual node edition;
// - [20,1000] for MySQL 5.7 basic single node edition;
// - [10, 2000] for SQL Server 2008R2;
// - [20,2000] for SQL Server 2012 basic single node edition
// Increase progressively at a rate of 5 GB. For details, see [Instance type table](https://www.alibabacloud.com/help/doc-detail/26312.htm).
// Note: There is extra 5 GB storage for SQL Server Instance and it is not in specified `instanceStorage`.
InstanceStorage *int `pulumi:"instanceStorage"`
// DB Instance type. For details, see [Instance type table](https://www.alibabacloud.com/help/doc-detail/26312.htm).
InstanceType *string `pulumi:"instanceType"`
// Maintainable time period format of the instance: HH:MMZ-HH:MMZ (UTC time)
MaintainTime *string `pulumi:"maintainTime"`
// The monitoring frequency in seconds. Valid values are 5, 60, 300. Defaults to 300.
MonitoringPeriod *int `pulumi:"monitoringPeriod"`
// Set of parameters needs to be set after DB instance was launched. Available parameters can refer to the latest docs [View database parameter templates](https://www.alibabacloud.com/help/doc-detail/26284.htm) .
Parameters []InstanceParameter `pulumi:"parameters"`
// The duration that you will buy DB instance (in month). It is valid when instanceChargeType is `PrePaid`. Valid values: [1~9], 12, 24, 36. Default to 1.
Period *int `pulumi:"period"`
// RDS database connection port.
Port *string `pulumi:"port"`
// The ID of resource group which the DB instance belongs.
ResourceGroupId *string `pulumi:"resourceGroupId"`
// It has been deprecated from 1.69.0 and use `securityGroupIds` instead.
//
// Deprecated: Attribute `security_group_id` has been deprecated from 1.69.0 and use `security_group_ids` instead.
SecurityGroupId *string `pulumi:"securityGroupId"`
// , Available in 1.69.0+) The list IDs to join ECS Security Group. At most supports three security groups.
SecurityGroupIds []string `pulumi:"securityGroupIds"`
// Valid values are `normal`, `safety`, Default to `normal`. support `safety` switch to high security access mode
SecurityIpMode *string `pulumi:"securityIpMode"`
// List of IP addresses allowed to access all databases of an instance. The list contains up to 1,000 IP addresses, separated by commas. Supported formats include 0.0.0.0/0, 10.23.12.24 (IP), and 10.23.12.24/24 (Classless Inter-Domain Routing (CIDR) mode. /24 represents the length of the prefix in an IP address. The range of the prefix length is [1,32]).
SecurityIps []string `pulumi:"securityIps"`
// The sql collector keep time of the instance. Valid values are `30`, `180`, `365`, `1095`, `1825`, Default to `30`.
SqlCollectorConfigValue *int `pulumi:"sqlCollectorConfigValue"`
// The sql collector status of the instance. Valid values are `Enabled`, `Disabled`, Default to `Disabled`.
SqlCollectorStatus *string `pulumi:"sqlCollectorStatus"`
// Actions performed on SSL functions, Valid values: `Open`: turn on SSL encryption; `Close`: turn off SSL encryption; `Update`: update SSL certificate. See more [engine and engineVersion limitation](https://www.alibabacloud.com/help/zh/doc-detail/26254.htm).
SslAction *string `pulumi:"sslAction"`
// Status of the SSL feature. `Yes`: SSL is turned on; `No`: SSL is turned off.
SslStatus *string `pulumi:"sslStatus"`
// A mapping of tags to assign to the resource.
// - Key: It can be up to 64 characters in length. It cannot begin with "aliyun", "acs:", "http://", or "https://". It cannot be a null string.
// - Value: It can be up to 128 characters in length. It cannot begin with "aliyun", "acs:", "http://", or "https://". It can be a null string.
Tags map[string]interface{} `pulumi:"tags"`
// The TDE(Transparent Data Encryption) status. See more [engine and engineVersion limitation](https://www.alibabacloud.com/help/zh/doc-detail/26256.htm).
TdeStatus *string `pulumi:"tdeStatus"`
// The virtual switch ID to launch DB instances in one VPC. If there are multiple vswitches, separate them with commas.
VswitchId *string `pulumi:"vswitchId"`
// The Zone to launch the DB instance. From version 1.8.1, it supports multiple zone.
// If it is a multi-zone and `vswitchId` is specified, the vswitch must in the one of them.
// The multiple zone ID can be retrieved by setting `multi` to "true" in the data source `getZones`.
ZoneId *string `pulumi:"zoneId"`
// The region ID of the secondary instance if you create a secondary instance. If you set this parameter to the same value as the ZoneId parameter, the instance is deployed in a single zone. Otherwise, the instance is deployed in multiple zones.
ZoneIdSlaveA *string `pulumi:"zoneIdSlaveA"`
// The region ID of the log instance if you create a log instance. If you set this parameter to the same value as the ZoneId parameter, the instance is deployed in a single zone. Otherwise, the instance is deployed in multiple zones.
ZoneIdSlaveB *string `pulumi:"zoneIdSlaveB"`
}
type InstanceState struct {
// Whether to renewal a DB instance automatically or not. It is valid when instanceChargeType is `PrePaid`. Default to `false`.
AutoRenew pulumi.BoolPtrInput
// Auto-renewal period of an instance, in the unit of the month. It is valid when instanceChargeType is `PrePaid`. Valid value:[1~12], Default to 1.
AutoRenewPeriod pulumi.IntPtrInput
// The upgrade method to use. Valid values:
// - Auto: Instances are automatically upgraded to a higher minor version.
// - Manual: Instances are forcibly upgraded to a higher minor version when the current version is unpublished.
AutoUpgradeMinorVersion pulumi.StringPtrInput
// RDS database connection string.
ConnectionString pulumi.StringPtrInput
// The storage type of the instance. Valid values:
// - local_ssd: specifies to use local SSDs. This value is recommended.
// - cloud_ssd: specifies to use standard SSDs.
// - cloud_essd: specifies to use enhanced SSDs (ESSDs).
// - cloud_essd2: specifies to use enhanced SSDs (ESSDs).
// - cloud_essd3: specifies to use enhanced SSDs (ESSDs).
DbInstanceStorageType pulumi.StringPtrInput
// The key id of the KMS. Used for encrypting a disk if not null. Only for PostgreSQL, MySQL.
EncryptionKey pulumi.StringPtrInput
// Database type. Value options: MySQL, SQLServer, PostgreSQL, and PPAS.
Engine pulumi.StringPtrInput
// Database version. Value options can refer to the latest docs [CreateDBInstance](https://www.alibabacloud.com/help/doc-detail/26228.htm) `EngineVersion`.
EngineVersion pulumi.StringPtrInput
// Set it to true to make some parameter efficient when modifying them. Default to false.
ForceRestart pulumi.BoolPtrInput
// Valid values are `Prepaid`, `Postpaid`, Default to `Postpaid`. Currently, the resource only supports PostPaid to PrePaid.
InstanceChargeType pulumi.StringPtrInput
// The name of DB instance. It a string of 2 to 256 characters.
InstanceName pulumi.StringPtrInput
// User-defined DB instance storage space. Value range:
// - [5, 2000] for MySQL/PostgreSQL/PPAS HA dual node edition;
// - [20,1000] for MySQL 5.7 basic single node edition;
// - [10, 2000] for SQL Server 2008R2;
// - [20,2000] for SQL Server 2012 basic single node edition
// Increase progressively at a rate of 5 GB. For details, see [Instance type table](https://www.alibabacloud.com/help/doc-detail/26312.htm).
// Note: There is extra 5 GB storage for SQL Server Instance and it is not in specified `instanceStorage`.
InstanceStorage pulumi.IntPtrInput
// DB Instance type. For details, see [Instance type table](https://www.alibabacloud.com/help/doc-detail/26312.htm).
InstanceType pulumi.StringPtrInput
// Maintainable time period format of the instance: HH:MMZ-HH:MMZ (UTC time)
MaintainTime pulumi.StringPtrInput
// The monitoring frequency in seconds. Valid values are 5, 60, 300. Defaults to 300.
MonitoringPeriod pulumi.IntPtrInput
// Set of parameters needs to be set after DB instance was launched. Available parameters can refer to the latest docs [View database parameter templates](https://www.alibabacloud.com/help/doc-detail/26284.htm) .
Parameters InstanceParameterArrayInput
// The duration that you will buy DB instance (in month). It is valid when instanceChargeType is `PrePaid`. Valid values: [1~9], 12, 24, 36. Default to 1.
Period pulumi.IntPtrInput
// RDS database connection port.
Port pulumi.StringPtrInput
// The ID of resource group which the DB instance belongs.
ResourceGroupId pulumi.StringPtrInput
// It has been deprecated from 1.69.0 and use `securityGroupIds` instead.
//
// Deprecated: Attribute `security_group_id` has been deprecated from 1.69.0 and use `security_group_ids` instead.
SecurityGroupId pulumi.StringPtrInput
// , Available in 1.69.0+) The list IDs to join ECS Security Group. At most supports three security groups.
SecurityGroupIds pulumi.StringArrayInput
// Valid values are `normal`, `safety`, Default to `normal`. support `safety` switch to high security access mode
SecurityIpMode pulumi.StringPtrInput
// List of IP addresses allowed to access all databases of an instance. The list contains up to 1,000 IP addresses, separated by commas. Supported formats include 0.0.0.0/0, 10.23.12.24 (IP), and 10.23.12.24/24 (Classless Inter-Domain Routing (CIDR) mode. /24 represents the length of the prefix in an IP address. The range of the prefix length is [1,32]).
SecurityIps pulumi.StringArrayInput
// The sql collector keep time of the instance. Valid values are `30`, `180`, `365`, `1095`, `1825`, Default to `30`.
SqlCollectorConfigValue pulumi.IntPtrInput
// The sql collector status of the instance. Valid values are `Enabled`, `Disabled`, Default to `Disabled`.
SqlCollectorStatus pulumi.StringPtrInput
// Actions performed on SSL functions, Valid values: `Open`: turn on SSL encryption; `Close`: turn off SSL encryption; `Update`: update SSL certificate. See more [engine and engineVersion limitation](https://www.alibabacloud.com/help/zh/doc-detail/26254.htm).
SslAction pulumi.StringPtrInput
// Status of the SSL feature. `Yes`: SSL is turned on; `No`: SSL is turned off.
SslStatus pulumi.StringPtrInput
// A mapping of tags to assign to the resource.
// - Key: It can be up to 64 characters in length. It cannot begin with "aliyun", "acs:", "http://", or "https://". It cannot be a null string.
// - Value: It can be up to 128 characters in length. It cannot begin with "aliyun", "acs:", "http://", or "https://". It can be a null string.
Tags pulumi.MapInput
// The TDE(Transparent Data Encryption) status. See more [engine and engineVersion limitation](https://www.alibabacloud.com/help/zh/doc-detail/26256.htm).
TdeStatus pulumi.StringPtrInput
// The virtual switch ID to launch DB instances in one VPC. If there are multiple vswitches, separate them with commas.
VswitchId pulumi.StringPtrInput
// The Zone to launch the DB instance. From version 1.8.1, it supports multiple zone.
// If it is a multi-zone and `vswitchId` is specified, the vswitch must in the one of them.
// The multiple zone ID can be retrieved by setting `multi` to "true" in the data source `getZones`.
ZoneId pulumi.StringPtrInput
// The region ID of the secondary instance if you create a secondary instance. If you set this parameter to the same value as the ZoneId parameter, the instance is deployed in a single zone. Otherwise, the instance is deployed in multiple zones.
ZoneIdSlaveA pulumi.StringPtrInput
// The region ID of the log instance if you create a log instance. If you set this parameter to the same value as the ZoneId parameter, the instance is deployed in a single zone. Otherwise, the instance is deployed in multiple zones.
ZoneIdSlaveB pulumi.StringPtrInput
}
func (InstanceState) ElementType() reflect.Type {
return reflect.TypeOf((*instanceState)(nil)).Elem()
}
type instanceArgs struct {
// Whether to renewal a DB instance automatically or not. It is valid when instanceChargeType is `PrePaid`. Default to `false`.
AutoRenew *bool `pulumi:"autoRenew"`
// Auto-renewal period of an instance, in the unit of the month. It is valid when instanceChargeType is `PrePaid`. Valid value:[1~12], Default to 1.
AutoRenewPeriod *int `pulumi:"autoRenewPeriod"`
// The upgrade method to use. Valid values:
// - Auto: Instances are automatically upgraded to a higher minor version.
// - Manual: Instances are forcibly upgraded to a higher minor version when the current version is unpublished.
AutoUpgradeMinorVersion *string `pulumi:"autoUpgradeMinorVersion"`
// The storage type of the instance. Valid values:
// - local_ssd: specifies to use local SSDs. This value is recommended.
// - cloud_ssd: specifies to use standard SSDs.
// - cloud_essd: specifies to use enhanced SSDs (ESSDs).
// - cloud_essd2: specifies to use enhanced SSDs (ESSDs).
// - cloud_essd3: specifies to use enhanced SSDs (ESSDs).
DbInstanceStorageType *string `pulumi:"dbInstanceStorageType"`
// The key id of the KMS. Used for encrypting a disk if not null. Only for PostgreSQL, MySQL.
EncryptionKey *string `pulumi:"encryptionKey"`
// Database type. Value options: MySQL, SQLServer, PostgreSQL, and PPAS.
Engine string `pulumi:"engine"`
// Database version. Value options can refer to the latest docs [CreateDBInstance](https://www.alibabacloud.com/help/doc-detail/26228.htm) `EngineVersion`.
EngineVersion string `pulumi:"engineVersion"`
// Set it to true to make some parameter efficient when modifying them. Default to false.
ForceRestart *bool `pulumi:"forceRestart"`
// Valid values are `Prepaid`, `Postpaid`, Default to `Postpaid`. Currently, the resource only supports PostPaid to PrePaid.
InstanceChargeType *string `pulumi:"instanceChargeType"`
// The name of DB instance. It a string of 2 to 256 characters.
InstanceName *string `pulumi:"instanceName"`
// User-defined DB instance storage space. Value range:
// - [5, 2000] for MySQL/PostgreSQL/PPAS HA dual node edition;
// - [20,1000] for MySQL 5.7 basic single node edition;
// - [10, 2000] for SQL Server 2008R2;
// - [20,2000] for SQL Server 2012 basic single node edition
// Increase progressively at a rate of 5 GB. For details, see [Instance type table](https://www.alibabacloud.com/help/doc-detail/26312.htm).
// Note: There is extra 5 GB storage for SQL Server Instance and it is not in specified `instanceStorage`.
InstanceStorage int `pulumi:"instanceStorage"`
// DB Instance type. For details, see [Instance type table](https://www.alibabacloud.com/help/doc-detail/26312.htm).
InstanceType string `pulumi:"instanceType"`
// Maintainable time period format of the instance: HH:MMZ-HH:MMZ (UTC time)
MaintainTime *string `pulumi:"maintainTime"`
// The monitoring frequency in seconds. Valid values are 5, 60, 300. Defaults to 300.
MonitoringPeriod *int `pulumi:"monitoringPeriod"`
// Set of parameters needs to be set after DB instance was launched. Available parameters can refer to the latest docs [View database parameter templates](https://www.alibabacloud.com/help/doc-detail/26284.htm) .
Parameters []InstanceParameter `pulumi:"parameters"`
// The duration that you will buy DB instance (in month). It is valid when instanceChargeType is `PrePaid`. Valid values: [1~9], 12, 24, 36. Default to 1.
Period *int `pulumi:"period"`
// The ID of resource group which the DB instance belongs.
ResourceGroupId *string `pulumi:"resourceGroupId"`
// It has been deprecated from 1.69.0 and use `securityGroupIds` instead.
//
// Deprecated: Attribute `security_group_id` has been deprecated from 1.69.0 and use `security_group_ids` instead.
SecurityGroupId *string `pulumi:"securityGroupId"`
// , Available in 1.69.0+) The list IDs to join ECS Security Group. At most supports three security groups.
SecurityGroupIds []string `pulumi:"securityGroupIds"`
// Valid values are `normal`, `safety`, Default to `normal`. support `safety` switch to high security access mode
SecurityIpMode *string `pulumi:"securityIpMode"`
// List of IP addresses allowed to access all databases of an instance. The list contains up to 1,000 IP addresses, separated by commas. Supported formats include 0.0.0.0/0, 10.23.12.24 (IP), and 10.23.12.24/24 (Classless Inter-Domain Routing (CIDR) mode. /24 represents the length of the prefix in an IP address. The range of the prefix length is [1,32]).
SecurityIps []string `pulumi:"securityIps"`
// The sql collector keep time of the instance. Valid values are `30`, `180`, `365`, `1095`, `1825`, Default to `30`.
SqlCollectorConfigValue *int `pulumi:"sqlCollectorConfigValue"`
// The sql collector status of the instance. Valid values are `Enabled`, `Disabled`, Default to `Disabled`.
SqlCollectorStatus *string `pulumi:"sqlCollectorStatus"`
// Actions performed on SSL functions, Valid values: `Open`: turn on SSL encryption; `Close`: turn off SSL encryption; `Update`: update SSL certificate. See more [engine and engineVersion limitation](https://www.alibabacloud.com/help/zh/doc-detail/26254.htm).
SslAction *string `pulumi:"sslAction"`
// A mapping of tags to assign to the resource.
// - Key: It can be up to 64 characters in length. It cannot begin with "aliyun", "acs:", "http://", or "https://". It cannot be a null string.
// - Value: It can be up to 128 characters in length. It cannot begin with "aliyun", "acs:", "http://", or "https://". It can be a null string.
Tags map[string]interface{} `pulumi:"tags"`
// The TDE(Transparent Data Encryption) status. See more [engine and engineVersion limitation](https://www.alibabacloud.com/help/zh/doc-detail/26256.htm).
TdeStatus *string `pulumi:"tdeStatus"`
// The virtual switch ID to launch DB instances in one VPC. If there are multiple vswitches, separate them with commas.
VswitchId *string `pulumi:"vswitchId"`
// The Zone to launch the DB instance. From version 1.8.1, it supports multiple zone.
// If it is a multi-zone and `vswitchId` is specified, the vswitch must in the one of them.
// The multiple zone ID can be retrieved by setting `multi` to "true" in the data source `getZones`.
ZoneId *string `pulumi:"zoneId"`
// The region ID of the secondary instance if you create a secondary instance. If you set this parameter to the same value as the ZoneId parameter, the instance is deployed in a single zone. Otherwise, the instance is deployed in multiple zones.
ZoneIdSlaveA *string `pulumi:"zoneIdSlaveA"`
// The region ID of the log instance if you create a log instance. If you set this parameter to the same value as the ZoneId parameter, the instance is deployed in a single zone. Otherwise, the instance is deployed in multiple zones.
ZoneIdSlaveB *string `pulumi:"zoneIdSlaveB"`
}
// The set of arguments for constructing a Instance resource.
type InstanceArgs struct {
// Whether to renewal a DB instance automatically or not. It is valid when instanceChargeType is `PrePaid`. Default to `false`.
AutoRenew pulumi.BoolPtrInput
// Auto-renewal period of an instance, in the unit of the month. It is valid when instanceChargeType is `PrePaid`. Valid value:[1~12], Default to 1.
AutoRenewPeriod pulumi.IntPtrInput
// The upgrade method to use. Valid values:
// - Auto: Instances are automatically upgraded to a higher minor version.
// - Manual: Instances are forcibly upgraded to a higher minor version when the current version is unpublished.
AutoUpgradeMinorVersion pulumi.StringPtrInput
// The storage type of the instance. Valid values:
// - local_ssd: specifies to use local SSDs. This value is recommended.
// - cloud_ssd: specifies to use standard SSDs.
// - cloud_essd: specifies to use enhanced SSDs (ESSDs).
// - cloud_essd2: specifies to use enhanced SSDs (ESSDs).
// - cloud_essd3: specifies to use enhanced SSDs (ESSDs).
DbInstanceStorageType pulumi.StringPtrInput
// The key id of the KMS. Used for encrypting a disk if not null. Only for PostgreSQL, MySQL.
EncryptionKey pulumi.StringPtrInput
// Database type. Value options: MySQL, SQLServer, PostgreSQL, and PPAS.
Engine pulumi.StringInput
// Database version. Value options can refer to the latest docs [CreateDBInstance](https://www.alibabacloud.com/help/doc-detail/26228.htm) `EngineVersion`.
EngineVersion pulumi.StringInput
// Set it to true to make some parameter efficient when modifying them. Default to false.
ForceRestart pulumi.BoolPtrInput
// Valid values are `Prepaid`, `Postpaid`, Default to `Postpaid`. Currently, the resource only supports PostPaid to PrePaid.
InstanceChargeType pulumi.StringPtrInput
// The name of DB instance. It a string of 2 to 256 characters.
InstanceName pulumi.StringPtrInput
// User-defined DB instance storage space. Value range:
// - [5, 2000] for MySQL/PostgreSQL/PPAS HA dual node edition;
// - [20,1000] for MySQL 5.7 basic single node edition;
// - [10, 2000] for SQL Server 2008R2;
// - [20,2000] for SQL Server 2012 basic single node edition
// Increase progressively at a rate of 5 GB. For details, see [Instance type table](https://www.alibabacloud.com/help/doc-detail/26312.htm).
// Note: There is extra 5 GB storage for SQL Server Instance and it is not in specified `instanceStorage`.
InstanceStorage pulumi.IntInput
// DB Instance type. For details, see [Instance type table](https://www.alibabacloud.com/help/doc-detail/26312.htm).
InstanceType pulumi.StringInput
// Maintainable time period format of the instance: HH:MMZ-HH:MMZ (UTC time)
MaintainTime pulumi.StringPtrInput
// The monitoring frequency in seconds. Valid values are 5, 60, 300. Defaults to 300.
MonitoringPeriod pulumi.IntPtrInput
// Set of parameters needs to be set after DB instance was launched. Available parameters can refer to the latest docs [View database parameter templates](https://www.alibabacloud.com/help/doc-detail/26284.htm) .
Parameters InstanceParameterArrayInput
// The duration that you will buy DB instance (in month). It is valid when instanceChargeType is `PrePaid`. Valid values: [1~9], 12, 24, 36. Default to 1.
Period pulumi.IntPtrInput
// The ID of resource group which the DB instance belongs.
ResourceGroupId pulumi.StringPtrInput
// It has been deprecated from 1.69.0 and use `securityGroupIds` instead.
//
// Deprecated: Attribute `security_group_id` has been deprecated from 1.69.0 and use `security_group_ids` instead.
SecurityGroupId pulumi.StringPtrInput
// , Available in 1.69.0+) The list IDs to join ECS Security Group. At most supports three security groups.
SecurityGroupIds pulumi.StringArrayInput
// Valid values are `normal`, `safety`, Default to `normal`. support `safety` switch to high security access mode
SecurityIpMode pulumi.StringPtrInput
// List of IP addresses allowed to access all databases of an instance. The list contains up to 1,000 IP addresses, separated by commas. Supported formats include 0.0.0.0/0, 10.23.12.24 (IP), and 10.23.12.24/24 (Classless Inter-Domain Routing (CIDR) mode. /24 represents the length of the prefix in an IP address. The range of the prefix length is [1,32]).
SecurityIps pulumi.StringArrayInput
// The sql collector keep time of the instance. Valid values are `30`, `180`, `365`, `1095`, `1825`, Default to `30`.
SqlCollectorConfigValue pulumi.IntPtrInput
// The sql collector status of the instance. Valid values are `Enabled`, `Disabled`, Default to `Disabled`.
SqlCollectorStatus pulumi.StringPtrInput
// Actions performed on SSL functions, Valid values: `Open`: turn on SSL encryption; `Close`: turn off SSL encryption; `Update`: update SSL certificate. See more [engine and engineVersion limitation](https://www.alibabacloud.com/help/zh/doc-detail/26254.htm).
SslAction pulumi.StringPtrInput
// A mapping of tags to assign to the resource.
// - Key: It can be up to 64 characters in length. It cannot begin with "aliyun", "acs:", "http://", or "https://". It cannot be a null string.
// - Value: It can be up to 128 characters in length. It cannot begin with "aliyun", "acs:", "http://", or "https://". It can be a null string.
Tags pulumi.MapInput
// The TDE(Transparent Data Encryption) status. See more [engine and engineVersion limitation](https://www.alibabacloud.com/help/zh/doc-detail/26256.htm).
TdeStatus pulumi.StringPtrInput
// The virtual switch ID to launch DB instances in one VPC. If there are multiple vswitches, separate them with commas.
VswitchId pulumi.StringPtrInput
// The Zone to launch the DB instance. From version 1.8.1, it supports multiple zone.
// If it is a multi-zone and `vswitchId` is specified, the vswitch must in the one of them.
// The multiple zone ID can be retrieved by setting `multi` to "true" in the data source `getZones`.
ZoneId pulumi.StringPtrInput
// The region ID of the secondary instance if you create a secondary instance. If you set this parameter to the same value as the ZoneId parameter, the instance is deployed in a single zone. Otherwise, the instance is deployed in multiple zones.
ZoneIdSlaveA pulumi.StringPtrInput
// The region ID of the log instance if you create a log instance. If you set this parameter to the same value as the ZoneId parameter, the instance is deployed in a single zone. Otherwise, the instance is deployed in multiple zones.
ZoneIdSlaveB pulumi.StringPtrInput
}
func (InstanceArgs) ElementType() reflect.Type {
return reflect.TypeOf((*instanceArgs)(nil)).Elem()
}
type InstanceInput interface {
pulumi.Input
ToInstanceOutput() InstanceOutput
ToInstanceOutputWithContext(ctx context.Context) InstanceOutput
}
func (*Instance) ElementType() reflect.Type {
return reflect.TypeOf((*Instance)(nil))
}
func (i *Instance) ToInstanceOutput() InstanceOutput {
return i.ToInstanceOutputWithContext(context.Background())
}
func (i *Instance) ToInstanceOutputWithContext(ctx context.Context) InstanceOutput {
return pulumi.ToOutputWithContext(ctx, i).(InstanceOutput)
}
func (i *Instance) ToInstancePtrOutput() InstancePtrOutput {
return i.ToInstancePtrOutputWithContext(context.Background())
}
func (i *Instance) ToInstancePtrOutputWithContext(ctx context.Context) InstancePtrOutput {
return pulumi.ToOutputWithContext(ctx, i).(InstancePtrOutput)
}
type InstancePtrInput interface {
pulumi.Input
ToInstancePtrOutput() InstancePtrOutput
ToInstancePtrOutputWithContext(ctx context.Context) InstancePtrOutput
}
type instancePtrType InstanceArgs
func (*instancePtrType) ElementType() reflect.Type {
return reflect.TypeOf((**Instance)(nil))
}
func (i *instancePtrType) ToInstancePtrOutput() InstancePtrOutput {
return i.ToInstancePtrOutputWithContext(context.Background())
}
func (i *instancePtrType) ToInstancePtrOutputWithContext(ctx context.Context) InstancePtrOutput {
return pulumi.ToOutputWithContext(ctx, i).(InstancePtrOutput)
}
// InstanceArrayInput is an input type that accepts InstanceArray and InstanceArrayOutput values.
// You can construct a concrete instance of `InstanceArrayInput` via:
//
// InstanceArray{ InstanceArgs{...} }
type InstanceArrayInput interface {
pulumi.Input
ToInstanceArrayOutput() InstanceArrayOutput
ToInstanceArrayOutputWithContext(context.Context) InstanceArrayOutput
}
type InstanceArray []InstanceInput
func (InstanceArray) ElementType() reflect.Type {
return reflect.TypeOf(([]*Instance)(nil))
}
func (i InstanceArray) ToInstanceArrayOutput() InstanceArrayOutput {
return i.ToInstanceArrayOutputWithContext(context.Background())
}
func (i InstanceArray) ToInstanceArrayOutputWithContext(ctx context.Context) InstanceArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(InstanceArrayOutput)
}
// InstanceMapInput is an input type that accepts InstanceMap and InstanceMapOutput values.
// You can construct a concrete instance of `InstanceMapInput` via:
//
// InstanceMap{ "key": InstanceArgs{...} }
type InstanceMapInput interface {
pulumi.Input
ToInstanceMapOutput() InstanceMapOutput
ToInstanceMapOutputWithContext(context.Context) InstanceMapOutput
}
type InstanceMap map[string]InstanceInput
func (InstanceMap) ElementType() reflect.Type {
return reflect.TypeOf((map[string]*Instance)(nil))
}
func (i InstanceMap) ToInstanceMapOutput() InstanceMapOutput {
return i.ToInstanceMapOutputWithContext(context.Background())
}
func (i InstanceMap) ToInstanceMapOutputWithContext(ctx context.Context) InstanceMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(InstanceMapOutput)
}
type InstanceOutput struct {
*pulumi.OutputState
}
func (InstanceOutput) ElementType() reflect.Type {
return reflect.TypeOf((*Instance)(nil))
}
func (o InstanceOutput) ToInstanceOutput() InstanceOutput {
return o
}
func (o InstanceOutput) ToInstanceOutputWithContext(ctx context.Context) InstanceOutput {
return o
}
func (o InstanceOutput) ToInstancePtrOutput() InstancePtrOutput {
return o.ToInstancePtrOutputWithContext(context.Background())
}
func (o InstanceOutput) ToInstancePtrOutputWithContext(ctx context.Context) InstancePtrOutput {
return o.ApplyT(func(v Instance) *Instance {
return &v
}).(InstancePtrOutput)
}
type InstancePtrOutput struct {
*pulumi.OutputState
}
func (InstancePtrOutput) ElementType() reflect.Type {
return reflect.TypeOf((**Instance)(nil))
}
func (o InstancePtrOutput) ToInstancePtrOutput() InstancePtrOutput {
return o
}
func (o InstancePtrOutput) ToInstancePtrOutputWithContext(ctx context.Context) InstancePtrOutput {
return o
}
type InstanceArrayOutput struct{ *pulumi.OutputState }
func (InstanceArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]Instance)(nil))
}
func (o InstanceArrayOutput) ToInstanceArrayOutput() InstanceArrayOutput {
return o
}
func (o InstanceArrayOutput) ToInstanceArrayOutputWithContext(ctx context.Context) InstanceArrayOutput {
return o
}
func (o InstanceArrayOutput) Index(i pulumi.IntInput) InstanceOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) Instance {
return vs[0].([]Instance)[vs[1].(int)]
}).(InstanceOutput)
}
type InstanceMapOutput struct{ *pulumi.OutputState }
func (InstanceMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]Instance)(nil))
}
func (o InstanceMapOutput) ToInstanceMapOutput() InstanceMapOutput {
return o
}
func (o InstanceMapOutput) ToInstanceMapOutputWithContext(ctx context.Context) InstanceMapOutput {
return o
}
func (o InstanceMapOutput) MapIndex(k pulumi.StringInput) InstanceOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) Instance {
return vs[0].(map[string]Instance)[vs[1].(string)]
}).(InstanceOutput)
}
func init() {
pulumi.RegisterOutputType(InstanceOutput{})
pulumi.RegisterOutputType(InstancePtrOutput{})
pulumi.RegisterOutputType(InstanceArrayOutput{})
pulumi.RegisterOutputType(InstanceMapOutput{})
}