Skip to content
This repository has been archived by the owner on Jan 25, 2023. It is now read-only.

Commit

Permalink
Set up http_api access correctly
Browse files Browse the repository at this point in the history
If the module is given only security groups and not cidr ranges, a security group rule is created without all the necessary attributes
  • Loading branch information
mr-miles authored Apr 27, 2021
1 parent 1a441ac commit a2cb3e9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion modules/consul-security-group-rules/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ resource "aws_security_group_rule" "allow_http_api_inbound" {
}

resource "aws_security_group_rule" "allow_https_api_inbound" {
count = var.enable_https_port ? 1 : 0
count = var.enable_https_port && length(var.allowed_inbound_cidr_blocks) >= 1 ? 1 : 0
type = "ingress"
from_port = var.https_api_port
to_port = var.https_api_port
Expand Down

0 comments on commit a2cb3e9

Please sign in to comment.