Skip to content

Commit

Permalink
Merge pull request #1530 from alphagov/remove-mysql-primary
Browse files Browse the repository at this point in the history
Set a count of 0 on mysql-primary resources
  • Loading branch information
ChrisBAshton committed Jan 28, 2022
2 parents c485f9e + b1d6253 commit 35c722d
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions terraform/projects/infra-security-groups/mysql.tf
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ resource "aws_security_group" "mysql-primary" {
name = "${var.stackname}_mysql-primary_access"
vpc_id = "${data.terraform_remote_state.infra_vpc.vpc_id}"
description = "Access to mysql-primary from its clients"
count = 0

tags {
Name = "${var.stackname}_mysql-primary_access"
Expand All @@ -23,6 +24,7 @@ resource "aws_security_group_rule" "mysql-primary_ingress_backend_mysql" {
from_port = 3306
to_port = 3306
protocol = "tcp"
count = 0

# Which security group is the rule assigned to
security_group_id = "${aws_security_group.mysql-primary.id}"
Expand All @@ -36,6 +38,7 @@ resource "aws_security_group_rule" "mysql-primary_ingress_whitehall-backend_mysq
from_port = 3306
to_port = 3306
protocol = "tcp"
count = 0

# Which security group is the rule assigned to
security_group_id = "${aws_security_group.mysql-primary.id}"
Expand All @@ -49,6 +52,7 @@ resource "aws_security_group_rule" "mysql-primary_ingress_whitehall-frontend_mys
from_port = 3306
to_port = 3306
protocol = "tcp"
count = 0

# Which security group is the rule assigned to
security_group_id = "${aws_security_group.mysql-primary.id}"
Expand All @@ -62,6 +66,7 @@ resource "aws_security_group_rule" "mysql-primary_ingress_db-admin_mysql" {
from_port = 3306
to_port = 3306
protocol = "tcp"
count = 0

# Which security group is the rule assigned to
security_group_id = "${aws_security_group.mysql-primary.id}"
Expand All @@ -74,6 +79,7 @@ resource "aws_security_group" "mysql-replica" {
name = "${var.stackname}_mysql-replica_access"
vpc_id = "${data.terraform_remote_state.infra_vpc.vpc_id}"
description = "Access to mysql-replica from its clients"
count = 0

tags {
Name = "${var.stackname}_mysql-replica_access"
Expand All @@ -86,6 +92,7 @@ resource "aws_security_group_rule" "mysql-replica_ingress_frontend_mysql" {
from_port = 3306
to_port = 3306
protocol = "tcp"
count = 0

# Which security group is the rule assigned to
security_group_id = "${aws_security_group.mysql-replica.id}"
Expand Down

0 comments on commit 35c722d

Please sign in to comment.