terraform-provider-tailscale icon indicating copy to clipboard operation
terraform-provider-tailscale copied to clipboard

Split DNS support

Open davidnortonjr opened this issue 2 years ago • 7 comments

Is your feature request related to a problem? Please describe.

I need to be able to set up a Restricted Nameserver or Split DNS for a particular domain

Describe the solution you'd like

Something like the following

resource "tailscale_dns_restricted_nameserver" "example_com" {
  search_domain = "example.com"
  nameserver = ["1.2.3.4"]
}

Context

DNS in Tailscale docs

davidnortonjr avatar Aug 31 '22 23:08 davidnortonjr

There is not yet a public API to set Split DNS nameservers: https://github.com/tailscale/tailscale/blob/main/api.md#tailnet-dns-nameservers-post

The public API was blocked by the need to remove the use of fallback resolvers: https://github.com/tailscale/tailscale/issues/1743 A control server update to remove fallback resolvers deployed one week ago.

After the API is updated, the Terraform provider can be updated to add Split DNS support.

DentonGentry avatar Aug 31 '22 23:08 DentonGentry

Is there any update on this?

anhdle14 avatar Oct 21 '22 07:10 anhdle14

There is not yet a public API to set Split DNS nameservers. A feature request to do so is tracked in https://github.com/tailscale/tailscale/issues/5932

DentonGentry avatar Oct 21 '22 21:10 DentonGentry

Hey! Would love to see this feature implemented! I see that the issue https://github.com/tailscale/tailscale/issues/5932 is closed. Are there any estimations about tf provider update?

gberenice avatar Feb 16 '23 14:02 gberenice

https://github.com/tailscale/tailscale/issues/5932 was closed as a duplicate of https://github.com/tailscale/tailscale/issues/2661, which is still open. There is not currently a public API to set Split DNS nameservers.

DentonGentry avatar Feb 16 '23 14:02 DentonGentry

@DentonGentry ah, you're right. Thanks, looking forward to further updates.

gberenice avatar Feb 16 '23 14:02 gberenice

Any updates? Would be awesome to not have to set these by hand 😁 Thanks

mrgasparov avatar May 25 '23 13:05 mrgasparov

Looks like we finally got a PR: https://github.com/tailscale/terraform-provider-tailscale/pull/359

aiell0 avatar Apr 30 '24 02:04 aiell0

This is resolved as of #359 . A new tailscale_dns_split_nameservers resource has been added as of the v0.16.0 release.

mpminardi avatar Apr 30 '24 17:04 mpminardi