Skip to content

Commit 03d405c

Browse files
authored
fix: fixing outputs.tf for backend for apphub check (#525)
1 parent 3be7be4 commit 03d405c

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

modules/backend/outputs.tf

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,14 @@ output "backend_service_info" {
3232
}
3333

3434
output "apphub_service_uri" {
35-
value = [
36-
{
37-
service_uri = "//compute.googleapis.com/${google_compute_backend_service.default[0].id}"
38-
service_id = substr("${google_compute_backend_service.default[0].name}-${md5("global-be-service-${var.project_id}")}", 0, 63)
39-
location = "global"
40-
}
41-
]
35+
value = concat(
36+
!local.is_backend_bucket ? [
37+
{
38+
service_uri = "//compute.googleapis.com/${google_compute_backend_service.default[0].id}"
39+
service_id = substr("${google_compute_backend_service.default[0].name}-${md5("global-be-service-${var.project_id}")}", 0, 63)
40+
location = "global"
41+
}
42+
] : [],
43+
)
4244
description = "Service URI in CAIS style to be used by Apphub."
4345
}

0 commit comments

Comments
 (0)