Skip to content

Latest commit

 

History

History
35 lines (24 loc) · 691 Bytes

aws_security_group_invalid_protocol.md

File metadata and controls

35 lines (24 loc) · 691 Bytes

aws_security_group_invalid_protocol

Disallow using invalid protocol.

Example

resource "aws_security_group" "sample" {
  description = "test security group"

  ingress {
    from_port = 443
    to_port   = 443
    protocol  = "https"
  }
}
$ tflint
1 issue(s) found:

Error: "https" is an invalid protocol. It allows "tcp", "udp" or "-1"(all). (aws_security_group_invalid_protocol)

  on terraform.tf line 7:
   7:     protocol  = "https"

Why

Apply will fail. (Plan will succeed with the invalid value though)

How To Fix

Select valid protocol according to the document