Skip to content

Instantly share code, notes, and snippets.

@100daysofdevops
Created March 3, 2019 19:58
Show Gist options
  • Select an option

  • Save 100daysofdevops/d90d37328c7d2b4286cbf563c41eb78e to your computer and use it in GitHub Desktop.

Select an option

Save 100daysofdevops/d90d37328c7d2b4286cbf563c41eb78e to your computer and use it in GitHub Desktop.
resource "aws_security_group" "rds-sg" {
name = "my-rds-sg"
vpc_id = "${var.vpc_id}"
}
# Ingress Security Port 3306
resource "aws_security_group_rule" "mysql_inbound_access" {
from_port = 3306
protocol = "tcp"
security_group_id = "${aws_security_group.rds-sg.id}"
to_port = 3306
type = "ingress"
cidr_blocks = ["0.0.0.0/0"]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment