Improve dns

This commit is contained in:
Tobias Reisinger 2024-10-02 00:24:11 +02:00
parent 48a4f72e4f
commit 5d10e75ade
Signed by: serguzim
GPG key ID: 13AD60C237A28DFE
3 changed files with 41 additions and 19 deletions
modules/infrastructure

View file

@ -2,6 +2,8 @@ output "hosts" {
value = {
for subdomain in distinct([for record in ovh_domain_zone_record.server_records : record.subdomain]) :
subdomain => {
"hostname" = subdomain
"fqdn" = "${subdomain}.${ovh_domain_zone_record.server_records["${subdomain}:ipv4"].zone}"
"ipv4_address" = try(
ovh_domain_zone_record.server_records["${subdomain}:ipv4"].target,
null