Skip to content

Commit 774b089

Browse files
committed
fix: improved dns zone resource conditional logic
1 parent 7cd90b8 commit 774b089

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -359,7 +359,7 @@ resource "ibm_is_flow_log" "flow_logs" {
359359
# ##############################################################################
360360

361361
resource "ibm_dns_zone" "dns_zone" {
362-
count = var.enable_hub && !var.skip_custom_resolver_hub_creation ? 1 : 0
362+
count = var.enable_hub && !var.skip_custom_resolver_hub_creation && length(var.dns_zone_name) > 0 ? 1 : 0
363363
name = var.dns_zone_name
364364
instance_id = var.use_existing_dns_instance ? var.existing_dns_instance_id : ibm_resource_instance.dns_instance_hub[0].guid
365365
description = var.dns_zone_description

0 commit comments

Comments
 (0)