Created
September 6, 2020 13:44
-
-
Save khushi20218/517bf1a0b09e354d7bf6af06ca876019 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Security Group for DB | |
resource "aws_security_group" "allow_data_in_db" { | |
name = "allow_db" | |
description = "Allow WP to put data in DB" | |
vpc_id = data.aws_vpc.def_vpc.id | |
ingress { | |
description = "MySQL" | |
from_port = 3306 | |
to_port = 3306 | |
protocol = "tcp" | |
cidr_blocks = ["0.0.0.0/0"] | |
} | |
egress { | |
from_port = 0 | |
to_port = 0 | |
protocol = "-1" | |
cidr_blocks = ["0.0.0.0/0"] | |
} | |
tags = { | |
Name = "allow_wp_in_db" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment