Skip to content

Commit

Permalink
Make google_vpc_access_connector acc tests use a bootstrapped VPC n…
Browse files Browse the repository at this point in the history
…etwork (#10995) (#7560)

[upstream:207c6125a1bf60f774074a895b3cbecb6259be69]

Signed-off-by: Modular Magician <[email protected]>
  • Loading branch information
modular-magician authored Jun 18, 2024
1 parent a0e065c commit 82c7b94
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 13 deletions.
3 changes: 3 additions & 0 deletions .changelog/10995.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:none

```
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ func TestAccVPCAccessConnector_vpcAccessConnectorExample(t *testing.T) {
t.Parallel()

context := map[string]interface{}{
"network_name": acctest.BootstrapSharedServiceNetworkingConnection(t, "vpc-access-connector"),
"random_suffix": acctest.RandString(t, 10),
}

Expand All @@ -60,7 +61,7 @@ func testAccVPCAccessConnector_vpcAccessConnectorExample(context map[string]inte
resource "google_vpc_access_connector" "connector" {
name = "tf-test-vpc-con%{random_suffix}"
ip_cidr_range = "10.8.0.0/28"
network = "default"
network = "%{network_name}"
}
`, context)
}
Expand All @@ -69,6 +70,7 @@ func TestAccVPCAccessConnector_vpcAccessConnectorSharedVpcExample(t *testing.T)
t.Parallel()

context := map[string]interface{}{
"network_name": acctest.BootstrapSharedServiceNetworkingConnection(t, "vpc-access-connector"),
"random_suffix": acctest.RandString(t, 10),
}

Expand Down Expand Up @@ -104,12 +106,7 @@ resource "google_compute_subnetwork" "custom_test" {
name = "tf-test-vpc-con%{random_suffix}"
ip_cidr_range = "10.2.0.0/28"
region = "us-central1"
network = google_compute_network.custom_test.id
}
resource "google_compute_network" "custom_test" {
name = "tf-test-vpc-con%{random_suffix}"
auto_create_subnetworks = false
network = "%{network_name}"
}
`, context)
}
Expand Down
7 changes: 1 addition & 6 deletions website/docs/r/vpc_access_connector.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -64,12 +64,7 @@ resource "google_compute_subnetwork" "custom_test" {
name = "vpc-con"
ip_cidr_range = "10.2.0.0/28"
region = "us-central1"
network = google_compute_network.custom_test.id
}
resource "google_compute_network" "custom_test" {
name = "vpc-con"
auto_create_subnetworks = false
network = "default"
}
```

Expand Down

0 comments on commit 82c7b94

Please sign in to comment.