# Base Infrastructure for DMS Here we are going to create AWS resources those are common for all DMS replication : A. Create Default DMS roles if not done B. Create DMS Subnet or if exists provide the name C. Create number of DMS Replication instances as per the project requirment. D. Create Cloudwatch Alarts for the DMS Replication instances E. Create Source and Source and Traget Endpoints (Detais below) ## DMS Roles --- Database Migration Service requires the below IAM Roles to be created before replication instances can be created. See the [DMS Documentation](https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Security.html#CHAP_Security.APIRole) for additional information. * dms-vpc-role * dms-cloudwatch-logs-role * dms-access-for-endpoint ## DMS Subnet Group --- This create DMS subnet group based on given subnet ids. Based on your Oraganization security and network deployment you need to provide public or private subnets. ## DMS Replication Instance --- Based on value of `ri_count`, those many replication instances will be created with same configuration. ## DMS Replication Monitoring --- This create below Cloudwatch Alarm for each Replication instance : * CPU Utilization * Freeable Memory * Swap Utilization We also create a Metric Filter based Cloudwatch Alarm which mointor all the task logs associated with the replication instance and notify if there is any error `"E:"` detected in the DMS replication tasks for which Cloudwtach logging enabled. This script create a Cloudwatch log group for each replication instance with configurable retention period. ## Source database DMS Endpoint --- Considering Security best parctice, we recommentd you to keep all database details in a AWS secret manager and provide the secret name as the input to this terraform project. This way you can avoid hard coding sensetive database details in the `.tfvar` file. If you can not create AWS secret, you have option to provide input for each field. ### SSL Configuration --- AWS DMS support SSL ([link](https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Security.html#CHAP_Security.SSL)). You need to add the certificate (.pem/.sso) files in the `Certificates` directort and rfer them in the `aws_dms_certificate` resource creation. ### Secret Manager Template --- Based on engine type the secret string json structure as below : ```json { "engine" : "<>" , "username" : "<>" , "password" : "<>" , "db_name" : "<>" , "db_port" : 9999 , "db_host" : "<>" } ``` If Oracle database using ASM to store archive logfiles, you need to provide details for the ASM instance. To increase security you can store all required valuse in a AWS Secret and provide the secret name. The JSON format of the secter string need to be below format. You have option to provide these details as individual field in `input.tfvar` file also. ```json { "username" : "<>" , "password" : "<>" , "db_name" : "+ASM" , "db_port" : 9999 , "db_host" : "<>" } ``` ### Source Endpoint for Oracle database --- AWS DMS provide many extra connection attributes (ECA) when Oracle as source database for DMS. These ECA are applicatble for specific conditions. This project automatically add ECA for below features : * `Log Miner` and `Binary Reader` * Oracle ASM * Source is RDS for Oracle * Source is Read replica / Oracle Active dataguard. You need to provide other ECA as applicable for your use case. Also this script creates both `Log Miner` and `Binary Reader` endpoint for source Oracle endpoint. Based on use case you can you the requied endpoint. ### Source Endpoint for Non Oracle Databases --- There is no engine specific implementation done for non-Oracle databases. ## Target database DMS Endpoint --- Considering Security best parctice, we recommentd you to keep all database details in a AWS secret manager and provide the secret name as the input to this terraform project. This way you can avoid hard coding sensetive database details in the `.tfvar` file. If you can not create AWS secret, you have option to provide input for each field. ### SSL Configuration --- AWS DMS support SSL ([link](https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Security.html#CHAP_Security.SSL)). You need to add the certificate (.pem/.sso) files in the `Certificates` directort and rfer them in the `aws_dms_certificate` resource creation. ### Secret Manager Template --- Based on engine type the secret string json structure as below : ```json { "engine" : "<>" , "username" : "<>" , "password" : "<>" , "db_name" : "<>" , "db_port" : 9999 , "db_host" : "<>" } ``` There is no engine specific automation done for DMS Target Endpoint. --- ## Requirements | Name | Version | |------|---------| | [terraform](#requirement\_terraform) | >= 0.14.9 | | [aws](#requirement\_aws) | ~> 4.22 | ## Providers | Name | Version | |------|---------| | [aws](#provider\_aws) | 3.70.0 | ## Modules | Name | Source | Version | |------|--------|---------| | [dms\_ri\_monitor](#module\_dms\_ri\_monitor) | ../Monitor/replicationInstance | n/a | ## Resources | Name | Type | |------|------| | [aws_dms_certificate.src_certificate](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/dms_certificate) | resource | | [aws_dms_certificate.tgt_certificate](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/dms_certificate) | resource | | [aws_dms_endpoint.src_db_ep](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/dms_endpoint) | resource | | [aws_dms_endpoint.src_ora_db_br_ep](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/dms_endpoint) | resource | | [aws_dms_endpoint.src_ora_db_lm_ep](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/dms_endpoint) | resource | | [aws_dms_endpoint.tgt_db_ep](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/dms_endpoint) | resource | | [aws_dms_replication_instance.rep_inst](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/dms_replication_instance) | resource | | [aws_dms_replication_subnet_group.dms_subnet_group](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/dms_replication_subnet_group) | resource | | [aws_iam_role.dms-access-for-endpoint](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_role) | resource | | [aws_iam_role.dms-cloudwatch-logs-role](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_role) | resource | | [aws_iam_role.dms-vpc-role](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_role) | resource | | [aws_iam_role_policy_attachment.dms-access-for-endpoint-AmazonDMSRedshiftS3Role](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_role_policy_attachment) | resource | | [aws_iam_role_policy_attachment.dms-cloudwatch-logs-role-AmazonDMSCloudWatchLogsRole](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_role_policy_attachment) | resource | | [aws_iam_role_policy_attachment.dms-vpc-role-AmazonDMSVPCManagementRole](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_role_policy_attachment) | resource | | [aws_iam_policy_document.dms_assume_role](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/iam_policy_document) | data source | | [aws_kms_key.ri_kms_arn](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/kms_key) | data source | | [aws_kms_key.src_kms_alias](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/kms_key) | data source | | [aws_kms_key.tgt_kms_alias](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/kms_key) | data source | | [aws_secretsmanager_secret_version.asm_secret](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/secretsmanager_secret_version) | data source | | [aws_secretsmanager_secret_version.src_secret](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/secretsmanager_secret_version) | data source | | [aws_secretsmanager_secret_version.tgt_secret](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/secretsmanager_secret_version) | data source | | [aws_sns_topic.dms_sns](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/sns_topic) | data source | ## Inputs | Name | Description | Type | Default | Required | |------|-------------|------|---------|:--------:| | [CW\_CustomNameSpace](#input\_CW\_CustomNameSpace) | Cloudwatch Custom NameSpace to Publish Metric | `string` | `"CustomMetrics/DMS"` | no | | [aws\_region](#input\_aws\_region) | Region for the VPC | `string` | `"eu-west-1"` | no | | [common\_tags](#input\_common\_tags) | A mapping of tags to assign to the resource | `map(string)` | `null` | no | | [create\_default\_dms\_roles](#input\_create\_default\_dms\_roles) | whether to create default DMS roles | `bool` | `false` | no | | [create\_dms\_subnet\_group](#input\_create\_dms\_subnet\_group) | whether to create new subnet group for DMS replication instance | `bool` | `true` | no | | [create\_src\_dms\_certificate](#input\_create\_src\_dms\_certificate) | Whether to create Certificate (For SSL) of the Source endpoint connection | `bool` | `false` | no | | [create\_tgt\_dms\_certificate](#input\_create\_tgt\_dms\_certificate) | Whether to create Certificate (For SSL) of the Target endpoint connection | `bool` | `false` | no | | [dms\_subnet\_group\_id](#input\_dms\_subnet\_group\_id) | DMS Subnet group id for replication instance | `string` | `"default-dms-subnet-group"` | no | | [dms\_subnet\_ids](#input\_dms\_subnet\_ids) | VPC Subnet group ids, those will be part of DMS Subnet Group | `list(any)` | `[]` | no | | [is\_tde\_enabled](#input\_is\_tde\_enabled) | Is the source Oracle database has TDE enabled tablespace/column? | `bool` | `false` | no | | [oracle\_asm\_host](#input\_oracle\_asm\_host) | Oracle ASM host name/IP | `string` | `""` | no | | [oracle\_asm\_port](#input\_oracle\_asm\_port) | Oracle ASM Port | `number` | `1521` | no | | [oracle\_asm\_pwd](#input\_oracle\_asm\_pwd) | Oracle ASM Password | `string` | `""` | no | | [oracle\_asm\_secret](#input\_oracle\_asm\_secret) | Secret name for the Oracle ASM secret | `string` | `""` | no | | [oracle\_asm\_sid](#input\_oracle\_asm\_sid) | Oracle ASM SID | `string` | `"+ASM"` | no | | [oracle\_asm\_user](#input\_oracle\_asm\_user) | Oracle ASM username | `string` | `""` | no | | [oracle\_db\_version](#input\_oracle\_db\_version) | Source Oracle database version | `string` | `"19"` | no | | [ri-mapping](#input\_ri-mapping) | n/a | `list(any)` |
[
"2",
"1",
"2"
]
| no | | [ri\_allocated\_storage](#input\_ri\_allocated\_storage) | Replication instance storage size in GB | `number` | `100` | no | | [ri\_availability\_zone](#input\_ri\_availability\_zone) | AZ for replication instance | `string` | `null` | no | | [ri\_count](#input\_ri\_count) | Number of replication instance to use | `number` | `2` | no | | [ri\_cw\_logs\_retentions](#input\_ri\_cw\_logs\_retentions) | Cloudwatch Log Group retention for the Replication Instance | `number` | `7` | no | | [ri\_engine\_version](#input\_ri\_engine\_version) | Replication engine version | `string` | `"3.1.3"` | no | | [ri\_instance\_class](#input\_ri\_instance\_class) | Type of the ec2 instance used for replication instance | `string` | `"dms.t3.large"` | no | | [ri\_kms\_alias](#input\_ri\_kms\_alias) | KMS key ARN that will be used to encrypt the connection | `string` | `"aws/dms"` | no | | [ri\_monitoring\_sns\_topic](#input\_ri\_monitoring\_sns\_topic) | SNS Topic to be used for DMS Replication Instance monitoring | `string` | `""` | no | | [ri\_multi\_az](#input\_ri\_multi\_az) | whether to enable multi AZ for replication instance | `bool` | `false` | no | | [ri\_preferred\_maintenance\_window](#input\_ri\_preferred\_maintenance\_window) | AZ for replication instance | `string` | `"sun:10:30-sun:14:30"` | no | | [ri\_prefix](#input\_ri\_prefix) | Replication Instance name prefix | `string` | n/a | yes | | [ri\_publicly\_accessible](#input\_ri\_publicly\_accessible) | whether to enable publicly accessible for replication instance | `bool` | `false` | no | | [ri\_vpc\_security\_group\_ids](#input\_ri\_vpc\_security\_group\_ids) | Replication instance security group ids | `list(any)` | n/a | yes | | [src\_db\_engine](#input\_src\_db\_engine) | Source DB engine type | `string` | n/a | yes | | [src\_db\_host](#input\_src\_db\_host) | Source DB Host endpoint id | `string` | `""` | no | | [src\_db\_name](#input\_src\_db\_name) | Source DB names | `string` | `""` | no | | [src\_db\_port](#input\_src\_db\_port) | Source DB port | `number` | `1521` | no | | [src\_db\_pwd](#input\_src\_db\_pwd) | DMS Source Endpoint User password. Recommended to use srcDBhost\_secret | `string` | `""` | no | | [src\_db\_secret](#input\_src\_db\_secret) | Secret name for the Source DB | `string` | `""` | no | | [src\_db\_user](#input\_src\_db\_user) | DMS Source Endpoint User name. Recommended to use srcDBhost\_secret | `string` | `""` | no | | [src\_dms\_certificate\_arn](#input\_src\_dms\_certificate\_arn) | Certificate ARN (For SSL) of the Source endpoint connection | `string` | `""` | no | | [src\_dms\_certificate\_name](#input\_src\_dms\_certificate\_name) | Certificate Name (For SSL) of the Source endpoint connection to be created | `string` | `"dms-source-ep-certificate"` | no | | [src\_ep\_prefix](#input\_src\_ep\_prefix) | DMS endpoint prefix for the Source DB | `string` | `""` | no | | [src\_extra\_connection\_attributes](#input\_src\_extra\_connection\_attributes) | DMS Extra connection attributes for source endpoints | `string` | `""` | no | | [src\_kms\_alias](#input\_src\_kms\_alias) | KMS key alias that will be used to encrypt the endpoint | `string` | `"aws/dms"` | no | | [src\_rds](#input\_src\_rds) | Is the Source DB RDS ? | `bool` | `false` | no | | [src\_read\_replica](#input\_src\_read\_replica) | Is the Source DB read replica (Oracle Active Dataguard / RDS Read replica) ? | `bool` | `false` | no | | [src\_ssl\_mode](#input\_src\_ssl\_mode) | Is the DB connection SSL Enabled ? [none require verify-ca verify-full] | `string` | `"none"` | no | | [tgt\_db\_engine](#input\_tgt\_db\_engine) | Target DB engine type | `string` | n/a | yes | | [tgt\_db\_host](#input\_tgt\_db\_host) | Target DB Host name/IP | `string` | `""` | no | | [tgt\_db\_name](#input\_tgt\_db\_name) | Target DB names | `string` | `""` | no | | [tgt\_db\_port](#input\_tgt\_db\_port) | Target DB port | `number` | n/a | yes | | [tgt\_db\_pwd](#input\_tgt\_db\_pwd) | DMS Target Endpoint User password | `string` | `""` | no | | [tgt\_db\_secret](#input\_tgt\_db\_secret) | Secret name for the Source DB | `string` | `""` | no | | [tgt\_db\_user](#input\_tgt\_db\_user) | DMS Target Endpoint User names | `string` | `""` | no | | [tgt\_dms\_certificate\_arn](#input\_tgt\_dms\_certificate\_arn) | Certificate ARN (For SSL) of the Target endpoint connection | `string` | `""` | no | | [tgt\_dms\_certificate\_name](#input\_tgt\_dms\_certificate\_name) | Certificate Name (For SSL) of the Target endpoint connection to be created | `string` | `"dms-target-ep-certificate"` | no | | [tgt\_ep\_prefix](#input\_tgt\_ep\_prefix) | DMS endpoint prefix for the Target DB | `string` | `""` | no | | [tgt\_extra\_connection\_attributes](#input\_tgt\_extra\_connection\_attributes) | DMS Extra connection attributes for target endpoints | `string` | `null` | no | | [tgt\_kms\_alias](#input\_tgt\_kms\_alias) | KMS key alias that will be used to encrypt the endpoint | `string` | `"aws/dms"` | no | | [tgt\_ssl\_mode](#input\_tgt\_ssl\_mode) | Is the DB connection SSL Enabled ? [none require verify-ca verify-full] | `string` | `"none"` | no | | [use\_cdc](#input\_use\_cdc) | Is the migration required change data capture ? | `bool` | `true` | no | ## Outputs | Name | Description | |------|-------------| | [replication\_instance\_arns](#output\_replication\_instance\_arns) | List of Replication Instance's ARN | | [replication\_instance\_names](#output\_replication\_instance\_names) | List of Replication Instance's name | | [source\_non\_oracle\_endpoint\_arn](#output\_source\_non\_oracle\_endpoint\_arn) | ARN of the Source Endpoint for Non Oracle Target | | [source\_non\_oracle\_endpoint\_name](#output\_source\_non\_oracle\_endpoint\_name) | Name of the Source Endpoint for Non Oracle Target | | [source\_oracle\_binaryreader\_endpoint\_arn](#output\_source\_oracle\_binaryreader\_endpoint\_arn) | ARN of the Source Endpoint for Oracle Binary Reader | | [source\_oracle\_binaryreader\_endpoint\_name](#output\_source\_oracle\_binaryreader\_endpoint\_name) | Name of the Source Endpoint for Oracle Binary Reader | | [source\_oracle\_logminer\_endpoint\_arn](#output\_source\_oracle\_logminer\_endpoint\_arn) | ARN of the Source Endpoint for Oracle Logminer | | [source\_oracle\_logminer\_endpoint\_name](#output\_source\_oracle\_logminer\_endpoint\_name) | Name of the Source Endpoint for Oracle Logminer | | [target\_endpoint\_arn](#output\_target\_endpoint\_arn) | Target Endpoint ARN | | [target\_endpoint\_name](#output\_target\_endpoint\_name) | Target Endpoint Name | ## Requirements | Name | Version | |------|---------| | [terraform](#requirement\_terraform) | >= 0.14.9 | | [aws](#requirement\_aws) | ~> 4.20 | ## Providers | Name | Version | |------|---------| | [aws](#provider\_aws) | 3.70.0 | ## Modules | Name | Source | Version | |------|--------|---------| | [dms\_ri\_monitor](#module\_dms\_ri\_monitor) | ../Monitor/replicationInstance | n/a | ## Resources | Name | Type | |------|------| | [aws_dms_certificate.src_certificate](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/dms_certificate) | resource | | [aws_dms_certificate.tgt_certificate](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/dms_certificate) | resource | | [aws_dms_endpoint.src_db_ep](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/dms_endpoint) | resource | | [aws_dms_endpoint.src_ora_db_br_ep](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/dms_endpoint) | resource | | [aws_dms_endpoint.src_ora_db_lm_ep](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/dms_endpoint) | resource | | [aws_dms_endpoint.tgt_db_ep](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/dms_endpoint) | resource | | [aws_dms_replication_instance.rep_inst](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/dms_replication_instance) | resource | | [aws_dms_replication_subnet_group.dms_subnet_group](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/dms_replication_subnet_group) | resource | | [aws_iam_role.dms-access-for-endpoint](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_role) | resource | | [aws_iam_role.dms-cloudwatch-logs-role](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_role) | resource | | [aws_iam_role.dms-vpc-role](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_role) | resource | | [aws_iam_role_policy_attachment.dms-access-for-endpoint-AmazonDMSRedshiftS3Role](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_role_policy_attachment) | resource | | [aws_iam_role_policy_attachment.dms-cloudwatch-logs-role-AmazonDMSCloudWatchLogsRole](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_role_policy_attachment) | resource | | [aws_iam_role_policy_attachment.dms-vpc-role-AmazonDMSVPCManagementRole](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_role_policy_attachment) | resource | | [aws_iam_policy_document.dms_assume_role](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/iam_policy_document) | data source | | [aws_kms_key.ri_kms_arn](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/kms_key) | data source | | [aws_kms_key.src_kms_alias](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/kms_key) | data source | | [aws_kms_key.tgt_kms_alias](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/kms_key) | data source | | [aws_secretsmanager_secret_version.asm_secret](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/secretsmanager_secret_version) | data source | | [aws_secretsmanager_secret_version.src_secret](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/secretsmanager_secret_version) | data source | | [aws_secretsmanager_secret_version.tgt_secret](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/secretsmanager_secret_version) | data source | | [aws_sns_topic.dms_sns](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/sns_topic) | data source | ## Inputs | Name | Description | Type | Default | Required | |------|-------------|------|---------|:--------:| | [CW\_CustomNameSpace](#input\_CW\_CustomNameSpace) | Cloudwatch Custom NameSpace to Publish Metric | `string` | `"CustomMetrics/DMS"` | no | | [aws\_region](#input\_aws\_region) | Region for the VPC | `string` | `"eu-west-1"` | no | | [common\_tags](#input\_common\_tags) | A mapping of tags to assign to the resource | `map(string)` | `null` | no | | [create\_default\_dms\_roles](#input\_create\_default\_dms\_roles) | whether to create default DMS roles | `bool` | `false` | no | | [create\_dms\_subnet\_group](#input\_create\_dms\_subnet\_group) | whether to create new subnet group for DMS replication instance | `bool` | `true` | no | | [create\_src\_dms\_certificate](#input\_create\_src\_dms\_certificate) | Whether to create Certificate (For SSL) of the Source endpoint connection | `bool` | `false` | no | | [create\_tgt\_dms\_certificate](#input\_create\_tgt\_dms\_certificate) | Whether to create Certificate (For SSL) of the Target endpoint connection | `bool` | `false` | no | | [dms\_subnet\_group\_id](#input\_dms\_subnet\_group\_id) | DMS Subnet group id for replication instance | `string` | `"default-dms-subnet-group"` | no | | [dms\_subnet\_ids](#input\_dms\_subnet\_ids) | VPC Subnet group ids, those will be part of DMS Subnet Group | `list(any)` | `[]` | no | | [is\_tde\_enabled](#input\_is\_tde\_enabled) | Is the source Oracle database has TDE enabled tablespace/column? | `bool` | `false` | no | | [oracle\_asm\_host](#input\_oracle\_asm\_host) | Oracle ASM host name/IP | `string` | `""` | no | | [oracle\_asm\_port](#input\_oracle\_asm\_port) | Oracle ASM Port | `number` | `1521` | no | | [oracle\_asm\_pwd](#input\_oracle\_asm\_pwd) | Oracle ASM Password | `string` | `""` | no | | [oracle\_asm\_secret](#input\_oracle\_asm\_secret) | Secret name for the Oracle ASM secret | `string` | `""` | no | | [oracle\_asm\_sid](#input\_oracle\_asm\_sid) | Oracle ASM SID | `string` | `"+ASM"` | no | | [oracle\_asm\_user](#input\_oracle\_asm\_user) | Oracle ASM username | `string` | `""` | no | | [oracle\_db\_version](#input\_oracle\_db\_version) | Source Oracle database version | `string` | `"19"` | no | | [ri-mapping](#input\_ri-mapping) | n/a | `list(any)` |
[
"2",
"1",
"2"
]
| no | | [ri\_allocated\_storage](#input\_ri\_allocated\_storage) | Replication instance storage size in GB | `number` | `100` | no | | [ri\_availability\_zone](#input\_ri\_availability\_zone) | AZ for replication instance | `string` | `null` | no | | [ri\_count](#input\_ri\_count) | Number of replication instance to use | `number` | `2` | no | | [ri\_cw\_logs\_retentions](#input\_ri\_cw\_logs\_retentions) | Cloudwatch Log Group retention for the Replication Instance | `number` | `7` | no | | [ri\_engine\_version](#input\_ri\_engine\_version) | Replication engine version | `string` | `"3.1.3"` | no | | [ri\_instance\_class](#input\_ri\_instance\_class) | Type of the ec2 instance used for replication instance | `string` | `"dms.t3.large"` | no | | [ri\_kms\_alias](#input\_ri\_kms\_alias) | KMS key ARN that will be used to encrypt the connection | `string` | `"aws/dms"` | no | | [ri\_monitoring\_sns\_topic](#input\_ri\_monitoring\_sns\_topic) | SNS Topic to be used for DMS Replication Instance monitoring | `string` | `""` | no | | [ri\_multi\_az](#input\_ri\_multi\_az) | whether to enable multi AZ for replication instance | `bool` | `false` | no | | [ri\_preferred\_maintenance\_window](#input\_ri\_preferred\_maintenance\_window) | AZ for replication instance | `string` | `"sun:10:30-sun:14:30"` | no | | [ri\_prefix](#input\_ri\_prefix) | Replication Instance name prefix | `string` | n/a | yes | | [ri\_publicly\_accessible](#input\_ri\_publicly\_accessible) | whether to enable publicly accessible for replication instance | `bool` | `false` | no | | [ri\_vpc\_security\_group\_ids](#input\_ri\_vpc\_security\_group\_ids) | Replication instance security group ids | `list(any)` | n/a | yes | | [src\_db\_engine](#input\_src\_db\_engine) | Source DB engine type | `string` | n/a | yes | | [src\_db\_host](#input\_src\_db\_host) | Source DB Host endpoint id | `string` | `""` | no | | [src\_db\_name](#input\_src\_db\_name) | Source DB names | `string` | `""` | no | | [src\_db\_port](#input\_src\_db\_port) | Source DB port | `number` | `1521` | no | | [src\_db\_pwd](#input\_src\_db\_pwd) | DMS Source Endpoint User password. Recommended to use srcDBhost\_secret | `string` | `""` | no | | [src\_db\_secret](#input\_src\_db\_secret) | Secret name for the Source DB | `string` | `""` | no | | [src\_db\_user](#input\_src\_db\_user) | DMS Source Endpoint User name. Recommended to use srcDBhost\_secret | `string` | `""` | no | | [src\_dms\_certificate\_arn](#input\_src\_dms\_certificate\_arn) | Certificate ARN (For SSL) of the Source endpoint connection | `string` | `""` | no | | [src\_dms\_certificate\_name](#input\_src\_dms\_certificate\_name) | Certificate Name (For SSL) of the Source endpoint connection to be created | `string` | `"dms-source-ep-certificate"` | no | | [src\_ep\_prefix](#input\_src\_ep\_prefix) | DMS endpoint prefix for the Source DB | `string` | `""` | no | | [src\_extra\_connection\_attributes](#input\_src\_extra\_connection\_attributes) | DMS Extra connection attributes for source endpoints | `string` | `""` | no | | [src\_kms\_alias](#input\_src\_kms\_alias) | KMS key alias that will be used to encrypt the endpoint | `string` | `"aws/dms"` | no | | [src\_rds](#input\_src\_rds) | Is the Source DB RDS ? | `bool` | `false` | no | | [src\_read\_replica](#input\_src\_read\_replica) | Is the Source DB read replica (Oracle Active Dataguard / RDS Read replica) ? | `bool` | `false` | no | | [src\_ssl\_mode](#input\_src\_ssl\_mode) | Is the DB connection SSL Enabled ? [none require verify-ca verify-full] | `string` | `"none"` | no | | [tgt\_db\_engine](#input\_tgt\_db\_engine) | Target DB engine type | `string` | n/a | yes | | [tgt\_db\_host](#input\_tgt\_db\_host) | Target DB Host name/IP | `string` | `""` | no | | [tgt\_db\_name](#input\_tgt\_db\_name) | Target DB names | `string` | `""` | no | | [tgt\_db\_port](#input\_tgt\_db\_port) | Target DB port | `number` | n/a | yes | | [tgt\_db\_pwd](#input\_tgt\_db\_pwd) | DMS Target Endpoint User password | `string` | `""` | no | | [tgt\_db\_secret](#input\_tgt\_db\_secret) | Secret name for the Source DB | `string` | `""` | no | | [tgt\_db\_user](#input\_tgt\_db\_user) | DMS Target Endpoint User names | `string` | `""` | no | | [tgt\_dms\_certificate\_arn](#input\_tgt\_dms\_certificate\_arn) | Certificate ARN (For SSL) of the Target endpoint connection | `string` | `""` | no | | [tgt\_dms\_certificate\_name](#input\_tgt\_dms\_certificate\_name) | Certificate Name (For SSL) of the Target endpoint connection to be created | `string` | `"dms-target-ep-certificate"` | no | | [tgt\_ep\_prefix](#input\_tgt\_ep\_prefix) | DMS endpoint prefix for the Target DB | `string` | `""` | no | | [tgt\_extra\_connection\_attributes](#input\_tgt\_extra\_connection\_attributes) | DMS Extra connection attributes for target endpoints | `string` | `null` | no | | [tgt\_kms\_alias](#input\_tgt\_kms\_alias) | KMS key alias that will be used to encrypt the endpoint | `string` | `"aws/dms"` | no | | [tgt\_ssl\_mode](#input\_tgt\_ssl\_mode) | Is the DB connection SSL Enabled ? [none require verify-ca verify-full] | `string` | `"none"` | no | | [use\_cdc](#input\_use\_cdc) | Is the migration required change data capture ? | `bool` | `true` | no | ## Outputs | Name | Description | |------|-------------| | [replication\_instance\_arns](#output\_replication\_instance\_arns) | List of Replication Instance's ARN | | [replication\_instance\_names](#output\_replication\_instance\_names) | List of Replication Instance's name | | [source\_non\_oracle\_endpoint\_arn](#output\_source\_non\_oracle\_endpoint\_arn) | ARN of the Source Endpoint for Non Oracle Target | | [source\_non\_oracle\_endpoint\_name](#output\_source\_non\_oracle\_endpoint\_name) | Name of the Source Endpoint for Non Oracle Target | | [source\_oracle\_binaryreader\_endpoint\_arn](#output\_source\_oracle\_binaryreader\_endpoint\_arn) | ARN of the Source Endpoint for Oracle Binary Reader | | [source\_oracle\_binaryreader\_endpoint\_name](#output\_source\_oracle\_binaryreader\_endpoint\_name) | Name of the Source Endpoint for Oracle Binary Reader | | [source\_oracle\_logminer\_endpoint\_arn](#output\_source\_oracle\_logminer\_endpoint\_arn) | ARN of the Source Endpoint for Oracle Logminer | | [source\_oracle\_logminer\_endpoint\_name](#output\_source\_oracle\_logminer\_endpoint\_name) | Name of the Source Endpoint for Oracle Logminer | | [target\_endpoint\_arn](#output\_target\_endpoint\_arn) | Target Endpoint ARN | | [target\_endpoint\_name](#output\_target\_endpoint\_name) | Target Endpoint Name |