Created
May 3, 2023 01:31
-
-
Save hendrixroa/1733d7e8a76f808d6d02f34ecf1d6cdd to your computer and use it in GitHub Desktop.
AWS EC2 Security group using custom VPC
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" "sample" { | |
name = "sample" | |
description = "security group" | |
vpc_id = module.vpc.vpc_id | |
ingress { | |
from_port = 0 | |
to_port = 0 | |
protocol = "-1" | |
cidr_blocks = ["0.0.0.0/0"] | |
} | |
ingress { | |
from_port = 0 | |
to_port = 0 | |
protocol = "-1" | |
ipv6_cidr_blocks = ["::/0"] | |
} | |
egress { | |
from_port = 0 | |
to_port = 0 | |
protocol = "-1" | |
cidr_blocks = ["0.0.0.0/0"] | |
} | |
egress { | |
from_port = 0 | |
to_port = 0 | |
protocol = "-1" | |
ipv6_cidr_blocks = ["::/0"] | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment