Skip to content
This repository has been archived by the owner on Sep 3, 2024. It is now read-only.

add more record type properties #662

Merged
merged 2 commits into from
Aug 13, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 20 additions & 1 deletion src/steps/resource-manager/dns/converters.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,28 @@ export function createDnsRecordSetEntity(
type: getDomainRecordTypeFromAzureRecordSet(data),
fqdn: data.fqdn,
provisioningState: data.provisioningState,
cnameRecord: data.cnameRecord?.cname,
azureType: data.type,
webLink: webLinker.portalResourceUrl(data.id),
// CNAME type
cnameRecord: data.cnameRecord?.cname,
// SOA type
soaRecordHost: data.soaRecord?.host,
soaRecordEmail: data.soaRecord?.email,
soaRecordserialNumber: data.soaRecord?.serialNumber,
// A type
aRecordsIps: data.aRecords?.map((r) => r.ipv4Address),
// AAAA type
aaaaRecordsIps: data.aaaaRecords?.map((r) => r.ipv6Address),
// NS type
nsRecordsNames: data.nsRecords?.map((r) => r.nsdname),
// MX type
mxRecordsExchanges: data.mxRecords?.map((r) => r.exchange),
// TXT type
txtRecordsValues: data.txtRecords?.map((r) => r.value?.join(',')),
// PTR type
ptrRecordsNames: data.ptrRecords?.map((r) => r.ptrdname),
// SRV type
srvRecordsTargets: data.srvRecords?.map((r) => `${r.target}:${r.port}`),
},
},
});
Expand Down
Loading