Difference between revisions of "Terraform resource: aws security group"
Jump to navigation
Jump to search
Line 8: | Line 8: | ||
[[vpc_id]] = aws_vpc.main.id | [[vpc_id]] = aws_vpc.main.id | ||
− | ingress { | + | [[ingress]] { |
description = "TLS from VPC" | description = "TLS from VPC" | ||
from_port = 443 | from_port = 443 | ||
Line 17: | Line 17: | ||
} | } | ||
− | egress { | + | [[egress]] { |
from_port = 0 | from_port = 0 | ||
to_port = 0 | to_port = 0 |
Revision as of 11:41, 31 January 2023
resource "aws_security_group" "allow_tls" { name = "allow_tls" description = "Allow TLS inbound traffic" vpc_id = aws_vpc.main.id ingress { description = "TLS from VPC" from_port = 443 to_port = 443 protocol = "tcp" cidr_blocks = [aws_vpc.main.cidr_block] ipv6_cidr_blocks = [aws_vpc.main.ipv6_cidr_block] } egress { from_port = 0 to_port = 0 protocol = "-1" cidr_blocks = ["0.0.0.0/0"] ipv6_cidr_blocks = ["::/0"] } tags = { Name = "allow_tls" } }
Related terms
- Terraform resource:
aws_security_group_rule
- Security group
vpc_id
security_groups
See also
Advertising: