Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- variable "frontend_ports"
- type = list
- default = [22,80,443]
- }
- resource "aws_security_group_rule" "example" {
- count = length(var.frontend_ports)
- type = "ingress"
- from_port = var.frontend_ports[count.index]
- to_port = var.frontedn_ports[count.index]
- protocol = "tcp"
- cidr_blocks = ["0.0.0.0/0"]
- ipv6_cidr_blocks = ["::/0"]
- security_group_id = "sg-123456"
- }
Advertisement
Add Comment
Please, Sign In to add comment