From d0f346f6c63060ee84a60644ed6a4ac8eb091bd4 Mon Sep 17 00:00:00 2001 From: Julio Diez Date: Thu, 9 Mar 2023 15:35:13 +0100 Subject: [PATCH] Add resources created as outputs --- modules/ncc-spoke-ra/README.md | 6 ++++-- modules/ncc-spoke-ra/outputs.tf | 16 +++++++++++++--- 2 files changed, 17 insertions(+), 5 deletions(-) diff --git a/modules/ncc-spoke-ra/README.md b/modules/ncc-spoke-ra/README.md index 8cd5869c..58f5cd91 100644 --- a/modules/ncc-spoke-ra/README.md +++ b/modules/ncc-spoke-ra/README.md @@ -137,7 +137,7 @@ module "spoke-ra" { | [project_id](variables.tf#L37) | The ID of the project where the NCC hub & spokes will be created. | string | ✓ | | | [region](variables.tf#L42) | Region where the spoke is located. | string | ✓ | | | [router_appliances](variables.tf#L47) | List of router appliances this spoke is associated with. | list(object({…})) | ✓ | | -| [router_config](variables.tf#L55) | Configuration of the Cloud Router. | object({…}) | ✓ | | +| [router_config](variables.tf#L55) | Configuration of the Cloud Router. | object({…}) | ✓ | | | [vpc_config](variables.tf#L70) | Network and subnetwork for the CR interfaces. | object({…}) | ✓ | | | [data_transfer](variables.tf#L17) | Site-to-site data transfer feature, available only in some regions. | bool | | false | @@ -145,6 +145,8 @@ module "spoke-ra" { | name | description | sensitive | |---|---|:---:| -| [hub_name](outputs.tf#L17) | NCC hub name (only if auto-created). | | +| [hub](outputs.tf#L17) | NCC hub resource (only if auto-created). | | +| [router](outputs.tf#L22) | Cloud Router resource. | | +| [spoke-ra](outputs.tf#L27) | NCC spoke resource. | | diff --git a/modules/ncc-spoke-ra/outputs.tf b/modules/ncc-spoke-ra/outputs.tf index 2f2c0a40..d1bfdb36 100644 --- a/modules/ncc-spoke-ra/outputs.tf +++ b/modules/ncc-spoke-ra/outputs.tf @@ -14,7 +14,17 @@ * limitations under the License. */ -output "hub_name" { - description = "NCC hub name (only if auto-created)." - value = one(google_network_connectivity_hub.hub[*].name) +output "hub" { + description = "NCC hub resource (only if auto-created)." + value = one(google_network_connectivity_hub.hub[*]) +} + +output "router" { + description = "Cloud Router resource." + value = google_compute_router.cr +} + +output "spoke-ra" { + description = "NCC spoke resource." + value = google_network_connectivity_spoke.spoke-ra }