Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

provider/ns1/record SPF record creation misbehavior #12758

Closed
parky opened this issue Mar 16, 2017 · 2 comments
Closed

provider/ns1/record SPF record creation misbehavior #12758

parky opened this issue Mar 16, 2017 · 2 comments

Comments

@parky
Copy link

parky commented Mar 16, 2017

Terraform Version

Terraform v0.9.0
same with v0.8.8

Affected Resource(s)

Please list the resources as a list, for example:

  • ns1_record

Terraform Configuration Files

provider "ns1" {
  apikey = "${var.ns1_apikey}"
}
resource "ns1_zone" "tld" {
  zone = "terraform.example"
}
resource "ns1_record" "txt" {
  zone              = "${ns1_zone.tld.zone}"
  domain            = "${ns1_zone.tld.zone}"
  type              = "TXT"
  ttl               = 86400
  use_client_subnet = "true"
  answers = {
    answer = "v=DKIM1; k=rsa; p=XXXXXXXX"
  }
}
resource "ns1_record" "spf" {
  zone              = "${ns1_zone.tld.zone}"
  domain            = "${ns1_zone.tld.zone}"
  type              = "SPF"
  ttl               = 86400
  use_client_subnet = "true"
  answers = {
    answer = "v=DKIM1; k=rsa; p=XXXXXXXX"
  }
}

Debug Output

https://gist.github.com/parky/f2f1c9491c459ff87c168441e843d5d9

Panic Output

No

Expected Behavior

host -t SPF terraform.example dns1.p03.nsone.net should return
terraform.example has SPF record "v=DKIM1; k=rsa; p=XXXXXXXX"

Actual Behavior

host -t SPF terraform.example dns1.p03.nsone.net returns
terraform.example has SPF record "v=DKIM1;" "k=rsa;" "p=XXXXXXXX"

Steps to Reproduce

  1. terraform apply
  2. host -t SPF terraform.example dns1.p03.nsone.net

Important Factoids

Inserting SPF record lead to response where there are quotes between all parts delimited with space instead of an answer which has quotes only at the beginning and at the end.
This does not happen when the record is inserted via the web interface or via the API like:
curl -X PUT -H 'X-NSONE-Key: myNS1apikey' -d '{"zone":"terraform.example", "domain":"terraform.example", "type":"SPF", "answers":[{"answer":["v=DKIM1; k=rsa; p=XXXXXXXX"]}]}' https://api.nsone.net/v1/zones/terraform.example/terraform.example/SPF

References

@radeksimko
Copy link
Member

Closed via #13260

@ghost
Copy link

ghost commented Apr 14, 2020

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

If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@ghost ghost locked and limited conversation to collaborators Apr 14, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants