Terraform: Define AWS Security Group for All ICMP Traffic

Tags: September 4, 2020 8:41 PM
0 comments

Define AWS Security Group for All ICMP Traffic in Terraform

It is not quite well documented in Terraform what "from" and "to" port number that need to define to allow All ICMP traffic. If you're having hard time trying to figure out here is the solution to All ICMP traffic in Security Group.
...
ingress {
  ...
  from_port   = -1
  to_port     = -1
  protocol    = "icmp"
  ...
}
...
That's it. The special number "-1" did the trick.

Share on Facebook Twitter