Skip to content

Instantly share code, notes, and snippets.

@cmaggiulli
Created September 20, 2022 00:19
Show Gist options
  • Save cmaggiulli/fcc1d8b215964ea7e9cac1350c6bfc90 to your computer and use it in GitHub Desktop.
Save cmaggiulli/fcc1d8b215964ea7e9cac1350c6bfc90 to your computer and use it in GitHub Desktop.
Terraform Whitelist Port 22
resource "aws_security_group" "jobs-worker-test" {
name = "jobs-worker-test"
description = "jobs-worker-test"
vpc_id = data.aws_vpc.core_vpc.id
ingress {
from_port = 22
to_port = 22
protocol = "tcp"
security_groups = [aws_security_group.jobs-container.id]
}
egress {
from_port = 22
to_port = 22
protocol = "tcp"
cidr_blocks = ["0.0.0.0/0"]
description = "Need to be able to sftp out"
}
egress {
from_port = 443
to_port = 443
protocol = "tcp"
cidr_blocks = ["192.168.105.201/32"]
description = "test access"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment