Skip to content

Commit

Permalink
Merge pull request #16 from kkoz/terraform-network-fix
Browse files Browse the repository at this point in the history
Add outbound rules to EC2 security group to allow public internet access
  • Loading branch information
joshmoore authored Feb 25, 2021
2 parents 107ca33 + a7f1708 commit 98ee5db
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions terraform/ngff-benchmark.tf
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,22 @@ resource "aws_security_group" "security_group" {
name = "benchmarking_security_group"
vpc_id = aws_vpc.vpc.id

egress {
description = "Unsecured from internet"
from_port = 80
to_port = 80
protocol = "tcp"
cidr_blocks = ["0.0.0.0/0"]
}

egress {
description = "TLS from internet"
from_port = 443
to_port = 443
protocol = "tcp"
cidr_blocks = ["0.0.0.0/0"]
}

ingress {
description = "TLS from VPC"
from_port = 443
Expand Down Expand Up @@ -132,3 +148,10 @@ resource "aws_instance" "client_instance" {
}
}

output "instance_dns_1" {
value = aws_instance.nginx_instance.public_dns
}

output "instance_dns_2" {
value = aws_instance.client_instance.public_dns
}

0 comments on commit 98ee5db

Please sign in to comment.