Skip to content

Commit

Permalink
Add backend service names to outputs for net-glb and net-ilb-l7 (some…
Browse files Browse the repository at this point in the history
… things like (#1258)

autoneg require names).

Co-authored-by: Ludovico Magnocavallo <ludomagno@google.com>
  • Loading branch information
rosmo and ludoo committed Mar 17, 2023
1 parent 230cbe4 commit 4b15fe4
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 8 deletions.
9 changes: 5 additions & 4 deletions modules/net-glb/README.md
Expand Up @@ -815,9 +815,10 @@ module "glb-0" {
|---|---|:---:|
| [address](outputs.tf#L17) | Forwarding rule address. | |
| [backend_service_ids](outputs.tf#L22) | Backend service resources. | |
| [forwarding_rule](outputs.tf#L29) | Forwarding rule resource. | |
| [group_ids](outputs.tf#L34) | Autogenerated instance group ids. | |
| [health_check_ids](outputs.tf#L41) | Autogenerated health check ids. | |
| [neg_ids](outputs.tf#L48) | Autogenerated network endpoint group ids. | |
| [backend_service_names](outputs.tf#L29) | Backend service resource names. | |
| [forwarding_rule](outputs.tf#L36) | Forwarding rule resource. | |
| [group_ids](outputs.tf#L41) | Autogenerated instance group ids. | |
| [health_check_ids](outputs.tf#L48) | Autogenerated health check ids. | |
| [neg_ids](outputs.tf#L55) | Autogenerated network endpoint group ids. | |

<!-- END TFDOC -->
7 changes: 7 additions & 0 deletions modules/net-glb/outputs.tf
Expand Up @@ -26,6 +26,13 @@ output "backend_service_ids" {
}
}

output "backend_service_names" {
description = "Backend service resource names."
value = {
for k, v in google_compute_backend_service.default : k => v.name
}
}

output "forwarding_rule" {
description = "Forwarding rule resource."
value = google_compute_global_forwarding_rule.default
Expand Down
9 changes: 5 additions & 4 deletions modules/net-ilb-l7/README.md
Expand Up @@ -630,9 +630,10 @@ module "ilb-l7" {
|---|---|:---:|
| [address](outputs.tf#L17) | Forwarding rule address. | |
| [backend_service_ids](outputs.tf#L22) | Backend service resources. | |
| [forwarding_rule](outputs.tf#L29) | Forwarding rule resource. | |
| [group_ids](outputs.tf#L34) | Autogenerated instance group ids. | |
| [health_check_ids](outputs.tf#L41) | Autogenerated health check ids. | |
| [neg_ids](outputs.tf#L48) | Autogenerated network endpoint group ids. | |
| [backend_service_names](outputs.tf#L29) | Backend service resource names. | |
| [forwarding_rule](outputs.tf#L36) | Forwarding rule resource. | |
| [group_ids](outputs.tf#L41) | Autogenerated instance group ids. | |
| [health_check_ids](outputs.tf#L48) | Autogenerated health check ids. | |
| [neg_ids](outputs.tf#L55) | Autogenerated network endpoint group ids. | |

<!-- END TFDOC -->
7 changes: 7 additions & 0 deletions modules/net-ilb-l7/outputs.tf
Expand Up @@ -26,6 +26,13 @@ output "backend_service_ids" {
}
}

output "backend_service_names" {
description = "Backend service resource names."
value = {
for k, v in google_compute_region_backend_service.default : k => v.name
}
}

output "forwarding_rule" {
description = "Forwarding rule resource."
value = google_compute_forwarding_rule.default
Expand Down

0 comments on commit 4b15fe4

Please sign in to comment.