Skip to content

Commit ea8e0bc

Browse files
authored
Add allowed_cidr_blocks to aurora-mysql to make it publicly accessible (#48)
1 parent d299bc1 commit ea8e0bc

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

aws/backing-services/aurora-mysql.tf

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,12 @@ variable "MYSQL_CLUSTER_PUBLICLY_ACCESSIBLE" {
4545
description = "Specifies the accessibility options for the DB instance. A value of true specifies an Internet-facing instance with a publicly resolvable DNS name, which resolves to a public IP address. A value of false specifies an internal instance with a DNS name that resolves to a private IP address"
4646
}
4747

48+
variable "MYSQL_CLUSTER_ALLOWED_CIDR_BLOCKS" {
49+
type = "list"
50+
default = ["0.0.0.0/0"]
51+
description = "List of CIDR blocks allowed to access the cluster"
52+
}
53+
4854
module "aurora_mysql" {
4955
source = "git::https://github.com/cloudposse/terraform-aws-rds-cluster.git?ref=tags/0.7.0"
5056
namespace = "${var.namespace}"
@@ -63,6 +69,7 @@ module "aurora_mysql" {
6369
zone_id = "${var.zone_id}"
6470
enabled = "${var.MYSQL_CLUSTER_ENABLED}"
6571
publicly_accessible = "${var.MYSQL_CLUSTER_PUBLICLY_ACCESSIBLE}"
72+
allowed_cidr_blocks = "${var.MYSQL_CLUSTER_ALLOWED_CIDR_BLOCKS}"
6673
}
6774

6875
output "aurora_mysql_database_name" {

0 commit comments

Comments
 (0)