Skip to content

Instantly share code, notes, and snippets.

@rohitg00
Created June 14, 2020 16:08
Show Gist options
  • Save rohitg00/70b244ddbc29eff792908879ca215631 to your computer and use it in GitHub Desktop.
Save rohitg00/70b244ddbc29eff792908879ca215631 to your computer and use it in GitHub Desktop.
//Creating Security Group
resource "aws_security_group" "web-SG" {
name = "Terraform-SG"
description = "Web Environment Security Group"
//Adding Rules to Security Group
ingress {
description = "SSH Rule"
from_port = 22
to_port = 22
protocol = "tcp"
cidr_blocks = ["0.0.0.0/0"]
}
ingress {
description = "HTTP Rule"
from_port = 80
to_port = 80
protocol = "tcp"
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