Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

resource/vpc_dhcp_options: Updated documentation about how to maintain default AWS DNS servers #2033

Merged
merged 1 commit into from
Oct 25, 2017

Conversation

alex1x
Copy link
Contributor

@alex1x alex1x commented Oct 24, 2017

…ult AWS DNS

Fixes #2031

@@ -41,7 +41,7 @@ resource "aws_vpc_dhcp_options" "foo" {
The following arguments are supported:

* `domain_name` - (Optional) the suffix domain name to use by default when resolving non Fully Qualified Domain Names. In other words, this is what ends up being the `search` value in the `/etc/resolv.conf` file.
* `domain_name_servers` - (Optional) List of name servers to configure in `/etc/resolv.conf`.
* `domain_name_servers` - (Optional) List of name servers to configure in `/etc/resolv.conf`. Note that if you leave this empty, DNS resolution will break. If you want to use the default AWS nameservers you should set this to `AmazonProvidedDNS`.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we change this to a more positive message, just keeping the second sentence?

Also, if this is empty, is the DNS resolution really broken or just non-functional?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure- made the requested change. As mentioned in #2031 it breaks in the sense that your instances are provisioned without nameservers so it doesn't work. If you manually set them to use nameservers after the fact then they will work, but by default your DNS won't work.

Copy link
Contributor

@Ninir Ninir Oct 25, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Understood, thanks for the explanation!

So: reachable by API but not by DNS name, that's right?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

More specifically: if you attempt to do something like ping my-instance.example.com you will get "Unable to resolve". Then you would look at /etc/resolv.conf and you would need to add the default AWS NS to it, for example: nameserver 10.0.150.2 (if you are on 10.0.150.0/24). Now DNS works.

By setting AmazonProvidedDNS in your terraform, you will not get this "Unable to resolve" error and you will not need to manually add the nameserver IP to your resolv.conf, it will already be there (AWS will figure out what the value needs to be depending on your VPC and pre-populate it for you, thus DNS works by default for each new instance).

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK so it's all ok then :) thank you @alex1x ! 🚀

@Ninir Ninir added documentation Introduces or discusses updates to documentation. waiting-response Maintainers are waiting on response from community or contributor. labels Oct 25, 2017
@Ninir Ninir changed the title Fix #2031 - DHCP Options Set docs should explain how to maintain defa… resource/vpc_dhcp_options: Updated documentation about how to maintain default AWS DNS servers Oct 25, 2017
@Ninir Ninir removed the waiting-response Maintainers are waiting on response from community or contributor. label Oct 25, 2017
@Ninir Ninir merged commit 1be222f into hashicorp:master Oct 25, 2017
@ghost
Copy link

ghost commented Apr 10, 2020

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thanks!

@ghost ghost locked and limited conversation to collaborators Apr 10, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
documentation Introduces or discusses updates to documentation.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Documentation: dhcp_options_set should explain how to maintain default AWS NS
2 participants