From e9441b8c986cb4facf0d61c12394427332d2cc19 Mon Sep 17 00:00:00 2001 From: Dana Hoffman Date: Fri, 28 Dec 2018 16:57:07 -0800 Subject: [PATCH] add vpntunnel resourcerefs --- products/compute/api.yaml | 19 ++++++++++++------- .../tests/resource_compute_vpn_tunnel_test.go | 3 +++ 2 files changed, 15 insertions(+), 7 deletions(-) diff --git a/products/compute/api.yaml b/products/compute/api.yaml index d9faa0af328b..49462379ee50 100644 --- a/products/compute/api.yaml +++ b/products/compute/api.yaml @@ -2974,9 +2974,10 @@ objects: description: | Network IP address of an instance that should handle matching packets. input: true - # TODO(nelsonjr): Make this a ResourceRef when VpnTunnel is submitted. - - !ruby/object:Api::Type::String + - !ruby/object:Api::Type::ResourceRef name: 'nextHopVpnTunnel' + resource: 'VpnTunnel' + imports: 'selfLink' description: | URL to a VpnTunnel that should handle matching packets. input: true @@ -4086,21 +4087,25 @@ objects: - !ruby/object:Api::Type::Array name: 'tunnels' description: | - A list of references to VpnTunnel resources associated to this VPN gateway. - # TODO(nelsonjr): Make this a ResourceRef when VpnTunnel is submitted. - item_type: Api::Type::String + A list of references to VpnTunnel resources associated with this VPN gateway. + item_type: !ruby/object:Api::Type::ResourceRef + name: 'tunnel' + resource: 'VpnTunnel' + imports: 'selfLink' + description: | + A VpnTunnel resource associated with this VPN gateway. output: true - !ruby/object:Api::Type::Array name: 'forwardingRules' description: | - A list of references to the ForwardingRule resources associated to this VPN + A list of references to the ForwardingRule resources associated with this VPN gateway. item_type: !ruby/object:Api::Type::ResourceRef name: 'forwardingRule' resource: 'ForwardingRule' imports: 'selfLink' description: | - A ForwardingRule resource associated to this VPN gateway. + A ForwardingRule resource associated with this VPN gateway. output: true # status is not useful for state convergence - !ruby/object:Api::Resource diff --git a/third_party/terraform/tests/resource_compute_vpn_tunnel_test.go b/third_party/terraform/tests/resource_compute_vpn_tunnel_test.go index b707191797d7..26993c7a6820 100644 --- a/third_party/terraform/tests/resource_compute_vpn_tunnel_test.go +++ b/third_party/terraform/tests/resource_compute_vpn_tunnel_test.go @@ -105,6 +105,7 @@ func testAccComputeVpnTunnel_basic() string { return fmt.Sprintf(` resource "google_compute_network" "foobar" { name = "tunnel-test-%s" + auto_create_subnetworks = false } resource "google_compute_subnetwork" "foobar" { name = "tunnel-test-subnetwork-%s" @@ -161,6 +162,7 @@ func testAccComputeVpnTunnel_regionFromGateway(region string) string { return fmt.Sprintf(` resource "google_compute_network" "foobar" { name = "tunnel-test-%s" + auto_create_subnetworks = false } resource "google_compute_subnetwork" "foobar" { name = "tunnel-test-subnetwork-%s" @@ -219,6 +221,7 @@ func testAccComputeVpnTunnelRouter(router string) string { return fmt.Sprintf(` resource "google_compute_network" "foobar" { name = "tunnel-test-%s" + auto_create_subnetworks = false } resource "google_compute_subnetwork" "foobar" { name = "tunnel-test-subnetwork-%s"