-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Add import support to google_dns_record_set #895
Conversation
5a9d544
to
af2fb22
Compare
I tried out this PR, and it works great.
From the source code https://github.com/terraform-providers/terraform-provider-google/pull/895/files#diff-8bfe0d9a51bbbdf68e796b35fac038ffR297 the expected format is |
1b9f618
to
af72d1f
Compare
I fixed the error message and improved the docs slightly. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like it works, just one question.
google/resource_dns_record_set.go
Outdated
func resourceDnsRecordSetImportState(d *schema.ResourceData, _ interface{}) ([]*schema.ResourceData, error) { | ||
parts := strings.Split(d.Id(), "/") | ||
if len(parts) != 3 { | ||
return nil, fmt.Errorf("Invalid dns record specifier. Expecting {zone-name}/{record-name}/{record-type}") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think most people aren't going to know to add an extra . after the record name - might be a good place to tell them.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good idea. I also updated the docs to add a note about this.
* Add import support to google_dns_record_set * Add import test to NS record * Minimize diff change * Improve docs * Make error message more helpful * Add note about trailing dot at the end of the record name
Signed-off-by: Modular Magician <[email protected]>
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 👉 [email protected]. Thanks! |
Fixes #743