ingress_rules

Type list(object({ from_port = number to_port = number protocol = string cidr_blocks = optional(list(string), []) description = optional(string, "") }))
Default null

List of ingress rules

Ingress Rule Structure

ingress_rules = [
  {
    from_port   = 443
    to_port     = 443
    protocol    = "tcp"
    cidr_blocks = ["0.0.0.0/0"]
  }
]

Best Practices

  • Follow principle of least privilege
  • Use security group references where possible
  • Document the purpose of each rule

Full Module Example

module "security_group" {
  source  = "registry.patterneddesigns.ca/patterneddesigns/security-group/aws"
  version = "0.1.0"

  # ingress_rules
  ingress_rules = "..."

  # Other required inputs
  name = "..."
  vpc_id = "..."
}