Giter Site home page Giter Site logo

hashicorp / terraform-provider-dns Goto Github PK

View Code? Open in Web Editor NEW
107.0 19.0 70.0 11.94 MB

Utility provider that supports DNS updates (RFC 2136) and can optionally be configured with secret key based transaction authentication (RFC 2845).

Home Page: https://registry.terraform.io/providers/hashicorp/dns/latest

License: Mozilla Public License 2.0

Makefile 0.17% Go 97.15% Shell 2.32% HCL 0.35%
terraform terraform-provider dns

terraform-provider-dns's Introduction

Terraform Provider: DNS

The DNS provider supports resources that perform DNS updates (RFC 2136) and data sources for reading DNS information. The provider can be configured with secret key based transaction authentication (RFC 2845) or GSS-TSIG (RFC 3645).

Requirements

Documentation, questions and discussions

Official documentation on how to use this provider can be found on the Terraform Registry. In case of specific questions or discussions, please use the HashiCorp Terraform Providers Discuss forums, in accordance with HashiCorp Community Guidelines.

We also provide:

  • Support page for help when using the provider
  • Contributing guidelines in case you want to help this project

Compatibility

Compatibility table between this provider, the Terraform Plugin Protocol version it implements, and Terraform:

DNS Provider Terraform Plugin Protocol Terraform
>= 3.0.x 5 >= 0.12
>= 2.1.x 4 and 5 >= 0.12
<= 2.x.x 4 <= 0.12

Details can be found querying the Registry API that return all the details about which version are currently available for a particular provider. Here are the details for DNS (JSON response).

Development

Building

  1. git clone this repository and cd into its directory
  2. make will trigger the Golang build

The provided GNUmakefile defines additional commands generally useful during development, like for running tests, generating documentation, code formatting and linting. Taking a look at it's content is recommended.

Testing

In order to test the provider, you can run

  • make test to run provider tests
  • make testacc to run provider acceptance tests (excluding ones requiring a DNS_UPDATE_SERVER)
  • ./internal/provider/acceptance.sh to run the full suite of acceptance tests

Running acceptance.sh has the following prerequisites:

macOS Setup

echo "127.0.0.1 ns.example.com" | sudo tee -a /etc/hosts

Ubuntu Setup

echo "127.0.0.1 ns.example.com" | sudo tee -a /etc/hosts
sudo apt-get install krb5-user make
# If prompted for Kerberos configuration:
# Default Realm: EXAMPLE.COM
# Server: ns.example.com
# Administrative Server: ns.example.com

It's important to note that acceptance tests (testacc) will actually spawn terraform and the provider. Read more about they work on the official page.

Generating documentation

This provider uses terraform-plugin-docs to generate documentation and store it in the docs/ directory. Once a release is cut, the Terraform Registry will download the documentation from docs/ and associate it with the release version. Read more about how this works on the official page.

Use make generate to ensure the documentation is regenerated with any changes.

Using a development build

If running tests and acceptance tests isn't enough, it's possible to set up a local terraform configuration to use a development builds of the provider. This can be achieved by leveraging the Terraform CLI configuration file development overrides.

First, use make install to place a fresh development build of the provider in your ${GOBIN} (defaults to ${GOPATH}/bin or ${HOME}/go/bin if ${GOPATH} is not set). Repeat this every time you make changes to the provider locally.

Then, setup your environment following these instructions to make your local terraform use your local build.

Testing GitHub Actions

This project uses GitHub Actions to realize its CI.

Sometimes it might be helpful to locally reproduce the behaviour of those actions, and for this we use act. Once installed, you can simulate the actions executed when opening a PR with:

# List of workflows for the 'pull_request' action
$ act -l pull_request

# Execute the workflows associated with the `pull_request' action 
$ act pull_request

Releasing

The release process is automated via GitHub Actions, and it's defined in the Workflow release.yml.

Each release is cut by pushing a semantically versioned tag to the default branch.

License

Mozilla Public License v2.0

terraform-provider-dns's People

Contributors

apparentlymart avatar appilon avatar austinvalle avatar bendbennett avatar bflad avatar bodgit avatar bookshelfdave avatar catsby avatar dependabot[bot] avatar drebes avatar faultymonk avatar favoretti avatar flosell avatar grubernaut avatar hashicorp-tsccr[bot] avatar hc-github-team-tf-provider-devex avatar jbardin avatar katbyte avatar kmoe avatar liebman avatar mildwonkey avatar radeksimko avatar sbfaulkner avatar sbgoods avatar sergei-ivanov avatar sethvargo avatar someara avatar stack72 avatar team-tf-cdk avatar tombuildsstuff avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

terraform-provider-dns's Issues

terraform segaults when creating a dns_a_record_set resource

Hi there,

Terraform Version

Terraform v0.11.7
+ provider.dns v1.0.0

I've also tried it with versions:

  • Terraform v0.10.8 &
  • Terraform v0.11.3
    + provider.dns v1.0.0

Affected Resource(s)

Please list the resources as a list, for example:

  • dns_a_record_set

Terraform Configuration Files

provider "dns" {
  update {
    server =      "192.168.8.184"
    key_name      = "terraform"
    key_algorithm = "hmac-sha256"
    /* key_secret    = "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" */
  }
}

resource "dns_a_record_set" "test" {
  zone = "int.filterfish.org."
  name = "test."
  addresses = [
    "192.168.8.166"
  ]
}

Debug Output

https://gist.github.com/filterfish/aa974a8579213ca184249df5bea2f698

Panic Output

https://gist.github.com/filterfish/aa362f434b1626d3b8b934d909a43837

Expected Behaviour

  1. It should not segfault,
  2. It should have created a DNS A record.

Actual Behavior

  1. It segfaulted,
  2. It didn't create a DNS A record.

Steps to Reproduce

  1. terraform apply

The DNS server is setup properly and I can use nsupdate to create a record

resource_dns_mx_record_set.go:resourceDnsMXRecordSetHash panics with apply-time string interpolation

Terraform Version

Terraform v0.12.0-beta1

  • provider.dns v2.1.1

Affected Resource(s)

  • dns_mx_record_set

Terraform Configuration Files

provider "dns" {
  update {
    server    = "127.0.0.1" # nothing running there
  }
}

resource "dns_mx_record_set" "mx" {
  zone = "example.com."

  dynamic "mx" {
    for_each = split(" ", "1 ${dns_mx_record_set.mx.id}")
    content {
      preference = tonumber(mx.value)
      exchange   = "foo${mx.value}.example.com."
    }
  }
}

With the self-referencing for_each statement, I force the evaluation of the preference and exchange to apply-time. There resourceDnsMXRecordSetHash() crashes because it gets passed a nil.

Output

$ terraform apply

An execution plan has been generated and is shown below.
Resource actions are indicated with the following symbols:
  + create

Terraform will perform the following actions:

  # dns_mx_record_set.mx will be created
  + resource "dns_mx_record_set" "mx" {
      + id   = (known after apply)
      + ttl  = 3600
      + zone = "example.com."

      + mx {
          + exchange   = (known after apply)
          + preference = (known after apply)
        }
    }

Plan: 1 to add, 0 to change, 0 to destroy.

Do you want to perform these actions?
  Terraform will perform the actions described above.
  Only 'yes' will be accepted to approve.

  Enter a value: yes

dns_mx_record_set.mx: Creating...

Error: rpc error: code = Unavailable desc = transport is closing


panic: interface conversion: interface {} is nil, not map[string]interface {}
2019-05-06T12:30:50.275Z [DEBUG] plugin.terraform-provider-dns_v2.1.1_x4: 
2019-05-06T12:30:50.275Z [DEBUG] plugin.terraform-provider-dns_v2.1.1_x4: goroutine 22 [running]:
2019-05-06T12:30:50.275Z [DEBUG] plugin.terraform-provider-dns_v2.1.1_x4: github.com/terraform-providers/terraform-provider-dns/dns.resourceDnsMXRecordSetHash(0x0, 0x0, 0x1)
2019-05-06T12:30:50.275Z [DEBUG] plugin.terraform-provider-dns_v2.1.1_x4: 	/opt/teamcity-agent/work/5d79fe75d4460a2f/src/github.com/terraform-providers/terraform-provider-dns/dns/resource_dns_mx_record_set.go:162 +0x312
2019-05-06T12:30:50.275Z [DEBUG] plugin.terraform-provider-dns_v2.1.1_x4: github.com/terraform-providers/terraform-provider-dns/vendor/github.com/hashicorp/terraform/helper/schema.(*Set).hash(0xc0002559e0, 0x0, 0x0, 0x3, 0xc0000f7600)
...

Panic Output

crash.log: https://gist.github.com/diekmann/fc2ef2bf41ac3bd0524b2a8075ae5124

Expected Behavior

Not sure, but no crash :-)

Actual Behavior

Crash

Steps to Reproduce

  1. terraform apply

Error querying DNS record: read udp 192.168.224.6:53122->10.224.0.250:53: i/o timeout

Hi there,

Thank you for opening an issue. Please note that we try to keep the Terraform issue tracker reserved for bug reports and feature requests. For general usage questions, please see: https://www.terraform.io/community.html.

Terraform Version

Terraform v0.11.8

  • provider.archive v1.1.0
  • provider.aws v1.33.0
  • provider.dns v2.0.0
  • provider.null v1.0.0
  • provider.template v1.0.0
  • provider.tls v1.2.0

Affected Resource(s)

Please list the resources as a list, for example:

  • dns_cname_record
  • dns_ptr_record
  • dns_a_record_set

If this issue appears to affect multiple resources, it may be an issue with Terraform's core, so please mention this.

Terraform Configuration Files

Provider configuration

provider "dns" {
update {
server = "${var.dns_primary_server_private_ip}"
key_name = "${var.dns_key_name}"
key_algorithm = "${var.dns_key_algorithm}"
key_secret = "${var.dns_key_secret}"
}
}

Resources

resource "dns_ptr_record" "ssh_proxy" {
zone = "${format(
"%s.%s.in-addr.arpa.",
element(split(".", var.vpc_cidr), 1),
element(split(".", var.vpc_cidr), 0)
)}"
name = "${format(
"%s.%s",
element(split(".", aws_instance.ssh_proxy.private_ip), 3),
element(split(".", aws_instance.ssh_proxy.private_ip), 2)
)}"
ptr = "${format("%s.%s.%s.", "sshproxy", var.env, var.domain)}"
ttl = 3600
}

resource "dns_a_record_set" "mongo_slave" {
count = "${lookup(var.instances, "sns_db.nodes") - 1}"

zone = "${format("%s.%s.", var.env, var.domain)}"
name = "${format("%s%s", "snsdb", var.ordinal[count.index + 1])}"
addresses = [
"${aws_instance.mongo_slave.*.private_ip[count.index]}"
]
ttl = 3600
}

Error Output

Error: Error refreshing state: 2 error(s) occurred:

  • dns_ptr_record.ssh_proxy: 1 error(s) occurred:

  • dns_ptr_record.ssh_proxy: dns_ptr_record.ssh_proxy: Error querying DNS record: read udp 192.168.224.6:47006->10.224.0.250:53: i/o timeout

  • dns_ptr_record.mongo_slave: 1 error(s) occurred:

  • dns_ptr_record.mongo_slave[0]: dns_ptr_record.mongo_slave.0: Error querying DNS record: read udp 192.168.224.6:53122->10.224.0.250:53: i/o timeout

Debug Output

https://gist.github.com/GuiuMateu/92c5c76387db08f77c88fd450604072b

Expected Behavior

I have many resources in AWS, many of them have entries in the DNS. When I execute terraform apply, before making the changes while terraform is performing the checks, the timeout error appears. This error happens very often and not always with the same resources.

The connection against the DNS server that is hosted in China (I am in Spain) is by VPN and it works correctly.

I have the same situation with AWS servers in Ireland, and it usually works fine, only once has the timeout error also returned.

Actual Behavior

I have tried 10 times and at 100% the error appears.

Steps to Reproduce

Please list the steps required to reproduce the issue, for example:

  1. terraform apply

Important Factoids

My DNS server is running in EC2 instance in Beijing AWS region. The connection between my machine and VPC is by OpenVPN running in other EC2 instance.

Optionally ignore DNS resolution errors in data sources

Terraform Version

Terraform v0.11.8

Affected Resource(s)

  • data.dns_a_record_set
  • data.dns_aaaa_record_set
  • data.dns_cname_record_set

Terraform Configuration Files

data "dns_a_record_set" "example" {
  host = "example.com"
}

resource "google_monitoring_alert_policy" "example" {
  count = "${length(data.dns_a_record_set.example.addrs) > 0 ? 1 : 0}"

# uptime checks configuration for example.com
}

Debug Output

N/A

Panic Output

N/A

Expected Behavior

We have most of GCP infrastructure managed by Terraform, but the DNS entries are managed manually on an external name server. I wanted to have some conditional logic in the Terraform plan to create resources that depended on a DNS entry only if that entry existed.

For example, I expected the plan to create a monitoring policy if the DNS entry was resolvable, and no policies if there's no such DNS entry.

Actual Behavior

DNS data source raises an error when there's no entry and the plan aborts.

Steps to Reproduce

terraform apply

Important Factoids

N/A

References

N/A

dns_a_record_set and dns_aaaa_record_set crashes

Terraform Version

  • Terraform v0.10.7
  • terraform-provider-dns 1.0.0

Affected Resource(s)

Please list the resources as a list, for example:

  • dns_a_record_set
  • dns_aaaa_record_set

Terraform Configuration Files

provider "dns" {
  update {
    server        = "85.119.83.73"
    key_name      = "wensicia-infra"
    key_algorithm = "hmac-sha256"
    key_secret    = "<redacted>"
  }
}

resource "dns_a_record_set" "test1" {
  zone = "arrakis.se."
  name = "test1.arrakis.se."
  addresses = [
    "127.0.0.1",
  ]
}

Debug Output

https://gist.github.com/andreaso/c5562dcb288de54de893ecb8430410c7

Panic Output

https://gist.github.com/andreaso/f248319babb6774ba98536dc7b7d5dc1

Expected Behavior

I expected an A record to be created.

Actual Behavior

Terraform crashed.

Steps to Reproduce

Please list the steps required to reproduce the issue, for example:

  1. terraform apply

Getting the same crash with dns_aaaa_record_set.

Specifying update server as IPv6 address

I'm trying to specify my target server for receiving DNS updates as an IPv6 address.

Terraform Version

0.10.2

Affected Resource(s)

This affects the whole DNS provider.

Terraform Configuration Files

provider "dns" {
  update {
    server        = "2001::dead:beef"
    key_name      = "keyname."
    key_algorithm = "hmac-sha512"
    key_secret    = "..."
  }

  version = "~> 0.1"
}

Expected Behavior

