Skip to content

Instantly share code, notes, and snippets.

@khushi20218
Created August 10, 2020 12:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save khushi20218/71bce3795b73f62c9bfb1e8105c40ba3 to your computer and use it in GitHub Desktop.
Save khushi20218/71bce3795b73f62c9bfb1e8105c40ba3 to your computer and use it in GitHub Desktop.
resource "aws_security_group" "tf_sql_sg" {
depends_on = [
aws_route_table_association.tf_ng_assoc
]
name = "tf_sql_sg"
description = "mysql inbound"
vpc_id = aws_vpc.tf_vpc.id
ingress {
description = "mysql"
from_port = 3306
to_port = 3306
protocol = "tcp"
security_groups = [aws_security_group.tf_wp_sg.id]
}
egress {
from_port = 0
to_port = 0
protocol = "-1"
cidr_blocks = ["0.0.0.0/0"]
}
tags = {
Name = "tf_sql_sg"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment