@pulumi/aws
Version:
A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.
394 lines (393 loc) • 19.7 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
import * as inputs from "../types/input";
import * as outputs from "../types/output";
/**
* 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.
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
*
* // Database Migration Service requires the below IAM Roles to be created before
* // replication instances can be created. See the DMS Documentation for
* // additional information: https://docs.aws.amazon.com/dms/latest/userguide/security-iam.html#CHAP_Security.APIRole
* // * dms-vpc-role
* // * dms-cloudwatch-logs-role
* // * dms-access-for-endpoint
* const dmsAssumeRole = aws.iam.getPolicyDocument({
* statements: [{
* actions: ["sts:AssumeRole"],
* principals: [{
* identifiers: ["dms.amazonaws.com"],
* type: "Service",
* }],
* }],
* });
* const dms_access_for_endpoint = new aws.iam.Role("dms-access-for-endpoint", {
* assumeRolePolicy: dmsAssumeRole.then(dmsAssumeRole => dmsAssumeRole.json),
* name: "dms-access-for-endpoint",
* });
* const dms_access_for_endpoint_AmazonDMSRedshiftS3Role = new aws.iam.RolePolicyAttachment("dms-access-for-endpoint-AmazonDMSRedshiftS3Role", {
* policyArn: "arn:aws:iam::aws:policy/service-role/AmazonDMSRedshiftS3Role",
* role: dms_access_for_endpoint.name,
* });
* const dms_cloudwatch_logs_role = new aws.iam.Role("dms-cloudwatch-logs-role", {
* assumeRolePolicy: dmsAssumeRole.then(dmsAssumeRole => dmsAssumeRole.json),
* name: "dms-cloudwatch-logs-role",
* });
* const dms_cloudwatch_logs_role_AmazonDMSCloudWatchLogsRole = new aws.iam.RolePolicyAttachment("dms-cloudwatch-logs-role-AmazonDMSCloudWatchLogsRole", {
* policyArn: "arn:aws:iam::aws:policy/service-role/AmazonDMSCloudWatchLogsRole",
* role: dms_cloudwatch_logs_role.name,
* });
* const dms_vpc_role = new aws.iam.Role("dms-vpc-role", {
* assumeRolePolicy: dmsAssumeRole.then(dmsAssumeRole => dmsAssumeRole.json),
* name: "dms-vpc-role",
* });
* const dms_vpc_role_AmazonDMSVPCManagementRole = new aws.iam.RolePolicyAttachment("dms-vpc-role-AmazonDMSVPCManagementRole", {
* policyArn: "arn:aws:iam::aws:policy/service-role/AmazonDMSVPCManagementRole",
* role: dms_vpc_role.name,
* });
* // Create a new replication instance
* const test = new aws.dms.ReplicationInstance("test", {
* allocatedStorage: 20,
* applyImmediately: true,
* autoMinorVersionUpgrade: true,
* availabilityZone: "us-west-2c",
* engineVersion: "3.1.4",
* kmsKeyArn: "arn:aws:kms:us-east-1:123456789012:key/12345678-1234-1234-1234-123456789012",
* multiAz: false,
* preferredMaintenanceWindow: "sun:10:30-sun:14:30",
* publiclyAccessible: true,
* replicationInstanceClass: "dms.t3.micro",
* replicationInstanceId: "test-dms-replication-instance-tf",
* replicationSubnetGroupId: test_dms_replication_subnet_group_tf.id,
* tags: {
* Name: "test",
* },
* vpcSecurityGroupIds: ["sg-12345678"],
* }, {
* dependsOn: [
* dms_access_for_endpoint_AmazonDMSRedshiftS3Role,
* dms_cloudwatch_logs_role_AmazonDMSCloudWatchLogsRole,
* dms_vpc_role_AmazonDMSVPCManagementRole,
* ],
* });
* ```
*
* ## Import
*
* Using `pulumi import`, import replication instances using the `replication_instance_id`. For example:
*
* ```sh
* $ pulumi import aws:dms/replicationInstance:ReplicationInstance test test-dms-replication-instance-tf
* ```
*/
export declare class ReplicationInstance extends pulumi.CustomResource {
/**
* Get an existing ReplicationInstance resource's state with the given name, ID, and optional extra
* properties used to qualify the lookup.
*
* @param name The _unique_ name of the resulting resource.
* @param id The _unique_ provider ID of the resource to lookup.
* @param state Any extra arguments used during the lookup.
* @param opts Optional settings to control the behavior of the CustomResource.
*/
static get(name: string, id: pulumi.Input<pulumi.ID>, state?: ReplicationInstanceState, opts?: pulumi.CustomResourceOptions): ReplicationInstance;
/**
* Returns true if the given object is an instance of ReplicationInstance. This is designed to work even
* when multiple copies of the Pulumi SDK have been loaded into the same process.
*/
static isInstance(obj: any): obj is ReplicationInstance;
/**
* The amount of storage (in gigabytes) to be initially allocated for the replication instance.
*/
readonly allocatedStorage: pulumi.Output<number>;
/**
* Indicates that major version upgrades are allowed.
*/
readonly allowMajorVersionUpgrade: pulumi.Output<boolean | undefined>;
/**
* Indicates whether the changes should be applied immediately or during the next maintenance window. Only used when updating an existing resource.
*/
readonly applyImmediately: pulumi.Output<boolean | undefined>;
/**
* Indicates that minor engine upgrades will be applied automatically to the replication instance during the maintenance window.
*/
readonly autoMinorVersionUpgrade: pulumi.Output<boolean>;
/**
* The EC2 Availability Zone that the replication instance will be created in.
*/
readonly availabilityZone: pulumi.Output<string>;
/**
* A list of custom DNS name servers supported for the replication instance to access your on-premise source or target database. This list overrides the default name servers supported by the replication instance. You can specify a comma-separated list of internet addresses for up to four on-premise DNS name servers.
*/
readonly dnsNameServers: pulumi.Output<string | undefined>;
/**
* The engine version number of the replication instance.
*/
readonly engineVersion: pulumi.Output<string>;
/**
* Configuration block for settings required for Kerberos authentication. See below.
*/
readonly kerberosAuthenticationSettings: pulumi.Output<outputs.dms.ReplicationInstanceKerberosAuthenticationSettings | undefined>;
/**
* 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.
*/
readonly kmsKeyArn: pulumi.Output<string>;
/**
* Specifies if the replication instance is a multi-az deployment. You cannot set the `availabilityZone` parameter if the `multiAz` parameter is set to `true`.
*/
readonly multiAz: pulumi.Output<boolean>;
/**
* The type of IP address protocol used by a replication instance. Valid values: `IPV4`, `DUAL`.
*/
readonly networkType: pulumi.Output<string>;
/**
* The weekly time range during which system maintenance can occur, in Universal Coordinated Time (UTC).
*/
readonly preferredMaintenanceWindow: pulumi.Output<string>;
/**
* 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.
*/
readonly publiclyAccessible: pulumi.Output<boolean>;
/**
* Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration.
*/
readonly region: pulumi.Output<string>;
/**
* The Amazon Resource Name (ARN) of the replication instance.
*/
readonly replicationInstanceArn: pulumi.Output<string>;
/**
* 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.
*/
readonly replicationInstanceClass: pulumi.Output<string>;
/**
* The replication instance identifier. This parameter is stored as a lowercase string.
*/
readonly replicationInstanceId: pulumi.Output<string>;
/**
* A list of the private IP addresses of the replication instance.
*/
readonly replicationInstancePrivateIps: pulumi.Output<string[]>;
/**
* A list of the public IP addresses of the replication instance.
*/
readonly replicationInstancePublicIps: pulumi.Output<string[]>;
/**
* A subnet group to associate with the replication instance.
*/
readonly replicationSubnetGroupId: pulumi.Output<string>;
/**
* 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.
*/
readonly tags: pulumi.Output<{
[key: string]: string;
} | undefined>;
/**
* A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
*/
readonly tagsAll: pulumi.Output<{
[key: string]: string;
}>;
/**
* 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.
*/
readonly vpcSecurityGroupIds: pulumi.Output<string[]>;
/**
* Create a ReplicationInstance resource with the given unique name, arguments, and options.
*
* @param name The _unique_ name of the resource.
* @param args The arguments to use to populate this resource's properties.
* @param opts A bag of options that control this resource's behavior.
*/
constructor(name: string, args: ReplicationInstanceArgs, opts?: pulumi.CustomResourceOptions);
}
/**
* Input properties used for looking up and filtering ReplicationInstance resources.
*/
export interface ReplicationInstanceState {
/**
* The amount of storage (in gigabytes) to be initially allocated for the replication instance.
*/
allocatedStorage?: pulumi.Input<number>;
/**
* Indicates that major version upgrades are allowed.
*/
allowMajorVersionUpgrade?: pulumi.Input<boolean>;
/**
* Indicates whether the changes should be applied immediately or during the next maintenance window. Only used when updating an existing resource.
*/
applyImmediately?: pulumi.Input<boolean>;
/**
* Indicates that minor engine upgrades will be applied automatically to the replication instance during the maintenance window.
*/
autoMinorVersionUpgrade?: pulumi.Input<boolean>;
/**
* The EC2 Availability Zone that the replication instance will be created in.
*/
availabilityZone?: pulumi.Input<string>;
/**
* A list of custom DNS name servers supported for the replication instance to access your on-premise source or target database. This list overrides the default name servers supported by the replication instance. You can specify a comma-separated list of internet addresses for up to four on-premise DNS name servers.
*/
dnsNameServers?: pulumi.Input<string>;
/**
* The engine version number of the replication instance.
*/
engineVersion?: pulumi.Input<string>;
/**
* Configuration block for settings required for Kerberos authentication. See below.
*/
kerberosAuthenticationSettings?: pulumi.Input<inputs.dms.ReplicationInstanceKerberosAuthenticationSettings>;
/**
* 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.Input<string>;
/**
* 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.Input<boolean>;
/**
* The type of IP address protocol used by a replication instance. Valid values: `IPV4`, `DUAL`.
*/
networkType?: pulumi.Input<string>;
/**
* The weekly time range during which system maintenance can occur, in Universal Coordinated Time (UTC).
*/
preferredMaintenanceWindow?: pulumi.Input<string>;
/**
* 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.Input<boolean>;
/**
* Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration.
*/
region?: pulumi.Input<string>;
/**
* The Amazon Resource Name (ARN) of the replication instance.
*/
replicationInstanceArn?: pulumi.Input<string>;
/**
* 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.Input<string>;
/**
* The replication instance identifier. This parameter is stored as a lowercase string.
*/
replicationInstanceId?: pulumi.Input<string>;
/**
* A list of the private IP addresses of the replication instance.
*/
replicationInstancePrivateIps?: pulumi.Input<pulumi.Input<string>[]>;
/**
* A list of the public IP addresses of the replication instance.
*/
replicationInstancePublicIps?: pulumi.Input<pulumi.Input<string>[]>;
/**
* A subnet group to associate with the replication instance.
*/
replicationSubnetGroupId?: pulumi.Input<string>;
/**
* 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.Input<{
[key: string]: pulumi.Input<string>;
}>;
/**
* A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
*/
tagsAll?: pulumi.Input<{
[key: string]: pulumi.Input<string>;
}>;
/**
* 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.Input<pulumi.Input<string>[]>;
}
/**
* The set of arguments for constructing a ReplicationInstance resource.
*/
export interface ReplicationInstanceArgs {
/**
* The amount of storage (in gigabytes) to be initially allocated for the replication instance.
*/
allocatedStorage?: pulumi.Input<number>;
/**
* Indicates that major version upgrades are allowed.
*/
allowMajorVersionUpgrade?: pulumi.Input<boolean>;
/**
* Indicates whether the changes should be applied immediately or during the next maintenance window. Only used when updating an existing resource.
*/
applyImmediately?: pulumi.Input<boolean>;
/**
* Indicates that minor engine upgrades will be applied automatically to the replication instance during the maintenance window.
*/
autoMinorVersionUpgrade?: pulumi.Input<boolean>;
/**
* The EC2 Availability Zone that the replication instance will be created in.
*/
availabilityZone?: pulumi.Input<string>;
/**
* A list of custom DNS name servers supported for the replication instance to access your on-premise source or target database. This list overrides the default name servers supported by the replication instance. You can specify a comma-separated list of internet addresses for up to four on-premise DNS name servers.
*/
dnsNameServers?: pulumi.Input<string>;
/**
* The engine version number of the replication instance.
*/
engineVersion?: pulumi.Input<string>;
/**
* Configuration block for settings required for Kerberos authentication. See below.
*/
kerberosAuthenticationSettings?: pulumi.Input<inputs.dms.ReplicationInstanceKerberosAuthenticationSettings>;
/**
* 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.Input<string>;
/**
* 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.Input<boolean>;
/**
* The type of IP address protocol used by a replication instance. Valid values: `IPV4`, `DUAL`.
*/
networkType?: pulumi.Input<string>;
/**
* The weekly time range during which system maintenance can occur, in Universal Coordinated Time (UTC).
*/
preferredMaintenanceWindow?: pulumi.Input<string>;
/**
* 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.Input<boolean>;
/**
* Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration.
*/
region?: pulumi.Input<string>;
/**
* 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.Input<string>;
/**
* The replication instance identifier. This parameter is stored as a lowercase string.
*/
replicationInstanceId: pulumi.Input<string>;
/**
* A subnet group to associate with the replication instance.
*/
replicationSubnetGroupId?: pulumi.Input<string>;
/**
* 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.Input<{
[key: string]: pulumi.Input<string>;
}>;
/**
* 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.Input<pulumi.Input<string>[]>;
}