Skip to content

Instantly share code, notes, and snippets.

@theCaptN21
Last active February 2, 2023 14:56
Show Gist options
  • Save theCaptN21/610aa056acdf2684ec1023f6c7609bc5 to your computer and use it in GitHub Desktop.
Save theCaptN21/610aa056acdf2684ec1023f6c7609bc5 to your computer and use it in GitHub Desktop.
Jenkins Security Group
#Jenkins security group parameters
resource "aws_security_group" "jenkins_sg" {
name = "jenkins_sg"
description = "Allow Jenkins Server Traffic"
ingress {
description = "Allow SSH access from My Personal Computer"
from_port = 22
to_port = 22
protocol = "tcp"
cidr_blocks = ["0.0.0.0/0"]
}
ingress {
description = "Allow secure access to the Jenkins Server"
from_port = 443
to_port = 443
protocol = "tcp"
cidr_blocks = ["0.0.0.0/0"]
}
ingress {
description = "Allow access for the Jenkins Server"
from_port = 8080
to_port = 8080
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"]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment