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

google_dns_record_set #232

Closed
qgriffith-zz opened this issue Jul 24, 2017 · 2 comments · Fixed by #266
Closed

google_dns_record_set #232

qgriffith-zz opened this issue Jul 24, 2017 · 2 comments · Fixed by #266
Assignees
Labels

Comments

@qgriffith-zz
Copy link

Terraform Version

Terraform v0.9.11

Affected Resource(s)

  • google_dns_record_set TXT records

Terraform Configuration Files

resource "google_dns_record_set" "foo-TXT" {
   name = "on-site.com."
   managed_zone = "${google_dns_managed_zone.on-site-com.name}"
   type = "TXT"
   ttl = "300"
   rrdatas = ["v=spf1 blah foo bar ]
}

Expected Behavior

Creates a TXT record as a single string

"v=spf1 blah foo bar"

Actual Behavior

It is quoting everything in between the spaces which create an invalid SPF record

"v=spf1" "blah" "foo" "bar"

When I add the record via the Google Console it is created properly something in terraform is adding the quotes to everything separated by a space

Steps to Reproduce

  1. Create a TXT type record with a long string
  2. Run terraform apply
  3. Look in the google console or use dig to see that the record contains several strings instead of a single string with qutoes.

References

This was fixed for another provider
hashicorp/terraform#13260

@grubernaut grubernaut added the bug label Jul 25, 2017
@rosbo rosbo self-assigned this Jul 27, 2017
@rosbo
Copy link
Contributor

rosbo commented Jul 28, 2017

Hi,

Duplicate of #13463.

The behavior of splitting on spaces and quoting each chunk comes from the GCloud API, not Terraform. See issue linked above for background.

The work around is to add \" around your string. Your configuration should be:

rrdatas = ["\"v=spf1 blah foo bar\""]

I will update the documentation.

Thank you!

@ghost
Copy link

ghost commented Mar 31, 2020

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

If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. If you feel I made an error 🤖 🙉 , please reach out to my human friends 👉 hashibot-feedback@hashicorp.com. Thanks!

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

Successfully merging a pull request may close this issue.

3 participants