Skip to content

Commit 7048db6

Browse files
committed
fix: precommit errors
1 parent e28517a commit 7048db6

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

outputs.tf

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -180,21 +180,20 @@ output "dns_custom_resolver_id" {
180180
## DNS Zone and Records
181181
output "dns_zone_state" {
182182
description = "The state of the DNS zone."
183-
value = ibm_dns_zone.dns_zone[0].state
183+
value = length(ibm_dns_zone.dns_zone) > 0 ? ibm_dns_zone.dns_zone[0].state : null
184184
}
185185

186186
output "dns_zone" {
187187
description = "The ID of the DNS zone. The ID is composed of <instance_id>/<zone_id>"
188-
value = ibm_dns_zone.dns_zone[0].id
188+
value = length(ibm_dns_zone.dns_zone) > 0 ? ibm_dns_zone.dns_zone[0].id : null
189189
}
190190

191191
output "dns_zone_id" {
192192
description = "The ID of the zone that is associated with the DNS zone."
193-
value = ibm_dns_zone.dns_zone[0].zone_id
193+
value = length(ibm_dns_zone.dns_zone) > 0 ? ibm_dns_zone.dns_zone[0].zone_id : null
194194
}
195195

196196
output "dns_record_ids" {
197197
description = "List of all the domain resource records."
198-
# value = [for record in ibm_dns_record.dns_record : record.id]
199198
value = [for record in ibm_dns_resource_record.dns_record : record.id]
200199
}

0 commit comments

Comments
 (0)