diff --git a/modules/net-lb-ext/README.md b/modules/net-lb-ext/README.md index 4e0d7d8af9..674848cccc 100644 --- a/modules/net-lb-ext/README.md +++ b/modules/net-lb-ext/README.md @@ -290,7 +290,7 @@ module "nlb" { | [group_self_links](outputs.tf#L53) | Optional unmanaged instance group self links. | | | [groups](outputs.tf#L60) | Optional unmanaged instance group resources. | | | [health_check](outputs.tf#L65) | Auto-created health-check resource. | | -| [health_check_self_id](outputs.tf#L70) | Auto-created health-check self id. | | +| [health_check_id](outputs.tf#L70) | Auto-created health-check id. | | | [health_check_self_link](outputs.tf#L75) | Auto-created health-check self link. | | | [id](outputs.tf#L80) | Fully qualified forwarding rule ids. | | diff --git a/modules/net-lb-ext/health-check.tf b/modules/net-lb-ext/health-check.tf index d41a437dfe..d5208f08ab 100644 --- a/modules/net-lb-ext/health-check.tf +++ b/modules/net-lb-ext/health-check.tf @@ -17,7 +17,9 @@ # tfdoc:file:description Health check resource. locals { - hc = var.health_check_config + hc = ( + var.health_check != null ? null : var.health_check_config + ) hc_grpc = try(local.hc.grpc, null) != null hc_http = try(local.hc.http, null) != null hc_http2 = try(local.hc.http2, null) != null diff --git a/modules/net-lb-ext/outputs.tf b/modules/net-lb-ext/outputs.tf index bd3f383a39..0868e8325b 100644 --- a/modules/net-lb-ext/outputs.tf +++ b/modules/net-lb-ext/outputs.tf @@ -67,8 +67,8 @@ output "health_check" { value = try(google_compute_region_health_check.default.0, null) } -output "health_check_self_id" { - description = "Auto-created health-check self id." +output "health_check_id" { + description = "Auto-created health-check id." value = try(google_compute_region_health_check.default.0.id, null) } diff --git a/modules/net-lb-int/README.md b/modules/net-lb-int/README.md index 39344d5f8c..e1d9fd56c8 100644 --- a/modules/net-lb-int/README.md +++ b/modules/net-lb-int/README.md @@ -331,7 +331,7 @@ module "ilb" { | [group_self_links](outputs.tf#L56) | Optional unmanaged instance group self links. | | | [groups](outputs.tf#L63) | Optional unmanaged instance group resources. | | | [health_check](outputs.tf#L68) | Auto-created health-check resource. | | -| [health_check_self_id](outputs.tf#L73) | Auto-created health-check self id. | | +| [health_check_id](outputs.tf#L73) | Auto-created health-check id. | | | [health_check_self_link](outputs.tf#L78) | Auto-created health-check self link. | | | [id](outputs.tf#L83) | Fully qualified forwarding rule ids. | | diff --git a/modules/net-lb-int/health-check.tf b/modules/net-lb-int/health-check.tf index c9525878ae..4f5af03e79 100644 --- a/modules/net-lb-int/health-check.tf +++ b/modules/net-lb-int/health-check.tf @@ -17,7 +17,9 @@ # tfdoc:file:description Health check resource. locals { - hc = var.health_check_config + hc = ( + var.health_check != null ? null : var.health_check_config + ) hc_grpc = try(local.hc.grpc, null) != null hc_http = try(local.hc.http, null) != null hc_http2 = try(local.hc.http2, null) != null diff --git a/modules/net-lb-int/outputs.tf b/modules/net-lb-int/outputs.tf index c4dabbb743..e78476fbf5 100644 --- a/modules/net-lb-int/outputs.tf +++ b/modules/net-lb-int/outputs.tf @@ -70,8 +70,8 @@ output "health_check" { value = try(google_compute_health_check.default.0, null) } -output "health_check_self_id" { - description = "Auto-created health-check self id." +output "health_check_id" { + description = "Auto-created health-check id." value = try(google_compute_health_check.default.0.id, null) } diff --git a/modules/net-lb-proxy-int/README.md b/modules/net-lb-proxy-int/README.md index 85f9716c62..0e03635371 100644 --- a/modules/net-lb-proxy-int/README.md +++ b/modules/net-lb-proxy-int/README.md @@ -90,7 +90,7 @@ module "int-tcp-proxy" { subnetwork = var.subnet.self_link } } -# tftest modules=1 resources=4 +# tftest modules=1 resources=3 ``` ### Instance Groups @@ -315,7 +315,7 @@ module "int-tcp-proxy" { | [group_self_links](outputs.tf#L37) | Optional unmanaged instance group self links. | | | [groups](outputs.tf#L44) | Optional unmanaged instance group resources. | | | [health_check](outputs.tf#L49) | Auto-created health-check resource. | | -| [health_check_self_id](outputs.tf#L54) | Auto-created health-check self id. | | +| [health_check_id](outputs.tf#L54) | Auto-created health-check id. | | | [health_check_self_link](outputs.tf#L59) | Auto-created health-check self link. | | | [id](outputs.tf#L64) | Fully qualified forwarding rule id. | | | [neg_ids](outputs.tf#L69) | Autogenerated network endpoint group ids. | | diff --git a/modules/net-lb-proxy-int/health-check.tf b/modules/net-lb-proxy-int/health-check.tf index 8c0ff4f114..5ec01c255e 100644 --- a/modules/net-lb-proxy-int/health-check.tf +++ b/modules/net-lb-proxy-int/health-check.tf @@ -17,7 +17,9 @@ # tfdoc:file:description Health check resource. locals { - hc = var.health_check_config + hc = ( + var.health_check != null ? null : var.health_check_config + ) hc_grpc = try(local.hc.grpc, null) != null hc_http = try(local.hc.http, null) != null hc_http2 = try(local.hc.http2, null) != null diff --git a/modules/net-lb-proxy-int/outputs.tf b/modules/net-lb-proxy-int/outputs.tf index 2bd35ee35f..092bae7a3b 100644 --- a/modules/net-lb-proxy-int/outputs.tf +++ b/modules/net-lb-proxy-int/outputs.tf @@ -51,8 +51,8 @@ output "health_check" { value = try(google_compute_region_health_check.default.0, null) } -output "health_check_self_id" { - description = "Auto-created health-check self id." +output "health_check_id" { + description = "Auto-created health-check id." value = try(google_compute_region_health_check.default.0.id, null) }