Skip to content

Commit f46913a

Browse files
committed
fix(outputs): simplify DNS zone output values using try function
1 parent bcaaa9d commit f46913a

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/modules/landing-zone/outputs.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,12 @@ output "project_name" {
1515

1616
output "dns_zone_dns_name" {
1717
description = "The DNS name of the landing zone's child DNS zone."
18-
value = var.dns_zone_name != null ? stackit_dns_zone.this[0].dns_name : null
18+
value = try(stackit_dns_zone.this[0].dns_name, null)
1919
}
2020

2121
output "dns_zone_id" {
2222
description = "The ID of the landing zone's child DNS zone."
23-
value = var.dns_zone_name != null ? stackit_dns_zone.this[0].zone_id : null
23+
value = try(stackit_dns_zone.this[0].zone_id, null)
2424
}
2525

2626
output "connected_network_area_id" {

0 commit comments

Comments
 (0)