chrisluiz16

Untitled

May 15th, 2023
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.42 KB | None | 0 0
  1. variable "frontend_ports"
  2. type = list
  3. default = [22,80,443]
  4. }
  5.  
  6.  
  7. resource "aws_security_group_rule" "example" {
  8.   count = length(var.frontend_ports)
  9.   type              = "ingress"
  10.   from_port         = var.frontend_ports[count.index]
  11.   to_port           = var.frontedn_ports[count.index]
  12.   protocol          = "tcp"
  13.   cidr_blocks       = ["0.0.0.0/0"]
  14.   ipv6_cidr_blocks  = ["::/0"]
  15.   security_group_id = "sg-123456"
  16. }
Advertisement
Add Comment
Please, Sign In to add comment