@@ -188,14 +188,6 @@ func TestAccComputeSubnetwork_secondaryIpRanges(t *testing.T) {
188
188
testAccCheckComputeSubnetworkHasSecondaryIpRange(&subnetwork, "tf-test-secondary-range-update2", "192.168.11.0/24"),
189
189
),
190
190
},
191
- {
192
- Config: testAccComputeSubnetwork_secondaryIpRanges_update4(cnName, subnetworkName),
193
- Check: resource.ComposeTestCheckFunc(
194
- testAccCheckComputeSubnetworkExists(t, "google_compute_subnetwork.network-with-private-secondary-ip-ranges", &subnetwork),
195
- testAccCheckComputeSubnetworkHasNotSecondaryIpRange(&subnetwork, "tf-test-secondary-range-update1", "192.168.10.0/24"),
196
- testAccCheckComputeSubnetworkHasNotSecondaryIpRange(&subnetwork, "tf-test-secondary-range-update2", "192.168.11.0/24"),
197
- ),
198
- },
199
191
{
200
192
Config: testAccComputeSubnetwork_secondaryIpRanges_update1(cnName, subnetworkName),
201
193
Check: resource.ComposeTestCheckFunc(
@@ -244,12 +236,6 @@ func TestAccComputeSubnetwork_secondaryIpRanges_sendEmpty(t *testing.T) {
244
236
testAccCheckComputeSubnetworkHasNotSecondaryIpRange(&subnetwork, "tf-test-secondary-range-update1", "192.168.10.0/24"),
245
237
),
246
238
},
247
- // Check that empty block secondary_ip_range = [] is not different
248
- {
249
- Config: testAccComputeSubnetwork_sendEmpty_emptyBlock(cnName, subnetworkName, "true"),
250
- PlanOnly: true,
251
- ExpectNonEmptyPlan: false,
252
- },
253
239
// Apply two secondary_ip_range
254
240
{
255
241
Config: testAccComputeSubnetwork_sendEmpty_double(cnName, subnetworkName, "true"),
@@ -282,14 +268,6 @@ func TestAccComputeSubnetwork_secondaryIpRanges_sendEmpty(t *testing.T) {
282
268
PlanOnly: true,
283
269
ExpectNonEmptyPlan: false,
284
270
},
285
- // Remove with empty block []
286
- {
287
- Config: testAccComputeSubnetwork_sendEmpty_emptyBlock(cnName, subnetworkName, "true"),
288
- Check: resource.ComposeTestCheckFunc(
289
- testAccCheckComputeSubnetworkExists(t, "google_compute_subnetwork.network-with-private-secondary-ip-ranges", &subnetwork),
290
- testAccCheckComputeSubnetworkHasNotSecondaryIpRange(&subnetwork, "tf-test-secondary-range-update1", "192.168.10.0/24"),
291
- ),
292
- },
293
271
},
294
272
})
295
273
}
@@ -691,23 +669,6 @@ resource "google_compute_subnetwork" "network-with-private-secondary-ip-ranges"
691
669
`, cnName, subnetworkName)
692
670
}
693
671
694
- func testAccComputeSubnetwork_secondaryIpRanges_update4(cnName, subnetworkName string) string {
695
- return fmt.Sprintf(`
696
- resource "google_compute_network" "custom-test" {
697
- name = "%s"
698
- auto_create_subnetworks = false
699
- }
700
-
701
- resource "google_compute_subnetwork" "network-with-private-secondary-ip-ranges" {
702
- name = "%s"
703
- ip_cidr_range = "10.2.0.0/16"
704
- region = "us-central1"
705
- network = google_compute_network.custom-test.self_link
706
- secondary_ip_range = []
707
- }
708
- `, cnName, subnetworkName)
709
- }
710
-
711
672
func testAccComputeSubnetwork_sendEmpty_removed(cnName, subnetworkName, sendEmpty string) string {
712
673
return fmt.Sprintf(`
713
674
resource "google_compute_network" "custom-test" {
@@ -725,24 +686,6 @@ resource "google_compute_subnetwork" "network-with-private-secondary-ip-ranges"
725
686
`, cnName, subnetworkName, sendEmpty)
726
687
}
727
688
728
- func testAccComputeSubnetwork_sendEmpty_emptyBlock(cnName, subnetworkName, sendEmpty string) string {
729
- return fmt.Sprintf(`
730
- resource "google_compute_network" "custom-test" {
731
- name = "%s"
732
- auto_create_subnetworks = false
733
- }
734
-
735
- resource "google_compute_subnetwork" "network-with-private-secondary-ip-ranges" {
736
- name = "%s"
737
- ip_cidr_range = "10.2.0.0/16"
738
- region = "us-central1"
739
- network = google_compute_network.custom-test.self_link
740
- secondary_ip_range = []
741
- send_secondary_ip_range_if_empty = "%s"
742
- }
743
- `, cnName, subnetworkName, sendEmpty)
744
- }
745
-
746
689
func testAccComputeSubnetwork_sendEmpty_single(cnName, subnetworkName, sendEmpty string) string {
747
690
return fmt.Sprintf(`
748
691
resource "google_compute_network" "custom-test" {
0 commit comments