/
replicationInstance.go
493 lines (447 loc) · 27.7 KB
/
replicationInstance.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
// *** 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 dms
import (
"context"
"reflect"
"github.com/pkg/errors"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Provides a DMS (Data Migration Service) replication instance resource. DMS replication instances can be created, updated, deleted, and imported.
//
// ## Example Usage
//
// Create required roles and then create a DMS instance, setting the dependsOn to the required role policy attachments.
//
// ```go
// package main
//
// import (
// "github.com/pulumi/pulumi-aws/sdk/v4/go/aws/dms"
// "github.com/pulumi/pulumi-aws/sdk/v4/go/aws/iam"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// dmsAssumeRole, err := iam.GetPolicyDocument(ctx, &iam.GetPolicyDocumentArgs{
// Statements: []iam.GetPolicyDocumentStatement{
// iam.GetPolicyDocumentStatement{
// Actions: []string{
// "sts:AssumeRole",
// },
// Principals: []iam.GetPolicyDocumentStatementPrincipal{
// iam.GetPolicyDocumentStatementPrincipal{
// Identifiers: []string{
// "dms.amazonaws.com",
// },
// Type: "Service",
// },
// },
// },
// },
// }, nil)
// if err != nil {
// return err
// }
// _, err = iam.NewRole(ctx, "dms-access-for-endpoint", &iam.RoleArgs{
// AssumeRolePolicy: pulumi.String(dmsAssumeRole.Json),
// })
// if err != nil {
// return err
// }
// _, err = iam.NewRolePolicyAttachment(ctx, "dms-access-for-endpoint-AmazonDMSRedshiftS3Role", &iam.RolePolicyAttachmentArgs{
// PolicyArn: pulumi.String("arn:aws:iam::aws:policy/service-role/AmazonDMSRedshiftS3Role"),
// Role: dms_access_for_endpoint.Name,
// })
// if err != nil {
// return err
// }
// _, err = iam.NewRole(ctx, "dms-cloudwatch-logs-role", &iam.RoleArgs{
// AssumeRolePolicy: pulumi.String(dmsAssumeRole.Json),
// })
// if err != nil {
// return err
// }
// _, err = iam.NewRolePolicyAttachment(ctx, "dms-cloudwatch-logs-role-AmazonDMSCloudWatchLogsRole", &iam.RolePolicyAttachmentArgs{
// PolicyArn: pulumi.String("arn:aws:iam::aws:policy/service-role/AmazonDMSCloudWatchLogsRole"),
// Role: dms_cloudwatch_logs_role.Name,
// })
// if err != nil {
// return err
// }
// _, err = iam.NewRole(ctx, "dms-vpc-role", &iam.RoleArgs{
// AssumeRolePolicy: pulumi.String(dmsAssumeRole.Json),
// })
// if err != nil {
// return err
// }
// _, err = iam.NewRolePolicyAttachment(ctx, "dms-vpc-role-AmazonDMSVPCManagementRole", &iam.RolePolicyAttachmentArgs{
// PolicyArn: pulumi.String("arn:aws:iam::aws:policy/service-role/AmazonDMSVPCManagementRole"),
// Role: dms_vpc_role.Name,
// })
// if err != nil {
// return err
// }
// _, err = dms.NewReplicationInstance(ctx, "test", &dms.ReplicationInstanceArgs{
// AllocatedStorage: pulumi.Int(20),
// ApplyImmediately: pulumi.Bool(true),
// AutoMinorVersionUpgrade: pulumi.Bool(true),
// AvailabilityZone: pulumi.String("us-west-2c"),
// EngineVersion: pulumi.String("3.1.4"),
// KmsKeyArn: pulumi.String("arn:aws:kms:us-east-1:123456789012:key/12345678-1234-1234-1234-123456789012"),
// MultiAz: pulumi.Bool(false),
// PreferredMaintenanceWindow: pulumi.String("sun:10:30-sun:14:30"),
// PubliclyAccessible: pulumi.Bool(true),
// ReplicationInstanceClass: pulumi.String("dms.t2.micro"),
// ReplicationInstanceId: pulumi.String("test-dms-replication-instance-tf"),
// ReplicationSubnetGroupId: pulumi.Any(aws_dms_replication_subnet_group.Test - dms - replication - subnet - group - tf.Id),
// Tags: pulumi.StringMap{
// "Name": pulumi.String("test"),
// },
// VpcSecurityGroupIds: pulumi.StringArray{
// pulumi.String("sg-12345678"),
// },
// }, pulumi.DependsOn([]pulumi.Resource{
// dms_access_for_endpoint_AmazonDMSRedshiftS3Role,
// dms_cloudwatch_logs_role_AmazonDMSCloudWatchLogsRole,
// dms_vpc_role_AmazonDMSVPCManagementRole,
// }))
// if err != nil {
// return err
// }
// return nil
// })
// }
// ```
//
// ## Import
//
// Replication instances can be imported using the `replication_instance_id`, e.g.,
//
// ```sh
// $ pulumi import aws:dms/replicationInstance:ReplicationInstance test test-dms-replication-instance-tf
// ```
type ReplicationInstance struct {
pulumi.CustomResourceState
// The amount of storage (in gigabytes) to be initially allocated for the replication instance.
AllocatedStorage pulumi.IntOutput `pulumi:"allocatedStorage"`
// Indicates that major version upgrades are allowed.
AllowMajorVersionUpgrade pulumi.BoolPtrOutput `pulumi:"allowMajorVersionUpgrade"`
// Indicates whether the changes should be applied immediately or during the next maintenance window. Only used when updating an existing resource.
ApplyImmediately pulumi.BoolPtrOutput `pulumi:"applyImmediately"`
// Indicates that minor engine upgrades will be applied automatically to the replication instance during the maintenance window.
AutoMinorVersionUpgrade pulumi.BoolOutput `pulumi:"autoMinorVersionUpgrade"`
// The EC2 Availability Zone that the replication instance will be created in.
AvailabilityZone pulumi.StringOutput `pulumi:"availabilityZone"`
// The engine version number of the replication instance.
EngineVersion pulumi.StringOutput `pulumi:"engineVersion"`
// The Amazon Resource Name (ARN) for the KMS key that will be used to encrypt the connection parameters. If you do not specify a value for `kmsKeyArn`, then AWS DMS will use your default encryption key. AWS KMS creates the default encryption key for your AWS account. Your AWS account has a different default encryption key for each AWS region.
KmsKeyArn pulumi.StringOutput `pulumi:"kmsKeyArn"`
// Specifies if the replication instance is a multi-az deployment. You cannot set the `availabilityZone` parameter if the `multiAz` parameter is set to `true`.
MultiAz pulumi.BoolOutput `pulumi:"multiAz"`
// The weekly time range during which system maintenance can occur, in Universal Coordinated Time (UTC).
PreferredMaintenanceWindow pulumi.StringOutput `pulumi:"preferredMaintenanceWindow"`
// Specifies the accessibility options for the replication instance. A value of true represents an instance with a public IP address. A value of false represents an instance with a private IP address.
PubliclyAccessible pulumi.BoolOutput `pulumi:"publiclyAccessible"`
// The Amazon Resource Name (ARN) of the replication instance.
ReplicationInstanceArn pulumi.StringOutput `pulumi:"replicationInstanceArn"`
// The compute and memory capacity of the replication instance as specified by the replication instance class. See [AWS DMS User Guide](https://docs.aws.amazon.com/dms/latest/userguide/CHAP_ReplicationInstance.Types.html) for available instance sizes and advice on which one to choose.
ReplicationInstanceClass pulumi.StringOutput `pulumi:"replicationInstanceClass"`
// The replication instance identifier. This parameter is stored as a lowercase string.
ReplicationInstanceId pulumi.StringOutput `pulumi:"replicationInstanceId"`
// A list of the private IP addresses of the replication instance.
ReplicationInstancePrivateIps pulumi.StringArrayOutput `pulumi:"replicationInstancePrivateIps"`
// A list of the public IP addresses of the replication instance.
ReplicationInstancePublicIps pulumi.StringArrayOutput `pulumi:"replicationInstancePublicIps"`
// A subnet group to associate with the replication instance.
ReplicationSubnetGroupId pulumi.StringOutput `pulumi:"replicationSubnetGroupId"`
// A map of tags to assign to the resource. .If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
Tags pulumi.StringMapOutput `pulumi:"tags"`
// A map of tags assigned to the resource, including those inherited from the provider .
TagsAll pulumi.StringMapOutput `pulumi:"tagsAll"`
// A list of VPC security group IDs to be used with the replication instance. The VPC security groups must work with the VPC containing the replication instance.
VpcSecurityGroupIds pulumi.StringArrayOutput `pulumi:"vpcSecurityGroupIds"`
}
// NewReplicationInstance registers a new resource with the given unique name, arguments, and options.
func NewReplicationInstance(ctx *pulumi.Context,
name string, args *ReplicationInstanceArgs, opts ...pulumi.ResourceOption) (*ReplicationInstance, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.ReplicationInstanceClass == nil {
return nil, errors.New("invalid value for required argument 'ReplicationInstanceClass'")
}
if args.ReplicationInstanceId == nil {
return nil, errors.New("invalid value for required argument 'ReplicationInstanceId'")
}
var resource ReplicationInstance
err := ctx.RegisterResource("aws:dms/replicationInstance:ReplicationInstance", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetReplicationInstance gets an existing ReplicationInstance 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 GetReplicationInstance(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *ReplicationInstanceState, opts ...pulumi.ResourceOption) (*ReplicationInstance, error) {
var resource ReplicationInstance
err := ctx.ReadResource("aws:dms/replicationInstance:ReplicationInstance", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering ReplicationInstance resources.
type replicationInstanceState struct {
// The amount of storage (in gigabytes) to be initially allocated for the replication instance.
AllocatedStorage *int `pulumi:"allocatedStorage"`
// Indicates that major version upgrades are allowed.
AllowMajorVersionUpgrade *bool `pulumi:"allowMajorVersionUpgrade"`
// Indicates whether the changes should be applied immediately or during the next maintenance window. Only used when updating an existing resource.
ApplyImmediately *bool `pulumi:"applyImmediately"`
// Indicates that minor engine upgrades will be applied automatically to the replication instance during the maintenance window.
AutoMinorVersionUpgrade *bool `pulumi:"autoMinorVersionUpgrade"`
// The EC2 Availability Zone that the replication instance will be created in.
AvailabilityZone *string `pulumi:"availabilityZone"`
// The engine version number of the replication instance.
EngineVersion *string `pulumi:"engineVersion"`
// The Amazon Resource Name (ARN) for the KMS key that will be used to encrypt the connection parameters. If you do not specify a value for `kmsKeyArn`, then AWS DMS will use your default encryption key. AWS KMS creates the default encryption key for your AWS account. Your AWS account has a different default encryption key for each AWS region.
KmsKeyArn *string `pulumi:"kmsKeyArn"`
// Specifies if the replication instance is a multi-az deployment. You cannot set the `availabilityZone` parameter if the `multiAz` parameter is set to `true`.
MultiAz *bool `pulumi:"multiAz"`
// The weekly time range during which system maintenance can occur, in Universal Coordinated Time (UTC).
PreferredMaintenanceWindow *string `pulumi:"preferredMaintenanceWindow"`
// Specifies the accessibility options for the replication instance. A value of true represents an instance with a public IP address. A value of false represents an instance with a private IP address.
PubliclyAccessible *bool `pulumi:"publiclyAccessible"`
// The Amazon Resource Name (ARN) of the replication instance.
ReplicationInstanceArn *string `pulumi:"replicationInstanceArn"`
// The compute and memory capacity of the replication instance as specified by the replication instance class. See [AWS DMS User Guide](https://docs.aws.amazon.com/dms/latest/userguide/CHAP_ReplicationInstance.Types.html) for available instance sizes and advice on which one to choose.
ReplicationInstanceClass *string `pulumi:"replicationInstanceClass"`
// The replication instance identifier. This parameter is stored as a lowercase string.
ReplicationInstanceId *string `pulumi:"replicationInstanceId"`
// A list of the private IP addresses of the replication instance.
ReplicationInstancePrivateIps []string `pulumi:"replicationInstancePrivateIps"`
// A list of the public IP addresses of the replication instance.
ReplicationInstancePublicIps []string `pulumi:"replicationInstancePublicIps"`
// A subnet group to associate with the replication instance.
ReplicationSubnetGroupId *string `pulumi:"replicationSubnetGroupId"`
// A map of tags to assign to the resource. .If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
Tags map[string]string `pulumi:"tags"`
// A map of tags assigned to the resource, including those inherited from the provider .
TagsAll map[string]string `pulumi:"tagsAll"`
// A list of VPC security group IDs to be used with the replication instance. The VPC security groups must work with the VPC containing the replication instance.
VpcSecurityGroupIds []string `pulumi:"vpcSecurityGroupIds"`
}
type ReplicationInstanceState struct {
// The amount of storage (in gigabytes) to be initially allocated for the replication instance.
AllocatedStorage pulumi.IntPtrInput
// Indicates that major version upgrades are allowed.
AllowMajorVersionUpgrade pulumi.BoolPtrInput
// Indicates whether the changes should be applied immediately or during the next maintenance window. Only used when updating an existing resource.
ApplyImmediately pulumi.BoolPtrInput
// Indicates that minor engine upgrades will be applied automatically to the replication instance during the maintenance window.
AutoMinorVersionUpgrade pulumi.BoolPtrInput
// The EC2 Availability Zone that the replication instance will be created in.
AvailabilityZone pulumi.StringPtrInput
// The engine version number of the replication instance.
EngineVersion pulumi.StringPtrInput
// The Amazon Resource Name (ARN) for the KMS key that will be used to encrypt the connection parameters. If you do not specify a value for `kmsKeyArn`, then AWS DMS will use your default encryption key. AWS KMS creates the default encryption key for your AWS account. Your AWS account has a different default encryption key for each AWS region.
KmsKeyArn pulumi.StringPtrInput
// Specifies if the replication instance is a multi-az deployment. You cannot set the `availabilityZone` parameter if the `multiAz` parameter is set to `true`.
MultiAz pulumi.BoolPtrInput
// The weekly time range during which system maintenance can occur, in Universal Coordinated Time (UTC).
PreferredMaintenanceWindow pulumi.StringPtrInput
// Specifies the accessibility options for the replication instance. A value of true represents an instance with a public IP address. A value of false represents an instance with a private IP address.
PubliclyAccessible pulumi.BoolPtrInput
// The Amazon Resource Name (ARN) of the replication instance.
ReplicationInstanceArn pulumi.StringPtrInput
// The compute and memory capacity of the replication instance as specified by the replication instance class. See [AWS DMS User Guide](https://docs.aws.amazon.com/dms/latest/userguide/CHAP_ReplicationInstance.Types.html) for available instance sizes and advice on which one to choose.
ReplicationInstanceClass pulumi.StringPtrInput
// The replication instance identifier. This parameter is stored as a lowercase string.
ReplicationInstanceId pulumi.StringPtrInput
// A list of the private IP addresses of the replication instance.
ReplicationInstancePrivateIps pulumi.StringArrayInput
// A list of the public IP addresses of the replication instance.
ReplicationInstancePublicIps pulumi.StringArrayInput
// A subnet group to associate with the replication instance.
ReplicationSubnetGroupId pulumi.StringPtrInput
// A map of tags to assign to the resource. .If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
Tags pulumi.StringMapInput
// A map of tags assigned to the resource, including those inherited from the provider .
TagsAll pulumi.StringMapInput
// A list of VPC security group IDs to be used with the replication instance. The VPC security groups must work with the VPC containing the replication instance.
VpcSecurityGroupIds pulumi.StringArrayInput
}
func (ReplicationInstanceState) ElementType() reflect.Type {
return reflect.TypeOf((*replicationInstanceState)(nil)).Elem()
}
type replicationInstanceArgs struct {
// The amount of storage (in gigabytes) to be initially allocated for the replication instance.
AllocatedStorage *int `pulumi:"allocatedStorage"`
// Indicates that major version upgrades are allowed.
AllowMajorVersionUpgrade *bool `pulumi:"allowMajorVersionUpgrade"`
// Indicates whether the changes should be applied immediately or during the next maintenance window. Only used when updating an existing resource.
ApplyImmediately *bool `pulumi:"applyImmediately"`
// Indicates that minor engine upgrades will be applied automatically to the replication instance during the maintenance window.
AutoMinorVersionUpgrade *bool `pulumi:"autoMinorVersionUpgrade"`
// The EC2 Availability Zone that the replication instance will be created in.
AvailabilityZone *string `pulumi:"availabilityZone"`
// The engine version number of the replication instance.
EngineVersion *string `pulumi:"engineVersion"`
// The Amazon Resource Name (ARN) for the KMS key that will be used to encrypt the connection parameters. If you do not specify a value for `kmsKeyArn`, then AWS DMS will use your default encryption key. AWS KMS creates the default encryption key for your AWS account. Your AWS account has a different default encryption key for each AWS region.
KmsKeyArn *string `pulumi:"kmsKeyArn"`
// Specifies if the replication instance is a multi-az deployment. You cannot set the `availabilityZone` parameter if the `multiAz` parameter is set to `true`.
MultiAz *bool `pulumi:"multiAz"`
// The weekly time range during which system maintenance can occur, in Universal Coordinated Time (UTC).
PreferredMaintenanceWindow *string `pulumi:"preferredMaintenanceWindow"`
// Specifies the accessibility options for the replication instance. A value of true represents an instance with a public IP address. A value of false represents an instance with a private IP address.
PubliclyAccessible *bool `pulumi:"publiclyAccessible"`
// The compute and memory capacity of the replication instance as specified by the replication instance class. See [AWS DMS User Guide](https://docs.aws.amazon.com/dms/latest/userguide/CHAP_ReplicationInstance.Types.html) for available instance sizes and advice on which one to choose.
ReplicationInstanceClass string `pulumi:"replicationInstanceClass"`
// The replication instance identifier. This parameter is stored as a lowercase string.
ReplicationInstanceId string `pulumi:"replicationInstanceId"`
// A subnet group to associate with the replication instance.
ReplicationSubnetGroupId *string `pulumi:"replicationSubnetGroupId"`
// A map of tags to assign to the resource. .If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
Tags map[string]string `pulumi:"tags"`
// A list of VPC security group IDs to be used with the replication instance. The VPC security groups must work with the VPC containing the replication instance.
VpcSecurityGroupIds []string `pulumi:"vpcSecurityGroupIds"`
}
// The set of arguments for constructing a ReplicationInstance resource.
type ReplicationInstanceArgs struct {
// The amount of storage (in gigabytes) to be initially allocated for the replication instance.
AllocatedStorage pulumi.IntPtrInput
// Indicates that major version upgrades are allowed.
AllowMajorVersionUpgrade pulumi.BoolPtrInput
// Indicates whether the changes should be applied immediately or during the next maintenance window. Only used when updating an existing resource.
ApplyImmediately pulumi.BoolPtrInput
// Indicates that minor engine upgrades will be applied automatically to the replication instance during the maintenance window.
AutoMinorVersionUpgrade pulumi.BoolPtrInput
// The EC2 Availability Zone that the replication instance will be created in.
AvailabilityZone pulumi.StringPtrInput
// The engine version number of the replication instance.
EngineVersion pulumi.StringPtrInput
// The Amazon Resource Name (ARN) for the KMS key that will be used to encrypt the connection parameters. If you do not specify a value for `kmsKeyArn`, then AWS DMS will use your default encryption key. AWS KMS creates the default encryption key for your AWS account. Your AWS account has a different default encryption key for each AWS region.
KmsKeyArn pulumi.StringPtrInput
// Specifies if the replication instance is a multi-az deployment. You cannot set the `availabilityZone` parameter if the `multiAz` parameter is set to `true`.
MultiAz pulumi.BoolPtrInput
// The weekly time range during which system maintenance can occur, in Universal Coordinated Time (UTC).
PreferredMaintenanceWindow pulumi.StringPtrInput
// Specifies the accessibility options for the replication instance. A value of true represents an instance with a public IP address. A value of false represents an instance with a private IP address.
PubliclyAccessible pulumi.BoolPtrInput
// The compute and memory capacity of the replication instance as specified by the replication instance class. See [AWS DMS User Guide](https://docs.aws.amazon.com/dms/latest/userguide/CHAP_ReplicationInstance.Types.html) for available instance sizes and advice on which one to choose.
ReplicationInstanceClass pulumi.StringInput
// The replication instance identifier. This parameter is stored as a lowercase string.
ReplicationInstanceId pulumi.StringInput
// A subnet group to associate with the replication instance.
ReplicationSubnetGroupId pulumi.StringPtrInput
// A map of tags to assign to the resource. .If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
Tags pulumi.StringMapInput
// A list of VPC security group IDs to be used with the replication instance. The VPC security groups must work with the VPC containing the replication instance.
VpcSecurityGroupIds pulumi.StringArrayInput
}
func (ReplicationInstanceArgs) ElementType() reflect.Type {
return reflect.TypeOf((*replicationInstanceArgs)(nil)).Elem()
}
type ReplicationInstanceInput interface {
pulumi.Input
ToReplicationInstanceOutput() ReplicationInstanceOutput
ToReplicationInstanceOutputWithContext(ctx context.Context) ReplicationInstanceOutput
}
func (*ReplicationInstance) ElementType() reflect.Type {
return reflect.TypeOf((**ReplicationInstance)(nil)).Elem()
}
func (i *ReplicationInstance) ToReplicationInstanceOutput() ReplicationInstanceOutput {
return i.ToReplicationInstanceOutputWithContext(context.Background())
}
func (i *ReplicationInstance) ToReplicationInstanceOutputWithContext(ctx context.Context) ReplicationInstanceOutput {
return pulumi.ToOutputWithContext(ctx, i).(ReplicationInstanceOutput)
}
// ReplicationInstanceArrayInput is an input type that accepts ReplicationInstanceArray and ReplicationInstanceArrayOutput values.
// You can construct a concrete instance of `ReplicationInstanceArrayInput` via:
//
// ReplicationInstanceArray{ ReplicationInstanceArgs{...} }
type ReplicationInstanceArrayInput interface {
pulumi.Input
ToReplicationInstanceArrayOutput() ReplicationInstanceArrayOutput
ToReplicationInstanceArrayOutputWithContext(context.Context) ReplicationInstanceArrayOutput
}
type ReplicationInstanceArray []ReplicationInstanceInput
func (ReplicationInstanceArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*ReplicationInstance)(nil)).Elem()
}
func (i ReplicationInstanceArray) ToReplicationInstanceArrayOutput() ReplicationInstanceArrayOutput {
return i.ToReplicationInstanceArrayOutputWithContext(context.Background())
}
func (i ReplicationInstanceArray) ToReplicationInstanceArrayOutputWithContext(ctx context.Context) ReplicationInstanceArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(ReplicationInstanceArrayOutput)
}
// ReplicationInstanceMapInput is an input type that accepts ReplicationInstanceMap and ReplicationInstanceMapOutput values.
// You can construct a concrete instance of `ReplicationInstanceMapInput` via:
//
// ReplicationInstanceMap{ "key": ReplicationInstanceArgs{...} }
type ReplicationInstanceMapInput interface {
pulumi.Input
ToReplicationInstanceMapOutput() ReplicationInstanceMapOutput
ToReplicationInstanceMapOutputWithContext(context.Context) ReplicationInstanceMapOutput
}
type ReplicationInstanceMap map[string]ReplicationInstanceInput
func (ReplicationInstanceMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*ReplicationInstance)(nil)).Elem()
}
func (i ReplicationInstanceMap) ToReplicationInstanceMapOutput() ReplicationInstanceMapOutput {
return i.ToReplicationInstanceMapOutputWithContext(context.Background())
}
func (i ReplicationInstanceMap) ToReplicationInstanceMapOutputWithContext(ctx context.Context) ReplicationInstanceMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(ReplicationInstanceMapOutput)
}
type ReplicationInstanceOutput struct{ *pulumi.OutputState }
func (ReplicationInstanceOutput) ElementType() reflect.Type {
return reflect.TypeOf((**ReplicationInstance)(nil)).Elem()
}
func (o ReplicationInstanceOutput) ToReplicationInstanceOutput() ReplicationInstanceOutput {
return o
}
func (o ReplicationInstanceOutput) ToReplicationInstanceOutputWithContext(ctx context.Context) ReplicationInstanceOutput {
return o
}
type ReplicationInstanceArrayOutput struct{ *pulumi.OutputState }
func (ReplicationInstanceArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*ReplicationInstance)(nil)).Elem()
}
func (o ReplicationInstanceArrayOutput) ToReplicationInstanceArrayOutput() ReplicationInstanceArrayOutput {
return o
}
func (o ReplicationInstanceArrayOutput) ToReplicationInstanceArrayOutputWithContext(ctx context.Context) ReplicationInstanceArrayOutput {
return o
}
func (o ReplicationInstanceArrayOutput) Index(i pulumi.IntInput) ReplicationInstanceOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *ReplicationInstance {
return vs[0].([]*ReplicationInstance)[vs[1].(int)]
}).(ReplicationInstanceOutput)
}
type ReplicationInstanceMapOutput struct{ *pulumi.OutputState }
func (ReplicationInstanceMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*ReplicationInstance)(nil)).Elem()
}
func (o ReplicationInstanceMapOutput) ToReplicationInstanceMapOutput() ReplicationInstanceMapOutput {
return o
}
func (o ReplicationInstanceMapOutput) ToReplicationInstanceMapOutputWithContext(ctx context.Context) ReplicationInstanceMapOutput {
return o
}
func (o ReplicationInstanceMapOutput) MapIndex(k pulumi.StringInput) ReplicationInstanceOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *ReplicationInstance {
return vs[0].(map[string]*ReplicationInstance)[vs[1].(string)]
}).(ReplicationInstanceOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*ReplicationInstanceInput)(nil)).Elem(), &ReplicationInstance{})
pulumi.RegisterInputType(reflect.TypeOf((*ReplicationInstanceArrayInput)(nil)).Elem(), ReplicationInstanceArray{})
pulumi.RegisterInputType(reflect.TypeOf((*ReplicationInstanceMapInput)(nil)).Elem(), ReplicationInstanceMap{})
pulumi.RegisterOutputType(ReplicationInstanceOutput{})
pulumi.RegisterOutputType(ReplicationInstanceArrayOutput{})
pulumi.RegisterOutputType(ReplicationInstanceMapOutput{})
}