Fix health check autocreation and id output in passthrough LB modules (#1928)
* fix health check autocreation and id output * fix health check exclusion
This commit is contained in:
committed by
GitHub
parent
ca3c86cb5c
commit
537237edd6
@@ -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. | |
|
||||
<!-- END TFDOC -->
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user