We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 68d19d3 + 10fad78 commit 8cd4ca1Copy full SHA for 8cd4ca1
security_group.tf
@@ -11,6 +11,7 @@ resource "aws_security_group" "default" {
11
}
12
13
resource "aws_security_group_rule" "egress" {
14
+ count = "${var.create_default_security_group == "true" ? 1 : 0}"
15
type = "egress"
16
from_port = 0
17
to_port = 65535
@@ -20,7 +21,7 @@ resource "aws_security_group_rule" "egress" {
20
21
22
23
resource "aws_security_group_rule" "ingress" {
- count = "${length(compact(var.allowed_ports))}"
24
+ count = "${var.create_default_security_group == "true" ? length(compact(var.allowed_ports)) : 0}"
25
type = "ingress"
26
from_port = "${element(var.allowed_ports, count.index)}"
27
to_port = "${element(var.allowed_ports, count.index)}"
0 commit comments