hashicorp / terraform-aws-consul

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

Add --recursor option for run-consul script #137

Closed adriananeci closed 5 years ago

adriananeci commented 5 years ago

In order to be able to add recursors servers to consul config (https://www.consul.io/docs/agent/options.html#recursors) a new parameter needs to be added to run-consul script. It is useful when you also install dnsmasq and want to recursively resolve queries that are not inside the consul service domain. Another example could be if you want to access a private EKS API endpoint from an on-premise network connected through AWS Direct Connect (DX) or a virtual private network (VPN) to EKS VPC.

brikis98 commented 5 years ago

@Etiene Could you review this one?

Etiene commented 5 years ago

Thanks for the PR! I'm going to kickoff our current automated tests, but how did you test this?

adriananeci commented 5 years ago

@Etiene It was manually tested, didn't write any unit tests.

adriananeci commented 5 years ago

Seems to be a routing issue based on the tests output:

TestConsulClusterWithAmazonLinuxAmi 2019-05-22T11:41:48Z retry.go:75: Check Consul members returned an error: Get http://15.164.93.172:8500/v1/agent/members: dial tcp 15.164.93.172:8500: getsockopt: no route to host. Sleeping for 10s and will try again.

Etiene commented 5 years ago

Could you please rebase your PR now that a fix has been issued?

Etiene commented 5 years ago

Thank you! :)