Skip to content

Commit ba4fe8c

Browse files
Subnet and network names different (#4386) (#2857)
Signed-off-by: Modular Magician <[email protected]>
1 parent c23ffa9 commit ba4fe8c

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

.changelog/4386.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
```release-note:none
2+
3+
```

google-beta/data_source_google_compute_subnetwork_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ func TestAccDataSourceGoogleSubnetwork(t *testing.T) {
1616
Providers: testAccProviders,
1717
Steps: []resource.TestStep{
1818
{
19-
Config: testAccDataSourceGoogleSubnetwork(fmt.Sprintf("tf-test-subnetwork-ds-%d", randInt(t))),
19+
Config: testAccDataSourceGoogleSubnetwork(fmt.Sprintf("tf-test-subnetwork-ds-%d", randInt(t)), fmt.Sprintf("tf-test-subnetwork-ds-%d", randInt(t))),
2020
Check: resource.ComposeTestCheckFunc(
2121
testAccDataSourceGoogleSubnetworkCheck("data.google_compute_subnetwork.my_subnetwork", "google_compute_subnetwork.foobar"),
2222
testAccDataSourceGoogleSubnetworkCheck("data.google_compute_subnetwork.my_subnetwork_self_link", "google_compute_subnetwork.foobar"),
@@ -73,7 +73,7 @@ func testAccDataSourceGoogleSubnetworkCheck(data_source_name string, resource_na
7373
}
7474
}
7575

76-
func testAccDataSourceGoogleSubnetwork(name string) string {
76+
func testAccDataSourceGoogleSubnetwork(networkName, subnetName string) string {
7777
return fmt.Sprintf(`
7878
resource "google_compute_network" "foobar" {
7979
name = "%s"
@@ -99,5 +99,5 @@ data "google_compute_subnetwork" "my_subnetwork" {
9999
data "google_compute_subnetwork" "my_subnetwork_self_link" {
100100
self_link = google_compute_subnetwork.foobar.self_link
101101
}
102-
`, name, name)
102+
`, networkName, subnetName)
103103
}

0 commit comments

Comments
 (0)