Created
September 20, 2022 00:19
-
-
Save cmaggiulli/fcc1d8b215964ea7e9cac1350c6bfc90 to your computer and use it in GitHub Desktop.
Terraform Whitelist Port 22
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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