Add Dynu brownfield DNS inventory outputs and generator

This commit is contained in:
beatz174-bit
2026-05-13 06:03:32 +10:00
parent 034ad17cf9
commit 52bd2d9fa2
5 changed files with 276 additions and 38 deletions
+28
View File
@@ -17,3 +17,31 @@ output "dynu_dns_inventory" {
records = local.dynu_dns_records_catalog
}
}
output "dynu_root_domain_id" {
description = "Dynu numeric domain ID resolved from dynu_root_domain."
value = data.dynu_dns_records.root.domain_id
}
output "dynu_root_domain_name" {
description = "Dynu root domain name resolved from dynu_root_domain."
value = data.dynu_dns_records.root.domain_name
}
output "dynu_dns_records" {
description = "Full read-only DNS record inventory returned by Dynu."
value = data.dynu_dns_records.root.records
}
output "dynu_dns_hostnames" {
description = "Sorted hostname list discovered for dynu_root_domain."
value = sort(distinct([for record in data.dynu_dns_records.root.records : record.hostname]))
}
output "dynu_dns_record_import_ids" {
description = "Map of generated Terraform resource names to provider import IDs in domain_id/record_id format."
value = {
for name, record in local.dynu_dns_record_name_map :
name => format("%s/%s", record.domain_id, record.id)
}
}