DNS updates should work, (once I worked out I needed to put trailing .'s on key and zone names!).

Actual Behavior

I get errors like the following:

Error updating DNS record: dial udp: address 2001::dead:beef:53: too many colons in address

Wrapping the IPv6 address with []'s so it's instead "[2001::dead:beef]" fixes it but I feel I shouldn't really have to do that in my Terraform manifest.

Steps to Reproduce

  1. terraform apply

Creating IP addresses that do not format the same when read back fails

The dns_a_record_set and dns_aaaa_record_set resources compare IP addresses as if they were strings. This fails if the IP address requested was not written in exactly the same form as the miekg/dns library uses when returning it as a string. This makes Terraform emit the the DNS record differs error message, and leave the record created but marked as broken.

The following configuration example illustrates the problem. You will have to edit in data for a domain where you have rights to do DNS UPDATE, since I don't really feel like giving out my own update key.

variable "dnsupdate_secret" {}

provider "dns" {
  update {
    server = "ns.example.org."
    key_name = "example.org."
    key_algorithm = "hmac-sha256"
    key_secret = "${var.dnsupdate_secret}"
  }
}

resource "dns_aaaa_record_set" "works" {
  zone = "example.org."
  name = "works"
  addresses = [ "::1" ]
}

resource "dns_a_record_set" "works" {
  zone = "example.org."
  name = "works"
  addresses = [ "127.0.0.1" ]
}

resource "dns_aaaa_record_set" "fails" {
  zone = "example.org."
  name = "fails"
  addresses = [ "::0001" ]
}

resource "dns_a_record_set" "fails" {
  zone = "example.org."
  name = "fails"
  addresses = [ "127.000.000.001" ]
}

Output from terraform -v:

Terraform v0.11.1
+ provider.dns v1.0.0

...but I can see in the code that the problem exists as of commit 9ece5b3. I'll see if I can produce a patch for this, but it seems like I'll have to spend quite a bit of time understanding the innards of Terraform before I can make a good one, so please don't wait with a fix because of that :-)

retry option for data sources

Hi all, I am posting here to gauge interest in a potential feature.

Our use case: We are creating a load balancer via k8s ingress controller, and need to use its a record set in the same module. The record takes time to propagate, which leads to an unresolved error.

I am thinking-- could we add an argument to the data source to retry the dns resolution over a specified period?

--Thanks for the response! ๐Ÿ˜„

Creating CNAME record returns error code 5

Terraform Version

**Terraform v0.11.7

  • provider.dns v2.0.0**

Affected Resource(s)

  • dns_cname_record

Terraform Configuration Files

resource "dns_a_record_set" "capacity_intake_pdb_dns" {
  addresses = ["${concat(oci_core_instance.db_lcs_instance_ad1.*.private_ip, oci_core_instance.db_lcs_instance_ad2.*.private_ip, oci_core_instance.db_lcs_instance_ad3.*.private_ip)}"]

  name      = "orapdb-capacity-intake-ocicorp"
  zone      = "us-ashburn-1.oci.oraclecorp.com."
  ttl       = 60
}

resource "dns_cname_record" "capacity_intake_pdb_dns_cname" {
  name = "orapdb-capacity-intake-ocicorp"
  zone = "oci.oraclecorp.com."
  cname = "orapdb-capacity-intake-db-ocicorp.us-ashburn-1.oci.oraclecorp.com."
  ttl = 300
}

When I try to run this above config, the A record is created successfully but the CNAME fails with an error code of 5:

* dns_cname_record.kiev_tanden_workflow_pdb_dns_cname: Error updating DNS record: 5
* module.us-ashburn-1.dns_cname_record.capacity_intake_pdb_dns_cname: 1 error(s) occurred:

* dns_cname_record.capacity_intake_pdb_dns_cname: Error updating DNS record: 5

Not sure what error code 5 means nor what action I can take to resolve this

Unexpected EOF while trying to create DNS record

Terraform Version

Terraform v0.11.1

Affected Resource(s)

  • dns_a_record_set

Terraform Configuration Files

Note: names and addresses have been changed in the code snippet below
The sku of the machine I'm trying to connect is 2012-R2-Datacenter-smalldisk

provider "dns" {
  update {
    server = "10.10.10.10"
  }
}

resource "dns_a_record_set" "test" {
  zone = "example.com."
  name = "www."
  addresses = [
    "10.10.10.11",
  ]
}

Debug Output

2018/01/09 10:48:15 [DEBUG] apply: dns_a_record_set.test: executing Apply
2018-01-09T10:48:15.285Z [DEBUG] plugin.terraform-provider-dns_v1.0.0_x4: panic: runtime error: invalid memory address or nil pointer dereference
2018-01-09T10:48:15.285Z [DEBUG] plugin.terraform-provider-dns_v1.0.0_x4: [signal SIGSEGV: segmentation violation code=0x1 addr=0x20 pc=0x9dd9c3]
2018-01-09T10:48:15.286Z [DEBUG] plugin.terraform-provider-dns_v1.0.0_x4: 
2018-01-09T10:48:15.286Z [DEBUG] plugin.terraform-provider-dns_v1.0.0_x4: goroutine 55 [running]:
2018-01-09T10:48:15.286Z [DEBUG] plugin.terraform-provider-dns_v1.0.0_x4: github.com/terraform-providers/terraform-provider-dns/vendor/github.com/miekg/dns.(*Msg).Insert(0xc4202d7850, 0xc4202d7718, 0x1, 0x1)
2018-01-09T10:48:15.286Z [DEBUG] plugin.terraform-provider-dns_v1.0.0_x4: 	/opt/teamcity-agent/work/222ea50a1b4f75f4/src/github.com/terraform-providers/terraform-provider-dns/vendor/github.com/miekg/dns/update.go:71 +0xa3
2018-01-09T10:48:15.286Z [DEBUG] plugin.terraform-provider-dns_v1.0.0_x4: github.com/terraform-providers/terraform-provider-dns/dns.resourceDnsARecordSetUpdate(0xc420231960, 0xa9e020, 0xc420071360, 0x2, 0x2)
2018-01-09T10:48:15.286Z [DEBUG] plugin.terraform-provider-dns_v1.0.0_x4: 	/opt/teamcity-agent/work/222ea50a1b4f75f4/src/github.com/terraform-providers/terraform-provider-dns/dns/resource_dns_a_record_set.go:144 +0x89e
2018-01-09T10:48:15.286Z [DEBUG] plugin.terraform-provider-dns_v1.0.0_x4: github.com/terraform-providers/terraform-provider-dns/dns.resourceDnsARecordSetCreate(0xc420231960, 0xa9e020, 0xc420071360, 0x24, 0x1051b40)
2018-01-09T10:48:15.286Z [DEBUG] plugin.terraform-provider-dns_v1.0.0_x4: 	/opt/teamcity-agent/work/222ea50a1b4f75f4/src/github.com/terraform-providers/terraform-provider-dns/dns/resource_dns_a_record_set.go:58 +0x2f7
2018-01-09T10:48:15.286Z [DEBUG] plugin.terraform-provider-dns_v1.0.0_x4: github.com/terraform-providers/terraform-provider-dns/vendor/github.com/hashicorp/terraform/helper/schema.(*Resource).Apply(0xc4202a33e0, 0xc4201110e0, 0xc42034a1a0, 0xa9e020, 0xc420071360, 0x1, 0xc42034c030, 0xc420280db0)
2018-01-09T10:48:15.286Z [DEBUG] plugin.terraform-provider-dns_v1.0.0_x4: 	/opt/teamcity-agent/work/222ea50a1b4f75f4/src/github.com/terraform-providers/terraform-provider-dns/vendor/github.com/hashicorp/terraform/helper/schema/resource.go:193 +0x3b6
2018-01-09T10:48:15.286Z [DEBUG] plugin.terraform-provider-dns_v1.0.0_x4: github.com/terraform-providers/terraform-provider-dns/vendor/github.com/hashicorp/terraform/helper/schema.(*Provider).Apply(0xc420231500, 0xc420111090, 0xc4201110e0, 0xc42034a1a0, 0x7f93826c06c8, 0x0, 0x18)
2018-01-09T10:48:15.286Z [DEBUG] plugin.terraform-provider-dns_v1.0.0_x4: 	/opt/teamcity-agent/work/222ea50a1b4f75f4/src/github.com/terraform-providers/terraform-provider-dns/vendor/github.com/hashicorp/terraform/helper/schema/provider.go:259 +0xa4
2018-01-09T10:48:15.286Z [DEBUG] plugin.terraform-provider-dns_v1.0.0_x4: github.com/terraform-providers/terraform-provider-dns/vendor/github.com/hashicorp/terraform/plugin.(*ResourceProviderServer).Apply(0xc4202e9960, 0xc4202e9d80, 0xc420320b10, 0x0, 0x0)
2018-01-09T10:48:15.286Z [DEBUG] plugin.terraform-provider-dns_v1.0.0_x4: 	/opt/teamcity-agent/work/222ea50a1b4f75f4/src/github.com/terraform-providers/terraform-provider-dns/vendor/github.com/hashicorp/terraform/plugin/resource_provider.go:488 +0x57
2018-01-09T10:48:15.286Z [DEBUG] plugin.terraform-provider-dns_v1.0.0_x4: reflect.Value.call(0xc420130f00, 0xc420118be0, 0x13, 0xbc8b80, 0x4, 0xc420041f20, 0x3, 0x3, 0xc4200266e8, 0xc4200829c8, ...)
2018-01-09T10:48:15.286Z [DEBUG] plugin.terraform-provider-dns_v1.0.0_x4: 	/usr/local/go/src/reflect/value.go:434 +0x906
2018-01-09T10:48:15.286Z [DEBUG] plugin.terraform-provider-dns_v1.0.0_x4: reflect.Value.Call(0xc420130f00, 0xc420118be0, 0x13, 0xc420026720, 0x3, 0x3, 0xc400000005, 0x0, 0x0)
2018-01-09T10:48:15.286Z [DEBUG] plugin.terraform-provider-dns_v1.0.0_x4: 	/usr/local/go/src/reflect/value.go:302 +0xa4
2018-01-09T10:48:15.286Z [DEBUG] plugin.terraform-provider-dns_v1.0.0_x4: net/rpc.(*service).call(0xc42031c540, 0xc420110ff0, 0xc42011bb78, 0xc420129e80, 0xc4203232c0, 0xaa02a0, 0xc4202e9d80, 0x16, 0xaa02e0, 0xc420320b10, ...)
2018-01-09T10:48:15.286Z [DEBUG] plugin.terraform-provider-dns_v1.0.0_x4: 	/usr/local/go/src/net/rpc/server.go:381 +0x142
2018-01-09T10:48:15.286Z [DEBUG] plugin.terraform-provider-dns_v1.0.0_x4: created by net/rpc.(*Server).ServeCodec
2018-01-09T10:48:15.286Z [DEBUG] plugin.terraform-provider-dns_v1.0.0_x4: 	/usr/local/go/src/net/rpc/server.go:475 +0x36b
2018-01-09T10:48:15.286Z [DEBUG] plugin: plugin process exited: path=/home/qurrent/azureinfrastructure/azureinfrastructure/global/terraform-modules/test/.terraform/plugins/linux_amd64/terraform-provider-dns_v1.0.0_x4
2018/01/09 10:48:15 [TRACE] root: eval: *terraform.EvalWriteState
2018/01/09 10:48:15 [TRACE] root: eval: *terraform.EvalApplyProvisioners
2018/01/09 10:48:15 [TRACE] root: eval: *terraform.EvalIf
2018/01/09 10:48:15 [TRACE] root: eval: *terraform.EvalWriteState
2018/01/09 10:48:15 [TRACE] root: eval: *terraform.EvalWriteDiff
2018/01/09 10:48:15 [TRACE] root: eval: *terraform.EvalApplyPost
2018/01/09 10:48:15 [ERROR] root: eval: *terraform.EvalApplyPost, err: 1 error(s) occurred:

* dns_a_record_set.test: unexpected EOF
2018/01/09 10:48:15 [ERROR] root: eval: *terraform.EvalSequence, err: 1 error(s) occurred:

* dns_a_record_set.test: unexpected EOF
2018/01/09 10:48:15 [TRACE] [walkApply] Exiting eval tree: dns_a_record_set.test

full output at:
https://gist.github.com/SvenSchipper/1b247f0cf1d1bf7a961453a24c2a344d

Panic Output

full output at:
https://gist.github.com/SvenSchipper/0ffaab89f4386d8bc6e27a442a3e8fe8

Expected Behavior

An A type DNS record set will be created.

Actual Behavior

err: 1 error(s) occurred:

* dns_a_record_set.test: unexpected EOF

Steps to Reproduce

  1. terraform apply

Important Factoids

This is run in the Azure environment

Terraform doesn't query for AAAA records when assessing state

Terraform Version

0.10.2

Affected Resource(s)

Please list the resources as a list, for example:

  • dns_aaaa_record_set

Terraform Configuration Files

resource "dns_a_record_set" "test" {
  zone = "example.com."
  name = "test"

  addresses = [
    "${digitalocean_droplet.test.ipv4_address}",
  ]

  ttl = 3600
}

resource "dns_aaaa_record_set" "test" {
  zone = "example.com."
  name = "test"

  addresses = [
    "${digitalocean_droplet.test.ipv6_address}",
  ]

  ttl = 3600
}

Expected Behavior

Terraform should set both the A and AAAA records correctly.

Actual Behavior

Terraform tries to set the AAAA record on every apply as it never thinks it's set correctly. I get the following error:

Error applying plan:

1 error(s) occurred:

* dns_aaaa_record_set.test: 1 error(s) occurred:

* dns_aaaa_record_set.test: DNS record differs

If I turn on query logging on the target DNS server, I only ever see Terraform make a query for A records, never AAAA. i.e. on a plan:

Sep  6 22:51:15 server named[31352]: client 2001::feed:beef#52642 (test.example.com): query: test.example.com IN A + (2001::dead:beef)

And on an apply:

Sep  6 22:59:10 server named[31352]: client 2001::feed:beef#61142 (test.example.com): query: test.example.com IN A + (2001::dead:beef)
Sep  6 22:59:11 server named[31352]: client 2001::feed:beef#61144/key terraform.example.com: updating zone 'example.com/IN': adding an RR at 'test.example.com' AAAA
Sep  6 22:59:11 server named[31352]: client 2001::feed:beef#61146 (test.example.com): query: test.example.com IN AAAA + (2001::dead:beef)

If I check the zone then all of the correct records have been created, Terraform just doesn't think so.

Steps to Reproduce

  1. terraform apply

No IPv6 data returned from aaaa data source

Hi there,

Thank you for opening an issue. Please note that we try to keep the Terraform issue tracker reserved for bug reports and feature requests. For general usage questions, please see: https://www.terraform.io/community.html.

Terraform Version

PS C:\> terraform -v
Terraform v0.14.5
+ provider registry.terraform.io/hashicorp/dns v3.0.1

Affected Resource(s)

  • data.dns_aaaa_record_set

Terraform Configuration Files

terraform {
  required_providers {
    dns = {
      source = "hashicorp/dns"
      version = "3.0.1"
    }
  }
}

data "dns_a_record_set" "google" {
  host = "google.co.uk"
}

data "dns_aaaa_record_set" "google" {
  host = "google.co.uk"
}

output "google_ipv4" {
  value = data.dns_a_record_set.google.addrs
}

output "google_ipv6" {
  value = data.dns_aaaa_record_set.google.addrs
}

Expected Behavior

Two lists should be returned; one with the IPv4 address of google.co.uk and one with the IPv6 address.

Actual Behavior

Only the IPv4 address is returned, the IPv6 output is empty.

Changes to Outputs:
  + google_ipv4 = [
      + "172.217.169.3",
    ]
  + google_ipv6 = []

Google.co.uk does have an IPv6 address ๐Ÿ˜€

PS C:\> nslookup -type=aaaa google.co.uk
[snip]

Non-authoritative answer:
Name:    google.co.uk
Address:  2a00:1450:4009:81c::2003

Steps to Reproduce

  1. terraform plan or terraform apply with the above code.

Create permanent terraform.io TXT record for testing

TestAccDataDnsTxtRecordSet_Basic does a real-world check of the TXT records for the terraform.io domain, as pointed out in #106. This causes the test to fail whenever these change.

Add a permanent TXT record for testing this functionality, or perhaps use another domain where we have full control over the TXT records.

Terraform plan fails with Error: update server is not set

Terraform Version

Terraform v0.12.2
+ provider.azurerm v1.30.1
+ provider.dns v2.1.1

Affected Resource(s)

Please list the resources as a list, for example:

  • dns_cname_record

If this issue appears to affect multiple resources, it may be an issue with Terraform's core, so please mention this.

Terraform Configuration Files

I've tried to create record like:

resource "dns_cname_record" "foo" {
  zone  = "stage.example.com."
  name  = "foo"
  cname = "foo.uksouth.cloudapp.azure.com."
  ttl   = 300
}

But then I've found that I don't have proper domain root access for stage.example.com, so I've commented out DNS entries to remove them, however terraform plan command fails with:

Error: update server is not set

Debug Output

$ TF_LOG=trace terraform plan
...
2019/06/17 12:08:34 [TRACE] vertex "provider.dns": visit complete
2019/06/17 12:08:34 [TRACE] dag/walk: visiting "dns_cname_record.foo"
2019/06/17 12:08:34 [TRACE] dag/walk: visiting "dns_cname_record.bar"
2019/06/17 12:08:34 [TRACE] vertex "dns_cname_record.foo": starting visit (*terraform.NodeRefreshableManagedResourceInstance)
2019/06/17 12:08:34 [TRACE] vertex "dns_cname_record.bar": starting visit (*terraform.NodeRefreshableManagedResourceInstance)
2019/06/17 12:08:34 [TRACE] NodeRefreshableManagedResourceInstance: dns_cname_record.foo will be refreshed
2019/06/17 12:08:34 [TRACE] vertex "dns_cname_record.foo": evaluating
2019/06/17 12:08:34 [TRACE] [walkRefresh] Entering eval tree: dns_cname_record.foo
2019/06/17 12:08:34 [TRACE] <root>: eval: *terraform.EvalSequence
2019/06/17 12:08:34 [TRACE] <root>: eval: *terraform.EvalGetProvider
2019/06/17 12:08:34 [TRACE] NodeRefreshableManagedResourceInstance: dns_cname_record.bar will be refreshed
2019/06/17 12:08:34 [TRACE] vertex "dns_cname_record.bar": evaluating
2019/06/17 12:08:34 [TRACE] [walkRefresh] Entering eval tree: dns_cname_record.bar
2019/06/17 12:08:34 [TRACE] <root>: eval: *terraform.EvalSequence
2019/06/17 12:08:34 [TRACE] <root>: eval: *terraform.EvalGetProvider
2019/06/17 12:08:34 [TRACE] <root>: eval: *terraform.EvalReadState
2019/06/17 12:08:34 [TRACE] EvalReadState: reading state for dns_cname_record.bar
2019/06/17 12:08:34 [TRACE] <root>: eval: *terraform.EvalReadState
2019/06/17 12:08:34 [TRACE] UpgradeResourceState: schema version of dns_cname_record.bar is still 0; calling provider "dns" for any o
ther minor fixups
2019/06/17 12:08:34 [TRACE] GRPCProvider: UpgradeResourceState
2019/06/17 12:08:34 [TRACE] EvalReadState: reading state for dns_cname_record.foo
2019/06/17 12:08:34 [TRACE] UpgradeResourceState: schema version of dns_cname_record.foo is still 0; calling provider "dns" for any 
other minor fixups
2019/06/17 12:08:34 [TRACE] GRPCProvider: UpgradeResourceState
2019/06/17 12:08:34 [TRACE] <root>: eval: *terraform.EvalRefresh
2019/06/17 12:08:34 [TRACE] <root>: eval: *terraform.EvalRefresh
2019/06/17 12:08:34 [TRACE] GRPCProvider: ReadResource
2019/06/17 12:08:34 [TRACE] GRPCProvider: ReadResource
dns_cname_record.foo: Refreshing state... [id=foo.example.com.]
dns_cname_record.bar: Refreshing state... [id=bar.example.com.]
2019/06/17 12:08:34 [ERROR] <root>: eval: *terraform.EvalRefresh, err: update server is not set
2019/06/17 12:08:34 [ERROR] <root>: eval: *terraform.EvalRefresh, err: update server is not set
2019/06/17 12:08:34 [ERROR] <root>: eval: *terraform.EvalSequence, err: update server is not set
2019/06/17 12:08:34 [ERROR] <root>: eval: *terraform.EvalSequence, err: update server is not set
2019/06/17 12:08:34 [TRACE] [walkRefresh] Exiting eval tree: dns_cname_record.bar
2019/06/17 12:08:34 [TRACE] [walkRefresh] Exiting eval tree: dns_cname_record.foo
2019/06/17 12:08:34 [TRACE] vertex "dns_cname_record.foo": visit complete
2019/06/17 12:08:34 [TRACE] vertex "dns_cname_record.bar": visit complete
2019/06/17 12:08:34 [TRACE] dag/walk: upstream of "provider.dns (close)" errored, so skipping
...
2019-06-17T11:24:56.429+0100 [DEBUG] plugin: plugin process exited: path=~/.terraform/plugins/darwin_amd64/terraform-provider-azurerm_v1.30.1_x4 pid=57842
2019-06-17T11:24:56.429+0100 [DEBUG] plugin: plugin exited

Error: update server is not set

Error: update server is not set

2019-06-17T11:28:48.207+0100 [DEBUG] plugin: plugin process exited: path=~/.terraform/plugins/darwin_amd64/terraform-provider-dns_v2.1.1_x4 pid=58026
2019-06-17T11:28:48.207+0100 [DEBUG] plugin: plugin exited

Expected Behavior

I should able to run terraform plan without any issues.

Actual Behavior

Error: update server is not set

Running plan with -refresh=true doesn't help.

Steps to Reproduce

Please list the steps required to reproduce the issue, for example:

  1. terraform plan

Not sure exactly what are the reproducible steps.

Important Factoids

  • Azure provider

Further problems

I've tried to destroy resources causing the issue, but it also breaks:

$ grep -w dns_cname_record terraform-state.txt 
# dns_cname_record.foo-example: (tainted)
resource "dns_cname_record" "foo-example" {
# dns_cname_record.bar-example: (tainted)
resource "dns_cname_record" "bar-example" {
$  terraform destroy -target=dns_cname_record.bar-example
Acquiring state lock. This may take a few moments...
dns_cname_record.bar-example: Refreshing state... [id=bar.example.com.]

Error: update server is not set

I've tried the following workaround to get rid of the invalid entry:

$  terraform destroy -target=dns_cname_record.bar-example -refresh=false -force
...
apply errored, but we're indicating that via the Error pointer rather than returning it: update server is not set
2019/06/17 15:54:28 [TRACE] <root>: eval: *terraform.EvalWriteState
2019/06/17 15:54:28 [ERROR] <root>: eval: *terraform.EvalApplyPost, err: update server is not set
2019/06/17 15:54:28 [ERROR] <root>: eval: *terraform.EvalSequence, err: update server is not set
2019/06/17 15:54:28 [ERROR] <root>: eval: *terraform.EvalOpFilter, err: update server is not set
2019/06/17 15:54:28 [TRACE] [walkDestroy] Exiting eval tree: dns_cname_record.bar-example (destroy)
...
Error: update server is not set

but it didn't work either.

Workaround

The workaround for me was to edit the state file manually and remove the invalid entries (as per these steps).

References

FEATURE REQUEST: new datasource for dns_ns_record_set

Could we add a data_source of dns_ns_record_set please?

This would be useful in cases where you are handling zone delegation of subdomains.

Terraform could do a lookup of a delegated domain and if the nameservers have changed then it can update any associated delegation records automatically.

provider doesn't handle large zonefile results

Terraform Version

v0.10.4

Affected Resource(s)

  • dns_a_record_set
  • I expect it affects all

Terraform Configuration Files

resource "dns_a_record_set" "ec2_instance" {
  zone      = "${var.domain}."
  name      = "${var.instance_prefix}-${count.index+1}"
  addresses = ["${aws_instance.ec2_instance.*.private_ip}"]
  ttl       = 300
}

Debug Output

Error refreshing state: 1 error(s) occurred:

* module.build_server.dns_a_record_set.ec2_instance: 1 error(s) occurred:

* module.build_server.dns_a_record_set.ec2_instance: dns_a_record_set.ec2_instance: Error querying DNS record: dns: failed to unpack truncated message

Expected Behavior

The A record (which has already been created) should have been returned

Actual Behavior

Above error

Steps to Reproduce

  1. have a bunch a bunch of large zone files that exceed UDP responses
  2. add a record
  3. result

Important Factoids

We have a number of large BIND dns zone files

I suspect this is similar to miekg/dns#423 in that it's because of the failure to use TCP.

Updating records on two different servers at the same time

Hi all,

I have two bind9 servers and these servers haven't any relation. each server owns an authoritative DNS server role and these servers serve the same DNS zone. So if you wanna a DNS query to any server you can get the same response.

The problem I have is that I have to update the DNS records on both servers separately.
I tried the following to avoid doing this;

provider "dns" {
  update {
    server        = "192.168.0.1"
    key_name      = "zonea-key."
    key_algorithm = "hmac-md5"
    key_secret    = "P25P140u18hbddqNqjHFdA=="
  }
}

provider "dns" {
  alias = "bdbd2"
  update {
    server        = "192.168.1.1"
    key_name      = "zonea-key."
    key_algorithm = "hmac-md5"
    key_secret    = "P25P140u18hbddqNqjHFdA=="
  }
}


resource "dns_a_record_set" "www" {
  zone = "example.com."
  name = "w2"
  addresses = [
    "192.168.3.2",
    "192.168.3.3",
  ]
  ttl = 300
}

resource "dns_a_record_set" "www" {
  provider = dns.bdbd2
  zone = "example.com."
  name = "w2"
  addresses = [
    "192.168.3.2",
    "192.168.3.3",
  ]
  ttl = 300
}

Finally, I get the following error. I couldn't understand where is wrong

$ terraform plan

Error: Duplicate resource "dns_a_record_set" configuration

  on main.tf line 31:
  31: resource "dns_a_record_set" "www" {

A dns_a_record_set resource named "www" was already declared at
main.tf:21,1-34. Resource names must be unique per type in each module.


Error: Duplicate provider configuration

  on providers.tf line 11:
  11: provider "dns" {

A provider configuration for "DNS" with alias "bdbd2" was already given at
main.tf:10,1-15. Each configuration for the same provider must have a distinct
alias.

I want to say that I am a new user for terraform.
I may have used the wrong method can you give me advice?

versions, Terraform v0.13.0 + provider registry.terraform.io/hashicorp/dns v3.0.0

TSIG Authentication not used during queries

Hi there,

When using ACLs on resolvers for update and queries, Terraform doesn't provide tsig config during queries.

Terraform Version

Terraform v0.11.3

Affected Resource(s)

  • All resourceDns*RecordSetRead

Terraform Configuration Files

provider "dns" {
  update {
    server = "127.0.0.1"

    key_secret    = "xxxx"
    key_name      = "yyyy."
    key_algorithm = "hmac-sha256"
  }
}

resource "dns_a_record_set" "www-prod" {
  zone     = "test.local."
  name     = "foo"

  addresses = [
    "192.168.0.1",
  ]
}

Debug Output

* dns_a_record_set.www-prod: 1 error(s) occurred:
* dns_a_record_set.www-prod: dns_a_record_set.www-prod: Error querying DNS record: 5

Expected Behavior

DNS Queries should use tsig name/secret

                msg := new(dns.Msg)
                msg.SetQuestion(rec_fqdn, dns.TypeA)
                // Add auth
                if keyname != "" {
                        msg.SetTsig(keyname, keyalgo, 300, time.Now().Unix())
                }
                r, _, err := c.Exchange(msg, srv_addr) 

Actual Behavior

Anonymous queries are sent

                msg := new(dns.Msg)
                msg.SetQuestion(rec_fqdn, dns.TypeA)
                r, _, err := c.Exchange(msg, srv_addr) 

Error: rpc error: code = Unavailable desc = transport is closing / DNS

This issue was originally opened by @jenslink as hashicorp/terraform#24749. It was migrated here as a result of the provider split. The original body of the issue is below.


Terraform Version

terraform -v
Terraform v0.12.24
+ provider.aws v2.58.0
+ provider.dns v2.2.0

Terraform Configuration Files

This happens with a freshly "installed" terraform. No special config

...

Debug Output

dns_a_record_set.test5: Creating...

Error: rpc error: code = Unavailable desc = transport is closing

panic: runtime error: invalid memory address or nil pointer dereference
2020-04-23T13:20:56.416+0200 [DEBUG] plugin.terraform-provider-dns_v2.2.0_x4: [signal SIGSEGV: segmentation violation code=0x1 addr=0x18 pc=0xe484d9]
2020-04-23T13:20:56.416+0200 [DEBUG] plugin.terraform-provider-dns_v2.2.0_x4:
2020-04-23T13:20:56.416+0200 [DEBUG] plugin.terraform-provider-dns_v2.2.0_x4: goroutine 44 [running]:
2020-04-23T13:20:56.416+0200 [DEBUG] plugin.terraform-provider-dns_v2.2.0_x4: github.com/terraform-providers/terraform-provider-dns/vendor/github.com/miekg/dns.(*Msg).Insert(0xc0000bb708, 0xc0000bb5e8, 0x1, 0x1)
2020-04-23T13:20:56.416+0200 [DEBUG] plugin.terraform-provider-dns_v2.2.0_x4: /opt/teamcity-agent/work/5d79fe75d4460a2f/src/github.com/terraform-providers/terraform-provider-dns/vendor/github.com/miekg/dns/update.go:71 +0x89
2020-04-23T13:20:56.416+0200 [DEBUG] plugin.terraform-provider-dns_v2.2.0_x4: github.com/terraform-providers/terraform-provider-dns/dns.resourceDnsARecordSetUpdate(0xc0002e4230, 0xf0cba0, 0xc00060c1e0, 0x114ba00, 0xc0000cdca0)
2020-04-23T13:20:56.416+0200 [DEBUG] plugin.terraform-provider-dns_v2.2.0_x4: /opt/teamcity-agent/work/5d79fe75d4460a2f/src/github.com/terraform-providers/terraform-provider-dns/dns/resource_dns_a_record_set.go:114 +0x783
2020-04-23T13:20:56.416+0200 [DEBUG] plugin.terraform-provider-dns_v2.2.0_x4: github.com/terraform-providers/terraform-provider-dns/dns.resourceDnsARecordSetCreate(0xc0002e4230, 0xf0cba0, 0xc00060c1e0, 0x2, 0x1cec220)
2020-04-23T13:20:56.416+0200 [DEBUG] plugin.terraform-provider-dns_v2.2.0_x4: /opt/teamcity-agent/work/5d79fe75d4460a2f/src/github.com/terraform-providers/terraform-provider-dns/dns/resource_dns_a_record_set.go:54 +0x5b
2020-04-23T13:20:56.416+0200 [DEBUG] plugin.terraform-provider-dns_v2.2.0_x4: github.com/terraform-providers/terraform-provider-dns/vendor/github.com/hashicorp/terraform/helper/schema.(*Resource).Apply(0xc00015ef00, 0xc000163d60, 0xc0000cdca0, 0xf0cba0, 0xc00060c1e0, 0xc000390101, 0xc0003b4bf8, 0xf94320)
2020-04-23T13:20:56.416+0200 [DEBUG] plugin.terraform-provider-dns_v2.2.0_x4: /opt/teamcity-agent/work/5d79fe75d4460a2f/src/github.com/terraform-providers/terraform-provider-dns/vendor/github.com/hashicorp/terraform/helper/schema/resource.go:286 +0x3b4
2020-04-23T13:20:56.416+0200 [DEBUG] plugin.terraform-provider-dns_v2.2.0_x4: github.com/terraform-providers/terraform-provider-dns/vendor/github.com/hashicorp/terraform/helper/schema.(*Provider).Apply(0xc00015f400, 0xc0000bba58, 0xc000163d60, 0xc0000cdca0, 0xc000123b88, 0xc0000c2658, 0xf962a0)
2020-04-23T13:20:56.416+0200 [DEBUG] plugin.terraform-provider-dns_v2.2.0_x4: /opt/teamcity-agent/work/5d79fe75d4460a2f/src/github.com/terraform-providers/terraform-provider-dns/vendor/github.com/hashicorp/terraform/helper/schema/provider.go:285 +0x18f
2020-04-23T13:20:56.416+0200 [DEBUG] plugin.terraform-provider-dns_v2.2.0_x4: github.com/terraform-providers/terraform-provider-dns/vendor/github.com/hashicorp/terraform/helper/plugin.(*GRPCProviderServer).ApplyResourceChange(0xc00015c548, 0x1378300, 0xc0003898c0, 0xc00008ae40, 0xc00015c548, 0xc0003898c0, 0xc00057cbd0)
2020-04-23T13:20:56.416+0200 [DEBUG] plugin.terraform-provider-dns_v2.2.0_x4: /opt/teamcity-agent/work/5d79fe75d4460a2f/src/github.com/terraform-providers/terraform-provider-dns/vendor/github.com/hashicorp/terraform/helper/plugin/grpc_provider.go:885 +0x894
2020-04-23T13:20:56.416+0200 [DEBUG] plugin.terraform-provider-dns_v2.2.0_x4: github.com/terraform-providers/terraform-provider-dns/vendor/github.com/hashicorp/terraform/internal/tfplugin5._Provider_ApplyResourceChange_Handler(0x10c8520, 0xc00015c548, 0x1378300, 0xc0003898c0, 0xc0001639f0, 0x0, 0x1378300, 0xc0003898c0, 0xc00003c0a0, 0x9d)
2020-04-23T13:20:56.416+0200 [DEBUG] plugin.terraform-provider-dns_v2.2.0_x4: /opt/teamcity-agent/work/5d79fe75d4460a2f/src/github.com/terraform-providers/terraform-provider-dns/vendor/github.com/hashicorp/terraform/internal/tfplugin5/tfplugin5.pb.go:3217 +0x23e
2020-04-23T13:20:56.416+0200 [DEBUG] plugin.terraform-provider-dns_v2.2.0_x4: github.com/terraform-providers/terraform-provider-dns/vendor/google.golang.org/grpc.(*Server).processUnaryRPC(0xc000552900, 0x13848c0, 0xc000096f00, 0xc000475800, 0xc00014eea0, 0x1cc0ae0, 0x0, 0x0, 0x0)
2020-04-23T13:20:56.416+0200 [DEBUG] plugin.terraform-provider-dns_v2.2.0_x4: /opt/teamcity-agent/work/5d79fe75d4460a2f/src/github.com/terraform-providers/terraform-provider-dns/vendor/google.golang.org/grpc/server.go:966 +0x470
2020-04-23T13:20:56.416+0200 [DEBUG] plugin.terraform-provider-dns_v2.2.0_x4: github.com/terraform-providers/terraform-provider-dns/vendor/google.golang.org/grpc.(*Server).handleStream(0xc000552900, 0x13848c0, 0xc000096f00, 0xc000475800, 0x0)
2020-04-23T13:20:56.416+0200 [DEBUG] plugin.terraform-provider-dns_v2.2.0_x4: /opt/teamcity-agent/work/5d79fe75d4460a2f/src/github.com/terraform-providers/terraform-provider-dns/vendor/google.golang.org/grpc/server.go:1245 +0xd25
2020-04-23T13:20:56.416+0200 [DEBUG] plugin.terraform-provider-dns_v2.2.0_x4: github.com/terraform-providers/terraform-provider-dns/vendor/google.golang.org/grpc.(*Server).serveStreams.func1.1(0xc00003a1f0, 0xc000552900, 0x13848c0, 0xc000096f00, 0xc000475800)
2020-04-23T13:20:56.416+0200 [DEBUG] plugin.terraform-provider-dns_v2.2.0_x4: /opt/teamcity-agent/work/5d79fe75d4460a2f/src/github.com/terraform-providers/terraform-provider-dns/vendor/google.golang.org/grpc/server.go:685 +0x9f
2020-04-23T13:20:56.416+0200 [DEBUG] plugin.terraform-provider-dns_v2.2.0_x4: created by github.com/terraform-providers/terraform-provider-dns/vendor/google.golang.org/grpc.(*Server).serveStreams.func1
2020-04-23T13:20:56.416+0200 [DEBUG] plugin.terraform-provider-dns_v2.2.0_x4: /opt/teamcity-agent/work/5d79fe75d4460a2f/src/github.com/terraform-providers/terraform-provider-dns/vendor/google.golang.org/grpc/server.go:683 +0xa1
2020-04-23T13:20:56.418+0200 [DEBUG] plugin: plugin process exited: path=/home/jens/test/.terraform/plugins/linux_amd64/terraform-provider-dns_v2.2.0_x4 pid=19943 error="exit status 2"
2020/04/23 13:20:56 [DEBUG] dns_a_record_set.test5: apply errored, but we're indicating that via the Error pointer rather than returning it: rpc error: code = Unavailable desc = transport is closing
2020/04/23 13:20:56 [TRACE] : eval: *terraform.EvalMaybeTainted
2020/04/23 13:20:56 [TRACE] EvalMaybeTainted: dns_a_record_set.test5 encountered an error during creation, so it is now marked as tainted
2020/04/23 13:20:56 [TRACE] : eval: *terraform.EvalWriteState
2020/04/23 13:20:56 [TRACE] EvalWriteState: removing state object for dns_a_record_set.test5
2020/04/23 13:20:56 [TRACE] : eval: *terraform.EvalApplyProvisioners
2020/04/23 13:20:56 [TRACE] EvalApplyProvisioners: dns_a_record_set.test5 has no state, so skipping provisioners
2020/04/23 13:20:56 [TRACE] : eval: *terraform.EvalMaybeTainted
2020/04/23 13:20:56 [TRACE] EvalMaybeTainted: dns_a_record_set.test5 encountered an error during creation, so it is now marked as tainted
2020/04/23 13:20:56 [TRACE] : eval: *terraform.EvalWriteState
2020/04/23 13:20:56 [TRACE] EvalWriteState: removing state object for dns_a_record_set.test5
2020/04/23 13:20:56 [TRACE] : eval: *terraform.EvalIf
2020/04/23 13:20:56 [TRACE] : eval: *terraform.EvalIf
2020/04/23 13:20:56 [TRACE] : eval: *terraform.EvalWriteDiff
2020/04/23 13:20:56 [TRACE] : eval: *terraform.EvalApplyPost
2020/04/23 13:20:56 [ERROR] : eval: *terraform.EvalApplyPost, err: rpc error: code = Unavailable desc = transport is closing
2020/04/23 13:20:56 [ERROR] : eval: *terraform.EvalSequence, err: rpc error: code = Unavailable desc = transport is closing
2020/04/23 13:20:56 [TRACE] [walkApply] Exiting eval tree: dns_a_record_set.test5
2020/04/23 13:20:56 [TRACE] vertex "dns_a_record_set.test5": visit complete
2020/04/23 13:20:56 [TRACE] dag/walk: upstream of "provider.dns (close)" errored, so skipping
2020/04/23 13:20:56 [TRACE] dag/walk: upstream of "meta.count-boundary (EachMode fixup)" errored, so skipping
2020/04/23 13:20:56 [TRACE] dag/walk: upstream of "root" errored, so skipping
2020/04/23 13:20:56 [TRACE] statemgr.Filesystem: not making a backup, because the new snapshot is identical to the old
2020/04/23 13:20:56 [TRACE] statemgr.Filesystem: no state changes since last snapshot
2020/04/23 13:20:56 [TRACE] statemgr.Filesystem: writing snapshot at terraform.tfstate
2020/04/23 13:20:56 [TRACE] statemgr.Filesystem: removing lock metadata file .terraform.tfstate.lock.info
2020/04/23 13:20:56 [TRACE] statemgr.Filesystem: unlocking terraform.tfstate using fcntl flock
2020-04-23T13:20:56.424+0200 [DEBUG] plugin: plugin exited

Crash Output

See https://gist.github.com/jenslink/185a380a26701a27b466d849f922a52d

Expected Behavior

No crash and the DNS record added to the zone update. Or at least some clear output what went wrong.

Actual Behavior

terraform crashes

Steps to Reproduce

Additional Context

I'm quite new to terraform and what I'm trying to steup some AWS instances and put the public
IP address into DNS using the DNS module. It doesn't even try to connect to the DNS Server.

When I'm using a IP Address instead of a variable it works.

References

Panic - DNS provider fails to trap error in Zone Name

This issue was originally opened by @SteveBristow as hashicorp/terraform#24820. It was migrated here as a result of the provider split. The original body of the issue is below.


Terraform Version

Terraform v0.12.24
+ provider.dns v2.2.0

Terraform Configuration Files

provider "dns" {
  update {
    server        = "192.168.1.1"
  }
}
resource "dns_a_record_set" "test" {
    zone        = ".lab.environment.local."
    name        = "testrecord"
    addresses   = ["127.0.0.1"]
    ttl         = 300
}
...

Crash Output

crash.log

Expected Behavior

An illegal zone name (preceding dot) should have been reported, and ignored or failed on - ideally at plan stage.

Actual Behavior

DNS provider crashed Terraform.

Steps to Reproduce

  1. Create a TF template using the code excerpt above. A functioning DNS server is not necessary.
  2. terraform init to add the DNS provider to Terraform
  3. terraform apply
  4. Observe the successful plan - respond "yes" to apply.
  5. Observe crash state.

Additional Context

Terraform is running on Ubuntu on WSL. It seems unlikely that this is the problem, as removing the preceeding dot from the Zone name results in success.

dns_a_record_set works incorrectly

This issue was originally opened by @andrey-iliyov as hashicorp/terraform#15537. It was migrated here as a result of the provider split. The original body of the issue is below.


Terraform Version

Terraform v0.9.11

Affected Resource(s)

dns_a_record_set

Terraform Configuration Files

resource "dns_a_record_set" "www" {
  zone = "example.com."
  name = "www"
  addresses = [
    "192.168.0.200",
  ]
  ttl = 300
}

Expected Behavior

Before I execute terraform apply I had DNS record created manually:

cli> host www.example.com
www.example.com has address 10.10.10.10

After I launched terraform apply I have terraform error and DNS records:

cli> host www.example.com
www.example.com has address 10.10.10.10
www.example.com has address 192.168.0.200

So I expect that DNS record should be replaced(old value of DNS record should be deleted) by default.

Or can you add dns_a_record_set Argument recreate_record ? When recreate_record=true then if old value of DNS record exist it should be replaced with new value.

Thanks!

Actual Behavior

Error applying plan:

2 error(s) occurred:

* dns_a_record_set.www[1]: 1 error(s) occurred:

* dns_a_record_set.www.1: DNS record differs
* dns_a_record_set.www[0]: 1 error(s) occurred:

* dns_a_record_set.www.0: DNS record differs

Terraform does not automatically rollback in the face of errors.
Instead, your Terraform state file has been partially updated with
any resources that successfully completed. Please address the error
above and apply again to incrementally change your infrastructure.

Steps to Reproduce

Please list the steps required to reproduce the issue, for example:

  1. terraform apply

Terraform apply fails with Error: update server is not set

Im creating a cname record set, but when i put the command "terraform apply", i got this message "Error: update server is not set". Im using Terraform v0.14.7
In the Azure Plataform in the "DNS ZONES" i have already created a zone called tech.com.br
Anyone could help me ? What should i do ?

provider "azurerm" {
features {}
}

resource "dns_cname_record" "foo" {
zone = "tech.com.br."
name = "foo"
cname = "info.tech.com.br."
ttl = 3600
}

Release 2.0.0?

@apparentlymart you approved some PRs a couple of weeks ago -- just wondering when we can expect a new release with those changes?

Thanks!

dns_a_record_set cannot create A record entries when a matching wildcard CNAME record exist

Terraform Version

  • Terraform v0.11.13
  • Tested with DNS provider version 2.2.0

Affected Resource(s)

  • dns_a_record_set

Terraform Configuration Files

# Configure the DNS Provider
provider "dns" {
  update {
    server        = "${local.master_dns_ip}"
    key_name      = "rndc-key."
    key_algorithm = "hmac-md5"
    key_secret    = "${local.bind_rndc_secret}"
  }
}

resource "dns_a_record_set" "ldap_a_record" {
  zone      = "${local.dns_zone_name}."
  name      = "ldap"
  addresses = ["${module.bootstrap.public_ips}"]
  ttl       = 300
}

Debug Output

https://gist.github.com/jvshahid/70be63c8a1271873d039472df8132549

Steps to Reproduce

Please list the steps required to reproduce the issue, for example:

  1. Run terraform apply to create the A record resource state
  2. Remove the A record out of band, e.g. by recreating the bind server.
  3. Add a wildcard CName DNS entry in the same bind server, e.g. *.${local.dns_zone_name}
  4. Run terraform apply

Expected Behavior

The last terraform apply notices the missing A record and creates it.

Actual Behavior

The last step terraform apply fails with the following error:

Error: Error refreshing state: 1 error(s) occurred:

* dns_a_record_set.ldap_a_record: 1 error(s) occurred:

* dns_a_record_set.ldap_a_record: dns_a_record_set.ldap_a_record: Error querying DNS record: didn't get a A record

Important Factoids

We are using a bind server.

/cc @Logiraptor

Reverse dns

Hello,

Here is a features request for a reverse dns resource.

I would like to set PTR record in arpa zone for specific ips.
This is done thanks to the /ip/{ip}/reverse route on APIv6.

What do you think about it?

Terraform Version

I am using v0.11.7, but this is a features request, so...

Affected Resource(s)

Is suggest we call it ovh_ip with list field called reverse.

Expected Behavior

This would allow terraform to set reverse DNS for specific ips.

resource "ovh_ip" "example_ip" {
    ip          = "${var.my_ip}"
    description = "ip to ma example service"
    reverse.    = [ "example.com" ]
}

Actual Behavior

It seems impossible to set it.

Other providers issues

Scaleway: 88
HCloud: 32, 19

Terraform panics when trying to create A record set with empty record

Terraform Version

$ terraform version
Terraform v0.11.13
+ provider.dns v2.2.0

Affected Resource(s)

  • dns_a_record_set (tested, probably others too)

Terraform Configuration Files

resource "dns_a_record_set" "foo" {
  zone = "foo."
  name = "foo"
  addresses = [
    "",
  ]
  ttl = 300
}

Also:

resource "dns_a_record_set" "foo" {
  zone = "foo."
  name = "foo"
  addresses = [
    "foo",
  ]
  ttl = 300
}

Debug Output

Please provider a link to a GitHub Gist containing the complete debug output: https://www.terraform.io/docs/internals/debugging.html. Please do NOT paste the debug output in the issue; just paste a link to the Gist.

Panic Output

panic: runtime error: invalid memory address or nil pointer dereference
2019-09-17T13:23:05.586Z [DEBUG] plugin.terraform-provider-dns_v2.2.0_x4: [signal SIGSEGV: segmentation violation code=0x1 addr=0x18 pc=0xe484d9]
2019-09-17T13:23:05.586Z [DEBUG] plugin.terraform-provider-dns_v2.2.0_x4: 
2019-09-17T13:23:05.586Z [DEBUG] plugin.terraform-provider-dns_v2.2.0_x4: goroutine 72 [running]:
2019-09-17T13:23:05.586Z [DEBUG] plugin.terraform-provider-dns_v2.2.0_x4: github.com/terraform-providers/terraform-provider-dns/vendor/github.com/miekg/dns.(*Msg).Insert(0xc00013d9a8, 0xc00013d888, 0x1, 0x1)
2019-09-17T13:23:05.586Z [DEBUG] plugin.terraform-provider-dns_v2.2.0_x4: 	/opt/teamcity-agent/work/5d79fe75d4460a2f/src/github.com/terraform-providers/terraform-provider-dns/vendor/github.com/miekg/dns/update.go:71 +0x89
2019-09-17T13:23:05.586Z [DEBUG] plugin.terraform-provider-dns_v2.2.0_x4: github.com/terraform-providers/terraform-provider-dns/dns.resourceDnsARecordSetUpdate(0xc0001199d0, 0xf0cba0, 0xc0001065a0, 0x0, 0x0)
2019-09-17T13:23:05.586Z [DEBUG] plugin.terraform-provider-dns_v2.2.0_x4: 	/opt/teamcity-agent/work/5d79fe75d4460a2f/src/github.com/terraform-providers/terraform-provider-dns/dns/resource_dns_a_record_set.go:114 +0x783
2019-09-17T13:23:05.586Z [DEBUG] plugin.terraform-provider-dns_v2.2.0_x4: github.com/terraform-providers/terraform-provider-dns/dns.resourceDnsARecordSetCreate(0xc0001199d0, 0xf0cba0, 0xc0001065a0, 0xc0001199d0, 0x0)
2019-09-17T13:23:05.586Z [DEBUG] plugin.terraform-provider-dns_v2.2.0_x4: 	/opt/teamcity-agent/work/5d79fe75d4460a2f/src/github.com/terraform-providers/terraform-provider-dns/dns/resource_dns_a_record_set.go:54 +0x5b
2019-09-17T13:23:05.586Z [DEBUG] plugin.terraform-provider-dns_v2.2.0_x4: github.com/terraform-providers/terraform-provider-dns/vendor/github.com/hashicorp/terraform/helper/schema.(*Resource).Apply(0xc0000f0000, 0xc000401040, 0xc00043fdc0, 0xf0cba0, 0xc0001065a0, 0xc000404201, 0xc0004dfad0, 0x1)
2019-09-17T13:23:05.586Z [DEBUG] plugin.terraform-provider-dns_v2.2.0_x4: 	/opt/teamcity-agent/work/5d79fe75d4460a2f/src/github.com/terraform-providers/terraform-provider-dns/vendor/github.com/hashicorp/terraform/helper/schema/resource.go:286 +0x3b4
2019-09-17T13:23:05.586Z [DEBUG] plugin.terraform-provider-dns_v2.2.0_x4: github.com/terraform-providers/terraform-provider-dns/vendor/github.com/hashicorp/terraform/helper/schema.(*Provider).Apply(0xc0000f0580, 0xc000400ff0, 0xc000401040, 0xc00043fdc0, 0xc00047e120, 0xc00049f800, 0x18)
2019-09-17T13:23:05.586Z [DEBUG] plugin.terraform-provider-dns_v2.2.0_x4: 	/opt/teamcity-agent/work/5d79fe75d4460a2f/src/github.com/terraform-providers/terraform-provider-dns/vendor/github.com/hashicorp/terraform/helper/schema/provider.go:285 +0x18f
2019-09-17T13:23:05.586Z [DEBUG] plugin.terraform-provider-dns_v2.2.0_x4: github.com/terraform-providers/terraform-provider-dns/vendor/github.com/hashicorp/terraform/plugin.(*ResourceProviderServer).Apply(0xc00043f480, 0xc00043f8a0, 0xc0002ebee0, 0x0, 0x0)
2019-09-17T13:23:05.586Z [DEBUG] plugin.terraform-provider-dns_v2.2.0_x4: 	/opt/teamcity-agent/work/5d79fe75d4460a2f/src/github.com/terraform-providers/terraform-provider-dns/vendor/github.com/hashicorp/terraform/plugin/resource_provider.go:530 +0x57
2019-09-17T13:23:05.586Z [DEBUG] plugin.terraform-provider-dns_v2.2.0_x4: reflect.Value.call(0xc000404d80, 0xc00000f970, 0x13, 0x1101f01, 0x4, 0xc0004dff18, 0x3, 0x3, 0xc000243ec0, 0xc00043c028, ...)
2019-09-17T13:23:05.586Z [DEBUG] plugin.terraform-provider-dns_v2.2.0_x4: 	/opt/goenv/versions/1.12.6/src/reflect/value.go:447 +0x461
2019-09-17T13:23:05.586Z [DEBUG] plugin.terraform-provider-dns_v2.2.0_x4: reflect.Value.Call(0xc000404d80, 0xc00000f970, 0x13, 0xc00046b718, 0x3, 0x3, 0xc00043c000, 0xc00046b710, 0xc00046b7b8)
2019-09-17T13:23:05.586Z [DEBUG] plugin.terraform-provider-dns_v2.2.0_x4: 	/opt/goenv/versions/1.12.6/src/reflect/value.go:308 +0xa4
2019-09-17T13:23:05.586Z [DEBUG] plugin.terraform-provider-dns_v2.2.0_x4: net/rpc.(*service).call(0xc000132800, 0xc000400fa0, 0xc0004bdd20, 0xc0004bdd30, 0xc0000f0600, 0xc00000da60, 0xf11120, 0xc00043f8a0, 0x16, 0xf11160, ...)
2019-09-17T13:23:05.586Z [DEBUG] plugin.terraform-provider-dns_v2.2.0_x4: 	/opt/goenv/versions/1.12.6/src/net/rpc/server.go:384 +0x14e
2019-09-17T13:23:05.586Z [DEBUG] plugin.terraform-provider-dns_v2.2.0_x4: created by net/rpc.(*Server).ServeCodec
2019-09-17T13:23:05.586Z [DEBUG] plugin.terraform-provider-dns_v2.2.0_x4: 	/opt/goenv/versions/1.12.6/src/net/rpc/server.go:481 +0x42b
2019/09/17 13:23:05 [TRACE] root: eval: *terraform.EvalWriteState
2019/09/17 13:23:05 [TRACE] root: eval: *terraform.EvalApplyProvisioners
2019/09/17 13:23:05 [TRACE] root: eval: *terraform.EvalIf
2019/09/17 13:23:05 [TRACE] root: eval: *terraform.EvalWriteState
2019/09/17 13:23:05 [TRACE] root: eval: *terraform.EvalWriteDiff
2019/09/17 13:23:05 [TRACE] root: eval: *terraform.EvalApplyPost
2019/09/17 13:23:05 [ERROR] root: eval: *terraform.EvalApplyPost, err: 1 error(s) occurred:

* dns_a_record_set.foo: unexpected EOF
2019/09/17 13:23:05 [ERROR] root: eval: *terraform.EvalSequence, err: 1 error(s) occurred:

* dns_a_record_set.foo: unexpected EOF
2019/09/17 13:23:05 [TRACE] [walkApply] Exiting eval tree: dns_a_record_set.foo
2019/09/17 13:23:05 [TRACE] dag/walk: upstream errored, not walking "provider.dns (close)"
2019/09/17 13:23:05 [TRACE] dag/walk: upstream errored, not walking "meta.count-boundary (count boundary fixup)"
2019/09/17 13:23:05 [TRACE] dag/walk: upstream errored, not walking "root"
2019/09/17 13:23:05 [TRACE] Preserving existing state lineage "c6ea7cd6-c201-dd09-5064-0ced8d84dd55"
2019-09-17T13:23:05.627Z [DEBUG] plugin: plugin process exited: path=/home/foo/.terraform/plugins/linux_amd64/terraform-provider-dns_v2.2.0_x4
2019/09/17 13:23:05 [TRACE] Preserving existing state lineage "c6ea7cd6-c201-dd09-5064-0ced8d84dd55"
2019/09/17 13:23:05 [TRACE] Preserving existing state lineage "c6ea7cd6-c201-dd09-5064-0ced8d84dd55"
2019/09/17 13:23:05 [TRACE] Preserving existing state lineage "c6ea7cd6-c201-dd09-5064-0ced8d84dd55"
2019/09/17 13:23:05 [DEBUG] plugin: waiting for all plugin processes to complete...
2019-09-17T13:23:05.773Z [WARN ] plugin: error closing client during Kill: err="connection is shut down"



!!!!!!!!!!!!!!!!!!!!!!!!!!! TERRAFORM CRASH !!!!!!!!!!!!!!!!!!!!!!!!!!!!

Terraform crashed! This is always indicative of a bug within Terraform.
A crash log has been placed at "crash.log" relative to your current
working directory. It would be immensely helpful if you could please
report the crash with Terraform[1] so that we can fix this.

When reporting bugs, please include your terraform version. That
information is available on the first line of crash.log. You can also
get it by running 'terraform --version' on the command line.

[1]: https://github.com/hashicorp/terraform/issues

!!!!!!!!!!!!!!!!!!!!!!!!!!! TERRAFORM CRASH !!!!!!!!!!!!!!!!!!!!!!!!!!!!

Expected Behavior

Provider should check for errors and handle misconfiguration gracefully

Actual Behavior

Provider crashes hard on bad configuration and does not check for errors given from upstream library.

Steps to Reproduce

  1. terraform apply

Important Factoids

Provider does not check for errors from dns library here: https://github.com/terraform-providers/terraform-provider-dns/blob/master/dns/resource_dns_a_record_set.go#L108 and here: https://github.com/terraform-providers/terraform-provider-dns/blob/master/dns/resource_dns_a_record_set.go#L113.

At least that should be done.

Ideally, those thing should be validated before even attempting to create such record.

References

Cannot delete DNS NS record set

#34 # Terraform Version
Terraform v0.12.6

Affected Resource(s)

Please list the resources as a list, for example:
"dns_ns_record_set"

If this issue appears to affect multiple resources, it may be an issue with Terraform's core, so please mention this.

Terraform Configuration Files

resource "dns_ns_record_set" "this" {
  zone = "sandstone.online."
  name = "prod"
  nameservers = [
    "ns-x.awsdns-00.com.",
    "ns-xxxx.awsdns-00.org.",
    "ns-xxxx.awsdns-00.co.uk.",
    "ns-xxxx.awsdns-00.net.",
  ]
  ttl = 300
}

I added that above without coding the provider as DNS

provider "dns" {
  version = "~> 2.2"
}
  • Terraform plan show it will create the resource
  • Terraform apply > yes
  • It successfully created the resource but can't find it anywhere in AWS
  • Then encountered an error:
    Error: update server is not set
  • Added this line
provider "dns" {
  version = "~> 2.2"
  update {
    server        = "10.97.6.80"
  }
}
  • Delete the entry
resource "dns_ns_record_set" "this" {
  zone = "sandstone.online."
  name = "prod"
  nameservers = [
    "ns-x.awsdns-00.com.",
    "ns-xxxx.awsdns-00.org.",
    "ns-xxxx.awsdns-00.co.uk.",
    "ns-xxxx.awsdns-00.net.",
  ]
  ttl = 300
}
  • New error:
    Error: Error deleting DNS record: 9 (NOTAUTH)

Resource TTL updates result in NXDOMAIN responses

Changing the TTL for a dns_a_record_set resource is a destructive operation that can disrupt clients, because the destroy-and-create cycle causes the DNS server to temporarily return NXDOMAIN responses.

Attempting to use lifecycle { create_before_destroy = true } is even worse: the DNS record is left in a destroyed state, and must be re-applied to restore it.

Terraform Version

Terraform v0.12.7
+ provider.dns v2.1.1
+ provider.hcloud v1.11.0
+ provider.random v2.1.2
+ provider.template v2.1.2

Affected Resource(s)

  • dns_a_record_set
  • dns_aaaa_record_set

Terraform Configuration Files

variable "zone" {
}

variable "name" {
}
variable "ttl" {
  default = 3600 # 1h
}

variable "ipv4_addresses" {
  type    = list(string)
  default = []
}

variable "ipv6_addresses" {
  type    = list(string)
  default = []
}

resource "dns_a_record_set" "ipv4" {
  count = length(var.ipv4_addresses) > 0 ? 1 : 0

  zone = "${var.zone}."
  name = var.name
  ttl  = var.ttl

  addresses = var.ipv4_addresses
}

resource "dns_aaaa_record_set" "ipv6" {
  count = length(var.ipv6_addresses) > 0 ? 1 : 0

  zone = "${var.zone}."
  name = var.name
  ttl  = var.ttl

  addresses = var.ipv6_addresses
}
module "haproxy_dns_test" {
  source = "../../terraform-modules/hcloud_dns_name"

  zone = "example.com"
  name = "test"
  ttl  = 300

  ipv4_addresses = ["192.0.2.1", "192.0.2.2"]
  ipv6_addresses = []
}

Debug Output

N/A

Panic Output

N/A

Expected Behavior

The TTL for the DNS record should have changed without the server returning an NXDOMAIN.

Actual Behavior

When changing the TTL, the Terraform provider replaces the resource by first destroying the record and then creating a new one: (domains/IPs replaced)

module.haproxy_vip2.hcloud_floating_ip.ipv4: Refreshing state... [id=91728]
module.haproxy_vip1.hcloud_floating_ip.ipv4: Refreshing state... [id=91707]
random_string.dns_update_secret: Refreshing state... [id=none]
module.haproxy_dns_test.dns_a_record_set.ipv4[0]: Refreshing state... [id=test.example.com.]

An execution plan has been generated and is shown below.
Resource actions are indicated with the following symbols:
-/+ destroy and then create replacement

Terraform will perform the following actions:

  # module.haproxy_dns_test.dns_a_record_set.ipv4[0] must be replaced
-/+ resource "dns_a_record_set" "ipv4" {
        addresses = [
            "192.0.2.1",
            "192.0.2.2",
        ]
      ~ id        = "test.example.com." -> (known after apply)
        name      = "test"
      ~ ttl       = 300 -> 301 # forces replacement
        zone      = "example.com."
    }

Plan: 1 to add, 0 to change, 1 to destroy.

Do you want to perform these actions?
  Terraform will perform the actions described above.
  Only 'yes' will be accepted to approve.

  Enter a value: yes


module.haproxy_dns_test.dns_a_record_set.ipv4[0]: Destroying... [id=test.example.com.]
module.haproxy_dns_test.dns_a_record_set.ipv4[0]: Destruction complete after 0s
module.haproxy_dns_test.dns_a_record_set.ipv4[0]: Creating...
module.haproxy_dns_test.dns_a_record_set.ipv4[0]: Creation complete after 0s [id=test.example.com.]

The DNS server temporarily returns a (cachable) NXDOMAIN response while the DNS record is being replaced: while dig @test-dns.example.com test.example.com A; do true; done

; <<>> DiG 9.11.3-1ubuntu1.9-Ubuntu <<>> @test-dns.example.com test.example.com A
; (2 servers found)
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 25734
;; flags: qr aa rd; QUERY: 1, ANSWER: 2, AUTHORITY: 0, ADDITIONAL: 1
;; WARNING: recursion requested but not available

...

;; ANSWER SECTION:
test.example.com. 300 IN A	192.0.2.1
test.example.com. 300 IN A	192.0.2.2
; <<>> DiG 9.11.3-1ubuntu1.9-Ubuntu <<>> @test-dns.example.com test.example.com A
; (2 servers found)
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 33103
;; flags: qr aa rd; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 1
;; WARNING: recursion requested but not available

...

;; AUTHORITY SECTION:
example.com. 300 IN	SOA	test-dns.example.com. ops.example.com. 141 3600 60 604800 300
; <<>> DiG 9.11.3-1ubuntu1.9-Ubuntu <<>> @test-dns.example.com test.example.com A
; (2 servers found)
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 34996
;; flags: qr aa rd; QUERY: 1, ANSWER: 2, AUTHORITY: 0, ADDITIONAL: 1
;; WARNING: recursion requested but not available

...

;; ANSWER SECTION:
test.example.com. 301 IN A	192.0.2.2
test.example.com. 301 IN A	192.0.2.1

...

Steps to Reproduce

  1. Change the TTL for the resources in the terraform manifest
  2. Query the DNS server in a loop while applying the update: while dig @test-dns.example.com test.example.com A; do true; done
  3. Run terraform apply
  4. Check the part of the dig logs where the TTL changes

Important Factoids

Using bind 9.14.3 as the DNS update server.

References

N/A

NS records addition to this provider.

We are currently using the nsupdate command to add NS records to our DNS servers. We generate a zone in Route53 and the NS records associated with that zone is what we want to add to our servers. We were trying to find a provider that can help with that. This provider adds A, Cname and ptr records but not NS (correct me if I am wrong-- very new to Terraform)? Are you guys working on NS records ?

I tried to replicate what has been done to add A records however my terraform apply gives me

  • dns_ns_record_set.testingNS: 1 error(s) occurred:

  • dns_ns_record_set.testingNS: dns_ns_record_set.testingNS: Error querying DNS record: 3*

The read, create and update functions that I have added look like the following

READ && UPDATE


	if meta != nil {

		rec_name := d.Get("name").(string)
		rec_zone := d.Get("zone").(string)

		if rec_zone != dns.Fqdn(rec_zone) {
			return fmt.Errorf("Error reading DNS record: \"zone\" should be an FQDN")
		}

		rec_fqdn := fmt.Sprintf("%s.%s", rec_name, rec_zone)

		c := meta.(*DNSClient).c
		srv_addr := meta.(*DNSClient).srv_addr

		msg := new(dns.Msg)
		msg.SetQuestion(rec_fqdn, dns.TypeNS)

		r, _, err := c.Exchange(msg, srv_addr)
		if err != nil {
			return fmt.Errorf("Error querying DNS record: %s", err)
		}
		if r.Rcode != dns.RcodeSuccess {
			return fmt.Errorf("Error querying DNS record: %v", r.Rcode)
		}

		nameservers := schema.NewSet(schema.HashString, nil)
		for _, record := range r.Answer {
			nameserver, err := getNSVal(record)
			if err != nil {
				return fmt.Errorf("Error querying DNS record: %s", err)
			}
			nameservers.Add(nameserver)
		}
		if !nameservers.Equal(d.Get("nameservers")) {
			d.SetId("")
			return fmt.Errorf("DNS record differs")
		}
		return nil
	} else {
		return fmt.Errorf("update server is not set")
	}
}

func resourceDnsNSRecordSetUpdate(d *schema.ResourceData, meta interface{}) error {

	if meta != nil {

		rec_name := d.Get("name").(string)
		rec_zone := d.Get("zone").(string)
		ttl := d.Get("ttl").(int)

		if rec_zone != dns.Fqdn(rec_zone) {
			return fmt.Errorf("Error updating DNS record: \"zone\" should be an FQDN")
		}

		rec_fqdn := fmt.Sprintf("%s.%s", rec_name, rec_zone)

		c := meta.(*DNSClient).c
		srv_addr := meta.(*DNSClient).srv_addr
		keyname := meta.(*DNSClient).keyname
		keyalgo := meta.(*DNSClient).keyalgo

		msg := new(dns.Msg)

		msg.SetUpdate(rec_zone)

		if d.HasChange("nameservers") {
			o, n := d.GetChange("nameservers")
			os := o.(*schema.Set)
			ns := n.(*schema.Set)
			remove := os.Difference(ns).List()
			add := ns.Difference(os).List()

			// Loop through all the old nameservers and remove them
			for _, nameserver := range remove {
				rr_remove, _ := dns.NewRR(fmt.Sprintf("%s %d A %s", rec_fqdn, ttl, nameserver.(string)))
				msg.Remove([]dns.RR{rr_remove})
			}
			// Loop through all the new nameservers and insert them
			for _, nameserver := range add {
				rr_insert, _ := dns.NewRR(fmt.Sprintf("%s %d A %s", rec_fqdn, ttl, nameserver.(string)))
				msg.Insert([]dns.RR{rr_insert})
			}

			if keyname != "" {
				msg.SetTsig(keyname, keyalgo, 300, time.Now().Unix())
			}

			r, _, err := c.Exchange(msg, srv_addr)
			if err != nil {
				d.SetId("")
				return fmt.Errorf("Error updating DNS record: %s", err)
			}
			if r.Rcode != dns.RcodeSuccess {
				d.SetId("")
				return fmt.Errorf("Error updating DNS record: %v", r.Rcode)
			}

			nameservers := ns
			d.Set("nameservers", nameservers)
		}

		return resourceDnsNSRecordSetRead(d, meta)
	} else {
		return fmt.Errorf("update server is not set")
	}
}

CREATE

func resourceDnsNSRecordSetCreate(d *schema.ResourceData, meta interface{}) error {

	rec_name := d.Get("name").(string)
	rec_zone := d.Get("zone").(string)

	if rec_zone != dns.Fqdn(rec_zone) {
		return fmt.Errorf("Error creating DNS record: \"zone\" should be an FQDN")
	}

	rec_fqdn := fmt.Sprintf("%s.%s", rec_name, rec_zone)

	d.SetId(rec_fqdn)

	return resourceDnsARecordSetUpdate(d, meta)
}

The terraform plan I am trying to apply looks like this

  update {
    server        = "aaaaaaa.net"
    key_name      = "aaaaaaa."
    key_algorithm = "hmac-md5"
    key_secret    = "bhifbiefjefg=="
  }
}

# Create a DNS NS record set
resource "dns_ns_record_set" "testingNS" {
    zone = "aaaaaaa"
    name = "pdx.cloud"
    nameservers = "testingns-385.awsdns-48.com."
    ttl = 300
}

Can someone please suggest what I might be doing wrong?

Thank you

Feature Request: Support SRV Records

Hello,

Are there any plans to support SRV records with the Terraform DNS provider?

We have a use case where we are trying to dynamically build security groups in AWS. Using SRV records would simplify this process greatly.

TF 0.12 Provider produced inconsistent result

Terraform Version

0.12.6

Affected Resource(s)

dns_a_record_set
dns_cname_record
(probably other but didn't test)

Terraform Configuration Files

Configure the DNS Provider

provider "dns" {
update {
server = ""
key_name = ""
key_algorithm = "hmac-sha256"
key_secret = ""
}
}

resource "dns_a_record_set" "foo" {
zone = ""
name = "tftest"
addresses = [""]
ttl = 300
}

Debug Output

https://gist.github.com/tam116/26e65bee30e67569929beb1e9f45ab45

Expected Behavior

DNS records created and results returned.

Actual Behavior

DNS records are created successfully (i.e nslookup shows the correct record) but an error message is printed stating: "Provider produced inconsistent result after apply: When applying changes to dns_a_record_set.foo, provider "dns" produced an unexpected new value for was present, but now absent.
This is a bug in the provider, which should be reported in the provider's own issue tracker." and the .tfstate file is unmodified.

A second run of terraform apply results in the expected output and updates the .tfstate as expected.
Updating or destroying existing records produces expected results.

Steps to Reproduce

  1. terraform apply

Reverse DNS Zone

Hi there,

Thank you for opening an issue. Please note that we try to keep the Terraform issue tracker reserved for bug reports and feature requests. For general usage questions, please see: https://www.terraform.io/community.html.

Terraform Version

0.11.8

This is a more of a question. Does this provider support creating the reverse lookup zones? Trying to use this provider to create a reverse-lookup-zone on windows . Any thoughts ?

Provider Segfault null pointer reference, when creating dns_a_record with count

Hi there,

Thank you for opening an issue. Please note that we try to keep the Terraform issue tracker reserved for bug reports and feature requests. For general usage questions, please see: https://www.terraform.io/community.html.

Terraform Version

[root@bastion terraform]# ./terraform --version
Terraform v0.11.14

  • provider.dns v2.1.1

Affected Resource(s)

Please list the resources as a list, for example:

  • dns_a_record_set

Terraform Configuration Files

resource "dns_a_record_set" "api-external" {
  zone           = "${var.cluster_domain}."
  name           = "api"
  addresses      = ["${concat(var.bootstrap_ips, var.control_plane_ips)}"]
}

resource "dns_a_record_set" "api-internal" {
  zone           = "${var.cluster_domain}."
  name           = "api-int"
  addresses      = ["${concat(var.bootstrap_ips, var.control_plane_ips)}"]
}

resource "dns_a_record_set" "etcd_a_nodes" {
  count     = "${var.control_plane_count}"

  zone      = "${var.cluster_domain}."
  name      = "etcd-${count.index}"
  addresses = ["${element(var.control_plane_ips, count.index)}"]
}

resource "dns_a_record_set" "ingress" {
  zone      = "apps.${var.cluster_domain}."
  name      = "*"
  addresses = ["${var.compute_ips}"]
}

resource "dns_a_record_set" "control_plane_nodes" {
  count     = "${var.control_plane_count}"

  zone      = "${var.cluster_domain}."
  name      = "control-plane-${count.index}"
  addresses = ["${element(var.control_plane_ips, count.index)}"]
}

resource "dns_a_record_set" "compute_nodes" {
  count     = "${var.compute_count}"

  zone      = "${var.cluster_domain}."
  name      = "compute-${count.index}"
  addresses = ["${element(var.compute_ips, count.index)}"]
}

Debug Output

Error: Error applying plan:

7 errors occurred:
	* module.dns.dns_a_record_set.control_plane_nodes[1]: unexpected EOF
	* module.dns.dns_a_record_set.ingress: 1 error occurred:
	* dns_a_record_set.ingress: unexpected EOF


	* module.dns.dns_a_record_set.control_plane_nodes[0]: 1 error occurred:
	* dns_a_record_set.control_plane_nodes.0: unexpected EOF


	* module.dns.dns_a_record_set.compute_nodes[2]: 1 error occurred:
	* dns_a_record_set.compute_nodes.2: unexpected EOF


	* module.dns.dns_a_record_set.control_plane_nodes[2]: unexpected EOF
	* module.dns.dns_a_record_set.compute_nodes[0]: unexpected EOF
	* module.dns.dns_a_record_set.compute_nodes[1]: 1 error occurred:
	* dns_a_record_set.compute_nodes.1: unexpected EOF





Terraform does not automatically rollback in the face of errors.
Instead, your Terraform state file has been partially updated with
any resources that successfully completed. Please address the error
above and apply again to incrementally change your infrastructure.


panic: runtime error: invalid memory address or nil pointer dereference
2019-07-16T15:46:50.918-0400 [DEBUG] plugin.terraform-provider-dns_v2.1.1_x4: [signal SIGSEGV: segmentation violation code=0x1 addr=0x18 pc=0xcdb9f9]
2019-07-16T15:46:50.918-0400 [DEBUG] plugin.terraform-provider-dns_v2.1.1_x4: 
2019-07-16T15:46:50.918-0400 [DEBUG] plugin.terraform-provider-dns_v2.1.1_x4: goroutine 125 [running]:
2019-07-16T15:46:50.918-0400 [DEBUG] plugin.terraform-provider-dns_v2.1.1_x4: github.com/terraform-providers/terraform-provider-dns/vendor/github.com/miekg/dns.(*Msg).Insert(0xc0003a9920, 0xc0003a9840, 0x1, 0x1)
2019-07-16T15:46:50.918-0400 [DEBUG] plugin.terraform-provider-dns_v2.1.1_x4: 	/opt/teamcity-agent/work/5d79fe75d4460a2f/src/github.com/terraform-providers/terraform-provider-dns/vendor/github.com/miekg/dns/update.go:71 +0x89
2019-07-16T15:46:50.918-0400 [DEBUG] plugin.terraform-provider-dns_v2.1.1_x4: github.com/terraform-providers/terraform-provider-dns/dns.resourceDnsARecordSetUpdate(0xc0001baee0, 0xd8dd00, 0xc000404960, 0xc0001baee0, 0xc000495c80)
2019-07-16T15:46:50.919-0400 [DEBUG] plugin.terraform-provider-dns_v2.1.1_x4: 	/opt/teamcity-agent/work/5d79fe75d4460a2f/src/github.com/terraform-providers/terraform-provider-dns/dns/resource_dns_a_record_set.go:114 +0x635
2019-07-16T15:46:50.919-0400 [DEBUG] plugin.terraform-provider-dns_v2.1.1_x4: github.com/terraform-providers/terraform-provider-dns/dns.resourceDnsARecordSetCreate(0xc0001baee0, 0xd8dd00, 0xc000404960, 0xc0001baee0, 0x0)
2019-07-16T15:46:50.919-0400 [DEBUG] plugin.terraform-provider-dns_v2.1.1_x4: 	/opt/teamcity-agent/work/5d79fe75d4460a2f/src/github.com/terraform-providers/terraform-provider-dns/dns/resource_dns_a_record_set.go:54 +0x5b
2019-07-16T15:46:50.919-0400 [DEBUG] plugin.terraform-provider-dns_v2.1.1_x4: github.com/terraform-providers/terraform-provider-dns/vendor/github.com/hashicorp/terraform/helper/schema.(*Resource).Apply(0xc00040a080, 0xc000393860, 0xc000495c80, 0xd8dd00, 0xc000404960, 0x40b801, 0xc0000b6b80, 0x4c117c)
2019-07-16T15:46:50.919-0400 [DEBUG] plugin.terraform-provider-dns_v2.1.1_x4: 	/opt/teamcity-agent/work/5d79fe75d4460a2f/src/github.com/terraform-providers/terraform-provider-dns/vendor/github.com/hashicorp/terraform/helper/schema/resource.go:286 +0x363
2019-07-16T15:46:50.919-0400 [DEBUG] plugin.terraform-provider-dns_v2.1.1_x4: github.com/terraform-providers/terraform-provider-dns/vendor/github.com/hashicorp/terraform/helper/schema.(*Provider).Apply(0xc00040ad80, 0xc000393810, 0xc000393860, 0xc000495c80, 0xc000355500, 0x18, 0x7fe5a67f1000)
2019-07-16T15:46:50.919-0400 [DEBUG] plugin.terraform-provider-dns_v2.1.1_x4: 	/opt/teamcity-agent/work/5d79fe75d4460a2f/src/github.com/terraform-providers/terraform-provider-dns/vendor/github.com/hashicorp/terraform/helper/schema/provider.go:285 +0x9c
2019-07-16T15:46:50.919-0400 [DEBUG] plugin.terraform-provider-dns_v2.1.1_x4: github.com/terraform-providers/terraform-provider-dns/vendor/github.com/hashicorp/terraform/plugin.(*ResourceProviderServer).Apply(0xc0004a0ee0, 0xc000495c00, 0xc0002fed90, 0x0, 0x0)
2019-07-16T15:46:50.919-0400 [DEBUG] plugin.terraform-provider-dns_v2.1.1_x4: 	/opt/teamcity-agent/work/5d79fe75d4460a2f/src/github.com/terraform-providers/terraform-provider-dns/vendor/github.com/hashicorp/terraform/plugin/resource_provider.go:530 +0x57
2019-07-16T15:46:50.919-0400 [DEBUG] plugin.terraform-provider-dns_v2.1.1_x4: reflect.Value.call(0xc000137800, 0xc00000c058, 0x13, 0xf4049c, 0x4, 0xc0000b6f18, 0x3, 0x3, 0xc00013e680, 0x0, ...)
2019-07-16T15:46:50.919-0400 [DEBUG] plugin.terraform-provider-dns_v2.1.1_x4: 	/opt/goenv/versions/1.11.5/src/reflect/value.go:447 +0x454
2019-07-16T15:46:50.919-0400 [DEBUG] plugin.terraform-provider-dns_v2.1.1_x4: reflect.Value.Call(0xc000137800, 0xc00000c058, 0x13, 0xc000363718, 0x3, 0x3, 0x0, 0x0, 0x0)
2019-07-16T15:46:50.919-0400 [DEBUG] plugin.terraform-provider-dns_v2.1.1_x4: 	/opt/goenv/versions/1.11.5/src/reflect/value.go:308 +0xa4
2019-07-16T15:46:50.919-0400 [DEBUG] plugin.terraform-provider-dns_v2.1.1_x4: net/rpc.(*service).call(0xc0003d6840, 0xc000426190, 0xc0003701b0, 0xc0003701c0, 0xc0002be000, 0xc000495be0, 0xd91d00, 0xc000495c00, 0x16, 0xd91d40, ...)
2019-07-16T15:46:50.919-0400 [DEBUG] plugin.terraform-provider-dns_v2.1.1_x4: 	/opt/goenv/versions/1.11.5/src/net/rpc/server.go:384 +0x14e
2019-07-16T15:46:50.919-0400 [DEBUG] plugin.terraform-provider-dns_v2.1.1_x4: created by net/rpc.(*Server).ServeCodec
2019-07-16T15:46:50.919-0400 [DEBUG] plugin.terraform-provider-dns_v2.1.1_x4: 	/opt/goenv/versions/1.11.5/src/net/rpc/server.go:481 +0x47e
2019/07/16 15:46:50 [ERROR] root.dns: eval: *terraform.EvalDiff, err: unexpected EOF
2019/07/16 15:46:50 [ERROR] root.dns: eval: *terraform.EvalDiff, err: unexpected EOF
2019/07/16 15:46:50 [ERROR] root.dns: eval: *terraform.EvalDiff, err: unexpected EOF
2019/07/16 15:46:50 [TRACE] root.dns: eval: *terraform.EvalWriteState
2019-07-16T15:46:50.920-0400 [DEBUG] plugin: plugin process exited: path=/etc/ansible/installer-configs/vsphere/.terraform/plugins/linux_amd64/terraform-provider-dns_v2.1.1_x4
2019/07/16 15:46:50 [ERROR] root.dns: eval: *terraform.EvalSequence, err: unexpected EOF
2019/07/16 15:46:50 [TRACE] [walkApply] Exiting eval tree: module.dns.dns_a_record_set.control_plane_nodes[2]
2019/07/16 15:46:50 [ERROR] root.dns: eval: *terraform.EvalSequence, err: unexpected EOF
2019/07/16 15:46:50 [TRACE] [walkApply] Exiting eval tree: module.dns.dns_a_record_set.control_plane_nodes[1]
2019/07/16 15:46:50 [ERROR] root.dns: eval: *terraform.EvalSequence, err: unexpected EOF
2019/07/16 15:46:50 [TRACE] [walkApply] Exiting eval tree: module.dns.dns_a_record_set.compute_nodes[0]
2019/07/16 15:46:50 [TRACE] root.dns: eval: *terraform.EvalWriteState
2019/07/16 15:46:50 [TRACE] root.dns: eval: *terraform.EvalApplyProvisioners
2019/07/16 15:46:50 [TRACE] root.dns: eval: *terraform.EvalIf
2019/07/16 15:46:50 [TRACE] root.dns: eval: *terraform.EvalWriteState
2019/07/16 15:46:50 [TRACE] root.dns: eval: *terraform.EvalWriteDiff
2019/07/16 15:46:50 [TRACE] root.dns: eval: *terraform.EvalApplyPost
2019/07/16 15:46:50 [TRACE] root.dns: eval: *terraform.EvalWriteState
2019/07/16 15:46:50 [TRACE] root.dns: eval: *terraform.EvalApplyProvisioners
2019/07/16 15:46:50 [TRACE] root.dns: eval: *terraform.EvalIf
2019/07/16 15:46:50 [TRACE] root.dns: eval: *terraform.EvalWriteState
2019/07/16 15:46:50 [TRACE] root.dns: eval: *terraform.EvalWriteDiff
2019/07/16 15:46:50 [TRACE] root.dns: eval: *terraform.EvalApplyPost
2019/07/16 15:46:50 [TRACE] root.dns: eval: *terraform.EvalWriteState
2019/07/16 15:46:50 [TRACE] root.dns: eval: *terraform.EvalApplyProvisioners
2019/07/16 15:46:50 [TRACE] root.dns: eval: *terraform.EvalIf
2019/07/16 15:46:50 [TRACE] root.dns: eval: *terraform.EvalWriteState
2019/07/16 15:46:50 [TRACE] root.dns: eval: *terraform.EvalWriteDiff
2019/07/16 15:46:50 [TRACE] root.dns: eval: *terraform.EvalApplyPost
2019/07/16 15:46:50 [ERROR] root.dns: eval: *terraform.EvalApplyPost, err: 1 error occurred:
	* dns_a_record_set.control_plane_nodes.0: unexpected EOF

2019/07/16 15:46:50 [TRACE] root.dns: eval: *terraform.EvalApplyProvisioners
2019/07/16 15:46:50 [TRACE] root.dns: eval: *terraform.EvalIf
2019/07/16 15:46:50 [TRACE] root.dns: eval: *terraform.EvalWriteState
2019/07/16 15:46:50 [TRACE] root.dns: eval: *terraform.EvalWriteDiff
2019/07/16 15:46:50 [TRACE] root.dns: eval: *terraform.EvalApplyPost
2019/07/16 15:46:50 [ERROR] root.dns: eval: *terraform.EvalApplyPost, err: 1 error occurred:
	* dns_a_record_set.ingress: unexpected EOF

2019/07/16 15:46:50 [ERROR] root.dns: eval: *terraform.EvalSequence, err: 1 error occurred:
	* dns_a_record_set.ingress: unexpected EOF

2019/07/16 15:46:50 [TRACE] [walkApply] Exiting eval tree: module.dns.dns_a_record_set.ingress
2019/07/16 15:46:50 [ERROR] root.dns: eval: *terraform.EvalApplyPost, err: 1 error occurred:
	* dns_a_record_set.compute_nodes.2: unexpected EOF

2019/07/16 15:46:50 [ERROR] root.dns: eval: *terraform.EvalSequence, err: 1 error occurred:
	* dns_a_record_set.compute_nodes.2: unexpected EOF

2019/07/16 15:46:50 [ERROR] root.dns: eval: *terraform.EvalApplyPost, err: 1 error occurred:
	* dns_a_record_set.compute_nodes.1: unexpected EOF

2019/07/16 15:46:50 [ERROR] root.dns: eval: *terraform.EvalSequence, err: 1 error occurred:
	* dns_a_record_set.compute_nodes.1: unexpected EOF

2019/07/16 15:46:50 [TRACE] [walkApply] Exiting eval tree: module.dns.dns_a_record_set.compute_nodes[1]
2019/07/16 15:46:50 [ERROR] root.dns: eval: *terraform.EvalSequence, err: 1 error occurred:
	* dns_a_record_set.control_plane_nodes.0: unexpected EOF

2019/07/16 15:46:50 [TRACE] [walkApply] Exiting eval tree: module.dns.dns_a_record_set.control_plane_nodes[0]
2019/07/16 15:46:50 [TRACE] [walkApply] Exiting eval tree: module.dns.dns_a_record_set.compute_nodes[2]
2019/07/16 15:46:50 [TRACE] dag/walk: upstream errored, not walking "module.dns.provider.dns (close)"
2019/07/16 15:46:50 [TRACE] dag/walk: upstream errored, not walking "meta.count-boundary (count boundary fixup)"
2019/07/16 15:46:50 [TRACE] dag/walk: upstream errored, not walking "root"
2019/07/16 15:46:50 [TRACE] Preserving existing state lineage "02baadb6-6fe1-57b9-e769-2e8dd4bc6102"
2019/07/16 15:46:50 [TRACE] Preserving existing state lineage "02baadb6-6fe1-57b9-e769-2e8dd4bc6102"
2019/07/16 15:46:50 [TRACE] Preserving existing state lineage "02baadb6-6fe1-57b9-e769-2e8dd4bc6102"
2019/07/16 15:46:50 [TRACE] Preserving existing state lineage "02baadb6-6fe1-57b9-e769-2e8dd4bc6102"
2019/07/16 15:46:50 [DEBUG] plugin: waiting for all plugin processes to complete...
2019-07-16T15:46:50.958-0400 [WARN ] plugin: error closing client during Kill: err="connection is shut down"
2019-07-16T15:46:50.959-0400 [DEBUG] plugin.terraform-provider-null_v2.1.2_x4: 2019/07/16 15:46:50 [ERR] plugin: plugin server: accept unix /tmp/plugin187427790: use of closed network connection
2019-07-16T15:46:50.959-0400 [DEBUG] plugin.terraform-provider-template_v2.1.2_x4: 2019/07/16 15:46:50 [ERR] plugin: plugin server: accept unix /tmp/plugin954229151: use of closed network connection
2019-07-16T15:46:50.959-0400 [DEBUG] plugin.terraform: local-exec-provisioner (internal) 2019/07/16 15:46:50 [ERR] plugin: plugin server: accept unix /tmp/plugin385291182: use of closed network connection
2019-07-16T15:46:50.959-0400 [DEBUG] plugin.terraform: local-exec-provisioner (internal) 2019/07/16 15:46:50 [DEBUG] plugin: waiting for all plugin processes to complete...
2019-07-16T15:46:50.959-0400 [DEBUG] plugin.terraform-provider-vsphere_v1.12.0_x4: 2019/07/16 15:46:50 [ERR] plugin: plugin server: accept unix /tmp/plugin084236766: use of closed network connection
2019-07-16T15:46:50.959-0400 [DEBUG] plugin.terraform-provider-external_v1.2.0_x4: 2019/07/16 15:46:50 [ERR] plugin: plugin server: accept unix /tmp/plugin991095398: use of closed network connection
2019-07-16T15:46:50.960-0400 [DEBUG] plugin: plugin process exited: path=/etc/ansible/installer-configs/vsphere/.terraform/plugins/linux_amd64/terraform-provider-template_v2.1.2_x4
2019-07-16T15:46:50.960-0400 [DEBUG] plugin.terraform-provider-ignition_v1.1.0_x4: 2019/07/16 15:46:50 [ERR] plugin: plugin server: accept unix /tmp/plugin388543880: use of closed network connection
2019-07-16T15:46:50.960-0400 [DEBUG] plugin: plugin process exited: path=/etc/ansible/installer-configs/vsphere/terraform
2019-07-16T15:46:50.960-0400 [DEBUG] plugin: plugin process exited: path=/etc/ansible/installer-configs/vsphere/.terraform/plugins/linux_amd64/terraform-provider-external_v1.2.0_x4
2019-07-16T15:46:50.960-0400 [DEBUG] plugin: plugin process exited: path=/etc/ansible/installer-configs/vsphere/.terraform/plugins/linux_amd64/terraform-provider-null_v2.1.2_x4
2019-07-16T15:46:50.961-0400 [DEBUG] plugin: plugin process exited: path=/etc/ansible/installer-configs/vsphere/.terraform/plugins/linux_amd64/terraform-provider-vsphere_v1.12.0_x4
2019-07-16T15:46:50.961-0400 [DEBUG] plugin: plugin process exited: path=/etc/ansible/installer-configs/vsphere/.terraform/plugins/linux_amd64/terraform-provider-ignition_v1.1.0_x4



!!!!!!!!!!!!!!!!!!!!!!!!!!! TERRAFORM CRASH !!!!!!!!!!!!!!!!!!!!!!!!!!!!

Terraform crashed! This is always indicative of a bug within Terraform.
A crash log has been placed at "crash.log" relative to your current
working directory. It would be immensely helpful if you could please
report the crash with Terraform[1] so that we can fix this.

When reporting bugs, please include your terraform version. That
information is available on the first line of crash.log. You can also
get it by running 'terraform --version' on the command line.

[1]: https://github.com/hashicorp/terraform/issues

!!!!!!!!!!!!!!!!!!!!!!!!!!! TERRAFORM CRASH !!!!!!!!!!!!!!!!!!!!!!!!!!!!

Panic Output

https://gist.github.com/frenchtoasters/aadadaa7b13708cf82bb276ddb05a75c

Expected Behavior

Add all the DNS A records to the bind server

Actual Behavior

Terraform crashes when trying to add multiple A record resources that all use the count variable.

Steps to Reproduce

Please list the steps required to reproduce the issue, for example:

  1. terraform apply

Make signed read requests optional

Our terraform setup is as follows:

  • All users may plan locally before checking in changes to a git repo
  • Applies may only occur in a CI environment controlled by the ops team

With the 1.0.0 DNS provider we were able to default the provider's key_secret to a dummy value which wasn't used during plans, and then set the real secret in the CI environment via an environment variable for when update and deletes are actually performed. This way we didn't need to check the secret into the git repo and users do not have write access to our BIND server. For the record, we have a similar setup with the AWS provider -- users have read access to (almost) all resources but only the CI environment has update/delete access, enforced via IAM permissions.

It appears that the signing of read requests introduced in 2.0.0 broke this workflow. We would now need to give all users write access to BIND in order for them to run plans.

Would it be possible to make the signing of read requests optional, exposed as a provider config option? Alternatively, what would be a feasible solution for this that mimics our existing workflow?

Terraform Version

Terraform v0.11.7
+ provider.dns v2.0.0

Affected Resource(s)

  • all resources

Terraform Configuration Files

provider "dns" {
  version = "~> 2.0.0"
  update {
    server        = "1.2.3.4"
    key_name      = "ci_key."
    key_algorithm = "hmac-md5"
    key_secret    = "${var.dns_key}"
  }
}
variable "dns_key" {
  default = "MY_KEY"
}
resource "dns_a_record_set" "this" {
  zone      = "mydomain.com."
  name      = "rifelpet"
  addresses = ["192.168.1.1"]
  ttl       = 300
}

Debug Output

https://gist.github.com/rifelpet/36dcd7c7f0b2949db23f498a93a38845

Expected Behavior

The DNS record should be queried without the secret_key and the plan should succeed

Actual Behavior

The plan failed due to a DNS query error:

* dns_a_record_set.this: dns_a_record_set.this: Error querying DNS record: illegal base64 data at input byte 2

Steps to Reproduce

  1. Alter the config file above to create a DNS record on a bind server, setting theTF_VAR_dns_key env var to the RNDC secret.
  2. Run a terraform plan with the dns_key variable set to its default value.

Impossible to set CNAME on zone root

Terraform Version

Terraform v0.12.24
provider.dns: version = "~> 2.2"

Affected Resource(s)

  • dns_cname_record

Terraform Configuration Files

resource "dns_cname_record" "this" {
  zone   = "example.com."
  name  = ""
  cname = "aws.loadbalancer.dns.name."
}

Expected Behavior

I know "name" is required. Consider following situation:
I have configured dynamic DNS zone example.com and I have keys to this zone. I am regularly deploying environments under this zone with DNS names like dev.example.com or uat.example.com. Configuration for these cases is simple.

However, for my production environment I'd like to use the zone example.com. So, what do I put in the dns_cname_record? I don't manage com zone and my SSL certificate has DN example.com. It is very useful to use the zone root for the production environment, but I can't do that.

Actual Behavior

Error: DNS record name "name" must not contain whitespace or be empty: ""

Workaround

Currently I am working around this by requesting a certificate with DN www.example.com and using name = "www".

Unable to

Terraform Version

Terraform v0.11.7
+ provider.dns v2.0.0

Affected Resource(s)

  • dns_a_record_set
  • likely other record types as well

Terraform Configuration Files

resource dns_a_record_set ddns_record {
  zone      = "example.com."
  name      = ""
  addresses = ["1.2.3.4"]
  ttl       = "300"
}

Expected Behavior

A DNS record should have been created sharing the same name as the zone itself.

Actual Behavior

Apply failed with Error updating DNS record: 10

Important Factoids

I've been able to get the desired behavior by modifying the lines rec_fqdn := fmt.Sprintf("%s.%s", rec_name, rec_zone). As written, a blank name parameter results in an FQDN of ".example.com.", which throws an error. By checking if the name parameter is blank, and instead using rec_fqdn = fmt.Sprintf("%s", rec_zone), the correct FQDN of "example.com." is produced and the DNS record is successfully created.

dns_a_record_set resource fails when vcd_vapp resource explicitly set to use dhcp

This issue was originally opened by @stubblyhead as hashicorp/terraform#13812. It was migrated here as part of the provider split. The original body of the issue is below.


Terraform Version

Terraform v0.9.3

Affected Resource(s)

  • vcd_vapp
  • dns_a_record_set
    (I'm not sure which of the two is at fault, possibly they are just not playing nice with each other)

Terraform Configuration Files

variable "name" {}
variable "user" {}
variable "password" {}

provider "vcd" {
  user = "${var.user}"
  password = "${var.password}"
  org = "myorg"
  url = "https://vcd/api"
  vdc = "mydatacenter"
  maxRetryTimeout = 180
}

resource "vcd_vapp" "susebox" {
  name = "${var.name}"
  catalog_name = "My Catalog"
  template_name = "opensuse13.2"
  network_name = "192.168.52.0/24"
  ip = "dhcp"
}

provider "dns" {
  update {
    server = "192.168.50.12"
  }
}

resource "dns_a_record_set" "suse" {
  zone = "myzone.lec."
  name = "${vcd_vapp.susebox.name}"
  addresses = [ "${vcd_vapp.susebox.ip}", ]
  ttl = 3600
}

Debug Output

  1. https://gist.github.com/stubblyhead/774633c1cd21050dc96cd0105d8b3126
  2. https://gist.github.com/stubblyhead/23878afa4ded3a876eaf906467b4a42d
    The first gist is a failed apply, and the second is a successful one. The only difference in configuration is explicitly using dhcp (gist 1) instead of implicitly using dhcp as the default behavior (gist 2).

Expected Behavior

What should have happened?
The configuration above should work as written. Commenting out line hashicorp/terraform#19 (ip = "dhcp") will result in a successful apply, but as dhcp is the default behavior it shouldn't matter if it's stated explicitly or not.

Actual Behavior

What actually happened?
The DNS entry does not get updated, and error text (see lines 633-654 in gist hashicorp/terraform#1 above) is output.

Steps to Reproduce

Please list the steps required to reproduce the issue, for example:

  1. terraform apply

Provide configurable timeout and retry counts

Provide configurable timeout and retry counts. I see some of this is addressed in:

Pull Request #68 - Retry DNS queries on timeout

So is it possible you can also release a new version soon?

Thanks

Can't set empty dns_aaaa_record_set

I want to make sure that I have no AAAA records set. I thought that I could achieve this by setting an empty array, but terraform crashes.

Terraform Version

Terraform v0.13.0
+ provider registry.terraform.io/-/dns v2.2.0
+ provider registry.terraform.io/hashicorp/dns v2.2.0

Affected Resource(s)

  • dns_aaaa_record_set

Terraform Configuration Files

terraform {
  required_version = "~> 0.12"
  required_providers {
    dns = "2.2.0"
  }
}

provider "dns" {
  update {
    server        = "ns.acme.com"
    key_name      = "user."
    key_algorithm = "hmac-md5"
    key_secret    = var.secret
  }
}

I tried

resource "dns_aaaa_record_set" "www" {
 zone = "domain.tld."
 name = "sub"
 addresses = []
 ttl = 60
}

which produces this debug log

https://gist.github.com/oschrenk/c060a7021281fb0fe63f1cee334a66e6

If I try (notice the empty string)

resource "dns_aaaa_record_set" "www" {
 zone = "domain.tld."
 name = "sub"
 addresses = [""]
 ttl = 60
}

terraform crashes with

https://gist.github.com/oschrenk/37592d5d16aafdbf88f6e121e54ab037

Debug Output

https://gist.github.com/oschrenk/c060a7021281fb0fe63f1cee334a66e6

Panic Output

https://gist.github.com/oschrenk/37592d5d16aafdbf88f6e121e54ab037

Expected Behavior

the provider should make sure that there are no AAAA records. Deleting remote entries if neccessary

Actual Behavior

Crash

Steps to Reproduce

  1. terraform apply

multiple PTR records are not handled gracefully

Terraform Version

Terraform v0.12.6

  • provider.aws v2.26.0
  • provider.dns v2.2.0

Affected Resource(s)

Please list the resources as a list, for example:

  • dns_ptr_record

Terraform Configuration Files

resource "dns_ptr_record" "A" {
  zone      = "<ZONE>"
  name      = "<IP>"
  ptr       = "foo.bar.com"
}

resource "dns_ptr_record" "B" {
  zone      = "<ZONE>"
  name      = "<IP>"
  ptr       = "foo2.bar.com"
}

Expected Behavior

Multiple PTR records for the same IP are created and Terraform returns successfully
OR
Terraform exits without creating multiple PTR records

Actual Behavior

Multiple PTR records for the same IP are created and Terraform returns an error:

Error: Error querying DNS record: multiple responses received

Steps to Reproduce

Please list the steps required to reproduce the issue, for example:

  1. terraform apply

References

here is the bit of code that is doing the check:
https://github.com/terraform-providers/terraform-provider-dns/blob/master/dns/resource_dns_ptr_record.go#L64-L66

There are appears to be some debate as to whether multiple PTR records for the same IP is correct - Bind certainly allows it, so that might be a good enough answer for the purposes of this provider.

In any case, Terraform creates an unrecoverable situation wherein multiple PTR records for the same IP are created but then one can't run Terraform apply again either to remove them or continue deploying it.

This ticket isn't to address the preferred functionality, just that whichever functionality is chosen, it should work in an idempotent way.

DNS provider bug. DNS should not fail when record does not exist.

This issue was originally opened by @vmindru as hashicorp/terraform#15088. It was migrated here as part of the provider split. The original body of the issue is below.


terraform should not fail when the record does not exist, it should create the record instead.

Terraform Version

Terraform v0.9.6

Affected Resource(s)

dns_a_record_set

Terraform Configuration Files

[vmindru@vmutil test]$ cat dns.tf 
provider "dns" {
  update {
    server        = "${ var.dnsmaster }"
    key_name      = "${ var.dnskey }."
    key_algorithm = "hmac-md5"
    key_secret    = "${ var.dnskeysecret }"
  }
}
[vmindru@vmutil test]$ cat dns-zone.tf 
resource "dns_a_record_set" "www" {
  zone = "zone.com."
  name = "test2"
  addresses = [ "127.0.0.1" ]
  ttl = 30
}
[vmindru@vmutil test]$ 

Debug Output

trucnated


dns_a_record_set.www - *terraform.NodeRefreshableManagedResourceInstance
2017/06/05 13:04:43 [DEBUG] dag/walk: added new vertex: "dns_a_record_set.www"
2017/06/05 13:04:43 [DEBUG] dag/walk: walking "dns_a_record_set.www"
2017/06/05 13:04:43 [DEBUG] vertex 'root.dns_a_record_set.www': walking
2017/06/05 13:04:43 [DEBUG] vertex 'root.dns_a_record_set.www': evaluating
2017/06/05 13:04:43 [TRACE] [walkRefresh] Entering eval tree: dns_a_record_set.www
2017/06/05 13:04:43 [DEBUG] root: eval: *terraform.EvalSequence
2017/06/05 13:04:43 [DEBUG] root: eval: *terraform.EvalGetProvider
2017/06/05 13:04:43 [DEBUG] root: eval: *terraform.EvalReadState
2017/06/05 13:04:43 [DEBUG] root: eval: *terraform.EvalRefresh
2017/06/05 13:04:44 [ERROR] root: eval: *terraform.EvalRefresh, err: dns_a_record_set.www: Error querying DNS record: 3
2017/06/05 13:04:44 [ERROR] root: eval: *terraform.EvalSequence, err: dns_a_record_set.www: Error querying DNS record: 3
Error refreshing state: 1 error(s) occurred:
2017/06/05 13:04:44 [DEBUG] plugin: waiting for all plugin processes to complete...
2017/06/05 13:04:44 [DEBUG] plugin: terraform: dns-provider (internal) 2017/06/05 13:04:44 [DEBUG] plugin: waiting for all plugin processes to complete...

* dns_a_record_set.www: 1 error(s) occurred:

* dns_a_record_set.www: dns_a_record_set.www: Error querying DNS record: 3

Expected Behavior

if DNS record does not exist the zone should be created hence it does not exist.

Actual Behavior

terraform end's with an error

Steps to Reproduce

terraform apply

Important Factoids

With my limited go understanding, I think the hole problem is that terraform fail's based on the logic: "
fail on any RCode Value except 0"
This is behaviour is not correct, RCode 3 is a normal error that means that the queried record does not exist.

http://www.tcpipguide.com/free/t_DNSMessageHeaderandQuestionSectionFormat.htm

CNAME records fail to update upon parameter change

Terraform Version

Terraform v0.11.8

  • provider.dns v2.0.0

Affected Resource(s)

  • dns_cname_record

Terraform Configuration Files

provider "dns" {
update {
server = "1.2.3.4"
}
}

resource "dns_cname_record" "pilot-record" {
zone = "myzone.com."
name = "myname"
cname = "internal-lb.amazonaws.com."
ttl = 300
}

Expected Behavior

Terraform should re-create or update the record upon the cname parameter being changed.

Actual Behavior

*dns_cname_record.pilot-record: 1 error(s) occurred:
*dns_cname_record.pilot-record: DNS record differs

Steps to Reproduce

Please list the steps required to reproduce the issue, for example:

  1. terraform apply
  2. Change the cname parameter in the "dns_cname_record" resource.
  3. 'terraform apply`

For a workaround, I'm using terraform destroy -target "dns_cname_record.pilot-record" and then terraform apply

Should the DNS provider be able to re-create or update the CNAME record, or is the actual behavior expected?

Getting error that domain must be fully qualified

When trying to apply the example given at https://www.terraform.io/docs/providers/dns/r/dns_a_record_set.html I receive the following error:

dns_a_record_set.www: Error updating DNS record: dns: domain must be fully qualified

Terraform Version

$ terraform -v
Terraform v0.10.8

Affected Resource(s)

Please list the resources as a list, for example:

  • dns_ptr_record
  • dns_aaaa_record_set
  • dns_cname_record
  • dns_a_record_set

If this issue appears to affect multiple resources, it may be an issue with Terraform's core, so please mention this.

Terraform Configuration Files

provider "dns" {
    update {
        server = "REDACTED"
        key_name = "terraform"
        key_algorithm = "hmac-md5"
        key_secret = "REDACTED"
    }
}

resource "dns_ptr_record" "dns-sd" {
  zone = "example.com."
  name = "r._dns-sd"
  ptr  = "example.com."
  ttl  = 300
}

/*resource "dns_aaaa_record_set" "www" {
  zone = "example.com."
  name = "www"
  addresses = [
    "fdd5:e282:43b8:5303:dead:beef:cafe:babe",
    "fdd5:e282:43b8:5303:cafe:babe:dead:beef",
  ]
  ttl = 300
}*/

/*resource "dns_cname_record" "foo" {
  zone  = "example.com."
  name  = "foo"
  cname = "bar.example.com."
  ttl   = 300
}*/

/*resource "dns_a_record_set" "www" {
  zone = "example.com."
  name = "www"
  addresses = [
    "192.168.0.1",
    "192.168.0.2",
    "192.168.0.3",
  ]
  ttl = 300
}*/

Expected Behavior

Record should have been created.

Actual Behavior

Received error that the domain was not fully qualified, even though it was.

Steps to Reproduce

Please list the steps required to reproduce the issue, for example:

  1. Copy above config into main.tf and replace proper credentials
  2. terraform apply

Important Factoids

It's not just the examples. When I tried adding my own records I receive the same error.

References

  • GH-13095: I tried the fix in this issue, but got an authentication error instead.

dns a records without a timestamp

Hi there,

using dns_a_record_set creates a dns record successfully however it creates a record set with a timestamp. I can't see any option to create the record with a specified timestamp or for it to be set blank\empty, the issue with this is the dns scavenging will clean up these records for things like load balancers if no update is given.
https://social.technet.microsoft.com/wiki/contents/articles/21724.how-dns-aging-and-scavenging-works.aspx

Feature request to add a timestamp option.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.