Add Dynu brownfield DNS inventory outputs and generator
This commit is contained in:
@@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user