Skip to content

Commit

Permalink
Added service URI as output to Cloud Run service
Browse files Browse the repository at this point in the history
  • Loading branch information
apichick committed Aug 6, 2024
1 parent 2d856ea commit fa05bb3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
3 changes: 2 additions & 1 deletion modules/cloud-run-v2/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -465,7 +465,8 @@ module "cloud_run" {
| [service_account_email](outputs.tf#L37) | Service account email. | |
| [service_account_iam_email](outputs.tf#L42) | Service account email. | |
| [service_name](outputs.tf#L50) | Cloud Run service name. | |
| [vpc_connector](outputs.tf#L55) | VPC connector resource if created. | |
| [service_uri](outputs.tf#L55) | Main URI in which the service is serving traffic. | |
| [vpc_connector](outputs.tf#L60) | VPC connector resource if created. | |

## Fixtures

Expand Down
5 changes: 5 additions & 0 deletions modules/cloud-run-v2/outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,11 @@ output "service_name" {
value = var.create_job ? null : google_cloud_run_v2_service.service[0].name
}

output "service_uri" {
description = "Main URI in which the service is serving traffic."
value = var.create_job ? null : google_cloud_run_v2_service.service[0].uri
}

output "vpc_connector" {
description = "VPC connector resource if created."
value = try(google_vpc_access_connector.connector[0].id, null)
Expand Down

0 comments on commit fa05bb3

Please sign in to comment.