Hi everybody, I created some DNS records in Cloud...
# general
f
Hi everybody, I created some DNS records in Cloudflare like this:
Copy code
export const record = new cloudflare.Record("hello-world-record", {
  zoneId: "1234.....",
  name: "www",
  value: "192.0.2.1",
  type: "A",
  proxied: true
});
Could you please help me to retrieve the
zoneId
from a zone name (example.com)? Is that possible? Thank you.
l
Hey Jon -- do you mean something like
getZone
(https://www.pulumi.com/registry/packages/cloudflare/api-docs/getzone/)?
Or do you mean using e.g. (in your example)
record.id
f
YES! getZone should work, I'll try it out tomorrow. THank you!
l
No problem 🙂 Let us know how you get on!
f
It is working and with explicit providers feature:
Copy code
cloudflare.getZone({accountId: x, name: y}, { provider: z}).then(x => x.id)
THank you!
l
Glad to hear!