Difference between revisions of "Terraform resource: aws security group rule"
Jump to navigation
Jump to search
Line 5: | Line 5: | ||
[[protocol]] (required): <code>icmp, icmpv6, tcp, udp, or all (or protocol = -1)</code> | [[protocol]] (required): <code>icmp, icmpv6, tcp, udp, or all (or protocol = -1)</code> | ||
+ | [[terraform import]] aws_ecs_service.imported cluster-name/service-name | ||
− | [[ | + | == Official example == |
+ | resource "aws_security_group_rule" "example" { | ||
+ | type = "ingress" | ||
+ | from_port = 0 | ||
+ | to_port = 65535 | ||
+ | protocol = "tcp" | ||
+ | [[cidr_blocks]] = [aws_vpc.example.cidr_block] | ||
+ | ipv6_cidr_blocks = [aws_vpc.example.ipv6_cidr_block] | ||
+ | security_group_id = "sg-123456" | ||
+ | } | ||
== Related == | == Related == |
Revision as of 14:08, 29 May 2023
aws_security_group_rule (ref)
from_port
to_port
protocol (required): icmp, icmpv6, tcp, udp, or all (or protocol = -1)
terraform import aws_ecs_service.imported cluster-name/service-name
Official example
resource "aws_security_group_rule" "example" { type = "ingress" from_port = 0 to_port = 65535 protocol = "tcp" cidr_blocks = [aws_vpc.example.cidr_block] ipv6_cidr_blocks = [aws_vpc.example.ipv6_cidr_block] security_group_id = "sg-123456" }
Related
- Security groups for your Network Load Balancer (NLB)
ingress, egress
aws ec2 authorize-security-group-ingress
aws_security_group
data.aws_subnet.all_public
- cidr_blocks
- Tags
See also
Advertising: