Skip to content

Commit 92dd686

Browse files
agomezvidaleeantonbabenko
authored andcommitted
Added variable "source_db" for RDS replica option (#13)
1 parent 3a040d9 commit 92dd686

File tree

4 files changed

+14
-0
lines changed

4 files changed

+14
-0
lines changed

main.tf

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,8 @@ module "db_instance" {
4949
port = "${var.port}"
5050
iam_database_authentication_enabled = "${var.iam_database_authentication_enabled}"
5151

52+
replicate_source_db = "${var.replicate_source_db}"
53+
5254
vpc_security_group_ids = ["${var.vpc_security_group_ids}"]
5355
db_subnet_group_name = "${module.db_subnet_group.this_db_subnet_group_id}"
5456
parameter_group_name = "${module.db_parameter_group.this_db_parameter_group_id}"

modules/db_instance/main.tf

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ resource "aws_db_instance" "this" {
1919
port = "${var.port}"
2020
iam_database_authentication_enabled = "${var.iam_database_authentication_enabled}"
2121

22+
replicate_source_db = "${var.replicate_source_db}"
23+
2224
vpc_security_group_ids = ["${var.vpc_security_group_ids}"]
2325
db_subnet_group_name = "${var.db_subnet_group_name}"
2426
parameter_group_name = "${var.parameter_group_name}"

modules/db_instance/variables.tf

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,11 @@ variable "kms_key_id" {
2121
default = ""
2222
}
2323

24+
variable "replicate_source_db" {
25+
description = "Specifies that this resource is a Replicate database, and to use this value as the source database. This correlates to the identifier of another Amazon RDS Database to replicate."
26+
default = ""
27+
}
28+
2429
variable "license_model" {
2530
description = "License model information for this DB instance. Optional, but required for some DB engines, i.e. Oracle SE1"
2631
default = ""

variables.tf

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,11 @@ variable "kms_key_id" {
2121
default = ""
2222
}
2323

24+
variable "replicate_source_db" {
25+
description = "Specifies that this resource is a Replicate database, and to use this value as the source database. This correlates to the identifier of another Amazon RDS Database to replicate."
26+
default = ""
27+
}
28+
2429
variable "license_model" {
2530
description = "License model information for this DB instance. Optional, but required for some DB engines, i.e. Oracle SE1"
2631
default = ""

0 commit comments

Comments
 (0)