From 2a7c753cd40c4cc74307346e71e9472917d0ae99 Mon Sep 17 00:00:00 2001 From: David Gleich Date: Thu, 26 Sep 2024 14:24:35 +0000 Subject: [PATCH] Fix permadiff in output --- examples/network_connectivity_center/main.tf | 26 +------------------ .../network_connectivity_center/outputs.tf | 7 +---- 2 files changed, 2 insertions(+), 31 deletions(-) diff --git a/examples/network_connectivity_center/main.tf b/examples/network_connectivity_center/main.tf index 85d9380e..f6345c8f 100644 --- a/examples/network_connectivity_center/main.tf +++ b/examples/network_connectivity_center/main.tf @@ -47,10 +47,7 @@ module "network_connectivity_center" { virtual_machine = google_compute_instance.router_appliance_1.id ip_address = google_compute_instance.router_appliance_1.network_interface[0].network_ip }, - { - virtual_machine = google_compute_instance.router_appliance_2.id - ip_address = google_compute_instance.router_appliance_2.network_interface[0].network_ip - } + ] location = var.instance_region site_to_site_data_transfer = false @@ -248,24 +245,3 @@ resource "google_compute_instance" "router_appliance_1" { } } } - -resource "google_compute_instance" "router_appliance_2" { - name = "fake-router-appliance-2" - machine_type = "e2-medium" - project = var.project_id - can_ip_forward = true - zone = random_shuffle.zone.result[0] - - boot_disk { - initialize_params { - image = "debian-cloud/debian-11" - } - } - - network_interface { - subnetwork = module.router_appliance_spoke_vpc.subnets["${var.instance_region}/router-appliance-subnet-01"].id - access_config { - network_tier = "PREMIUM" - } - } -} diff --git a/examples/network_connectivity_center/outputs.tf b/examples/network_connectivity_center/outputs.tf index 668497cd..1ac306ba 100644 --- a/examples/network_connectivity_center/outputs.tf +++ b/examples/network_connectivity_center/outputs.tf @@ -21,12 +21,7 @@ output "project_id" { output "ncc_hub_name" { description = "Name of the NCC Hub (required for testing)" - value = module.network_connectivity_center.ncc_hub.name -} - -output "ncc_hub" { - description = "The NCC Hub object" - value = module.network_connectivity_center.ncc_hub + value = element(reverse(split("/", module.network_connectivity_center.ncc_hub.name)), 0) } output "vpc_spokes" {