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

Exporting existing DNSRecordSet to YAML #417

Open
denizdogan opened this issue Mar 4, 2021 · 4 comments
Open

Exporting existing DNSRecordSet to YAML #417

denizdogan opened this issue Mar 4, 2021 · 4 comments
Labels
question Further information is requested

Comments

@denizdogan
Copy link

Is there any way to export an existing DNS record set using the config-connector CLI? I can't find the resource name format in this link.

@denizdogan denizdogan added the question Further information is requested label Mar 4, 2021
@denizdogan
Copy link
Author

Even with bulk-export, I just get the corresponding DNSManagedZone, no DNSRecordSet.

@denizdogan
Copy link
Author

I am able to get some YAML output by using gcloud as such:

$ gcloud dns record-sets export outputfile -z=zone-name --project my-project

This generates output like this:

---
kind: dns#resourceRecordSet
name: my.domain.
rrdatas:
- ...
ttl: 21600
type: NS
---
kind: dns#resourceRecordSet
name: my.domain.
rrdatas:
- ...
ttl: 21600
type: SOA
---
...etc...

I could manually translate this into DNSRecordSet resources pretty easily, but it would still be good to know if there's something I'm missing in config-connector?

@maqiuyujoyce
Copy link
Collaborator

maqiuyujoyce commented Mar 4, 2021

Hi @denizdogan , thank you for reporting the issue. The config-connector tool is built on top of CAI (Cloud Asset Inventory), so if the resource is not supported by CAI, then it is not supported by config-connector tool. I think the link you mentioned is a proper reference to check CAI-supported resources, and according to it the DNS record set cannot be exported.

That being said, I noticed that the result of config-connector print-resources showed that DNSRecordSet is supported by bulk-export. Sorry for the confusion. I'll bring the bug back to the team. Will post updates when we have more information.

Currently, the workaround is to manually translate the DNS record sets you own into DNSResourceSet CRs.

@ianmarxent
Copy link

Any progress on getting export support for DNS Record Sets?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants