Skip to content

Instantly share code, notes, and snippets.

@khushi20218
Created August 15, 2020 04:11
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/dabacf12a3537ce54bc689b33795fcde to your computer and use it in GitHub Desktop.
Save khushi20218/dabacf12a3537ce54bc689b33795fcde to your computer and use it in GitHub Desktop.
# security group for wordpress
resource "aws_security_group" "tf_wp_sg" {
name = "tf_wp_sg"
description = "wordpress inbound"
vpc_id = aws_vpc.tf_vpc.id
ingress {
description = "http"
from_port = 80
to_port = 80
protocol = "tcp"
cidr_blocks = ["0.0.0.0/0"]
}
ingress {
description = "ssh"
from_port = 22
to_port = 22
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 = "tf-wp-sg"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment