hashicorp / terraform-aws-consul

A Terraform Module for how to run Consul on AWS using Terraform and Packer
Apache License 2.0
401 stars 488 forks source link

allow_https_api_inbound errors when no cidr ranges specified #219

Closed mr-miles closed 3 years ago

mr-miles commented 3 years ago

Received an error using the module in our terraform:

Error: One of ['cidr_blocks', 'ipv6_cidr_blocks', 'self', 'source_security_group_id', 'prefix_list_ids'] must be set to create an AWS Security Group Rule Error on .terraform/modules/consul_servers/modules/consul-security-group-rules/main.tf line 70, in resource "aws_security_group_rule" "allow_https_api_inbound": Error: resource "aws_security_group_rule" "allow_https_api_inbound" {

If the module is given only security groups and not cidr ranges, a security group rule is created without all the necessary attributes. Change applies the right boolean logic for this case.

mr-miles commented 3 years ago

See #218