Skip to content

Commit 4e068e9

Browse files
GA ipsec interconnect tests (#4983) (#3437)
Signed-off-by: Modular Magician <[email protected]>
1 parent 30473cb commit 4e068e9

7 files changed

+24
-29
lines changed

.changelog/4983.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/resource_compute_ha_vpn_gateway_generated_test.go

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -282,20 +282,25 @@ func TestAccComputeHaVpnGateway_computeHaVpnGatewayEncryptedInterconnectExample(
282282

283283
vcrTest(t, resource.TestCase{
284284
PreCheck: func() { testAccPreCheck(t) },
285-
Providers: testAccProvidersOiCS,
285+
Providers: testAccProviders,
286286
CheckDestroy: testAccCheckComputeHaVpnGatewayDestroyProducer(t),
287287
Steps: []resource.TestStep{
288288
{
289289
Config: testAccComputeHaVpnGateway_computeHaVpnGatewayEncryptedInterconnectExample(context),
290290
},
291+
{
292+
ResourceName: "google_compute_ha_vpn_gateway.vpn-gateway",
293+
ImportState: true,
294+
ImportStateVerify: true,
295+
ImportStateVerifyIgnore: []string{"network", "region"},
296+
},
291297
},
292298
})
293299
}
294300

295301
func testAccComputeHaVpnGateway_computeHaVpnGatewayEncryptedInterconnectExample(context map[string]interface{}) string {
296302
return Nprintf(`
297303
resource "google_compute_ha_vpn_gateway" "vpn-gateway" {
298-
provider = google-beta
299304
name = "tf-test-test-ha-vpngw%{random_suffix}"
300305
network = google_compute_network.network.id
301306
vpn_interfaces {
@@ -309,7 +314,6 @@ resource "google_compute_ha_vpn_gateway" "vpn-gateway" {
309314
}
310315
311316
resource "google_compute_interconnect_attachment" "attachment1" {
312-
provider = google-beta
313317
name = "tf-test-test-interconnect-attachment1%{random_suffix}"
314318
edge_availability_domain = "AVAILABILITY_DOMAIN_1"
315319
type = "PARTNER"
@@ -321,7 +325,6 @@ resource "google_compute_interconnect_attachment" "attachment1" {
321325
}
322326
323327
resource "google_compute_interconnect_attachment" "attachment2" {
324-
provider = google-beta
325328
name = "tf-test-test-interconnect-attachment2%{random_suffix}"
326329
edge_availability_domain = "AVAILABILITY_DOMAIN_2"
327330
type = "PARTNER"
@@ -333,7 +336,6 @@ resource "google_compute_interconnect_attachment" "attachment2" {
333336
}
334337
335338
resource "google_compute_address" "address1" {
336-
provider = google-beta
337339
name = "tf-test-test-address1%{random_suffix}"
338340
address_type = "INTERNAL"
339341
purpose = "IPSEC_INTERCONNECT"
@@ -343,7 +345,6 @@ resource "google_compute_address" "address1" {
343345
}
344346
345347
resource "google_compute_address" "address2" {
346-
provider = google-beta
347348
name = "tf-test-test-address2%{random_suffix}"
348349
address_type = "INTERNAL"
349350
purpose = "IPSEC_INTERCONNECT"
@@ -353,7 +354,6 @@ resource "google_compute_address" "address2" {
353354
}
354355
355356
resource "google_compute_router" "router" {
356-
provider = google-beta
357357
name = "tf-test-test-router%{random_suffix}"
358358
network = google_compute_network.network.name
359359
encrypted_interconnect_router = true
@@ -363,7 +363,6 @@ resource "google_compute_router" "router" {
363363
}
364364
365365
resource "google_compute_network" "network" {
366-
provider = google-beta
367366
name = "tf-test-test-network%{random_suffix}"
368367
auto_create_subnetworks = false
369368
}

google-beta/resource_compute_interconnect_attachment_generated_test.go

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -82,20 +82,25 @@ func TestAccComputeInterconnectAttachment_computeInterconnectAttachmentIpsecEncr
8282

8383
vcrTest(t, resource.TestCase{
8484
PreCheck: func() { testAccPreCheck(t) },
85-
Providers: testAccProvidersOiCS,
85+
Providers: testAccProviders,
8686
CheckDestroy: testAccCheckComputeInterconnectAttachmentDestroyProducer(t),
8787
Steps: []resource.TestStep{
8888
{
8989
Config: testAccComputeInterconnectAttachment_computeInterconnectAttachmentIpsecEncryptionExample(context),
9090
},
91+
{
92+
ResourceName: "google_compute_interconnect_attachment.ipsec-encrypted-interconnect-attachment",
93+
ImportState: true,
94+
ImportStateVerify: true,
95+
ImportStateVerifyIgnore: []string{"router", "candidate_subnets", "region"},
96+
},
9197
},
9298
})
9399
}
94100

95101
func testAccComputeInterconnectAttachment_computeInterconnectAttachmentIpsecEncryptionExample(context map[string]interface{}) string {
96102
return Nprintf(`
97103
resource "google_compute_interconnect_attachment" "ipsec-encrypted-interconnect-attachment" {
98-
provider = google-beta
99104
name = "tf-test-test-interconnect-attachment%{random_suffix}"
100105
edge_availability_domain = "AVAILABILITY_DOMAIN_1"
101106
type = "PARTNER"
@@ -107,7 +112,6 @@ resource "google_compute_interconnect_attachment" "ipsec-encrypted-interconnect-
107112
}
108113
109114
resource "google_compute_address" "address" {
110-
provider = google-beta
111115
name = "tf-test-test-address%{random_suffix}"
112116
address_type = "INTERNAL"
113117
purpose = "IPSEC_INTERCONNECT"
@@ -117,7 +121,6 @@ resource "google_compute_address" "address" {
117121
}
118122
119123
resource "google_compute_router" "router" {
120-
provider = google-beta
121124
name = "tf-test-test-router%{random_suffix}"
122125
network = google_compute_network.network.name
123126
encrypted_interconnect_router = true
@@ -127,7 +130,6 @@ resource "google_compute_router" "router" {
127130
}
128131
129132
resource "google_compute_network" "network" {
130-
provider = google-beta
131133
name = "tf-test-test-network%{random_suffix}"
132134
auto_create_subnetworks = false
133135
}

google-beta/resource_compute_router_generated_test.go

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -82,20 +82,25 @@ func TestAccComputeRouter_computeRouterEncryptedInterconnectExample(t *testing.T
8282

8383
vcrTest(t, resource.TestCase{
8484
PreCheck: func() { testAccPreCheck(t) },
85-
Providers: testAccProvidersOiCS,
85+
Providers: testAccProviders,
8686
CheckDestroy: testAccCheckComputeRouterDestroyProducer(t),
8787
Steps: []resource.TestStep{
8888
{
8989
Config: testAccComputeRouter_computeRouterEncryptedInterconnectExample(context),
9090
},
91+
{
92+
ResourceName: "google_compute_router.encrypted-interconnect-router",
93+
ImportState: true,
94+
ImportStateVerify: true,
95+
ImportStateVerifyIgnore: []string{"network", "region"},
96+
},
9197
},
9298
})
9399
}
94100

95101
func testAccComputeRouter_computeRouterEncryptedInterconnectExample(context map[string]interface{}) string {
96102
return Nprintf(`
97103
resource "google_compute_router" "encrypted-interconnect-router" {
98-
provider = google-beta
99104
name = "tf-test-test-router%{random_suffix}"
100105
network = google_compute_network.network.name
101106
encrypted_interconnect_router = true
@@ -105,7 +110,6 @@ resource "google_compute_router" "encrypted-interconnect-router" {
105110
}
106111
107112
resource "google_compute_network" "network" {
108-
provider = google-beta
109113
name = "tf-test-test-network%{random_suffix}"
110114
auto_create_subnetworks = false
111115
}

website/docs/r/compute_ha_vpn_gateway.html.markdown

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,6 @@ resource "google_compute_router_peer" "router2_peer2" {
253253

254254
```hcl
255255
resource "google_compute_ha_vpn_gateway" "vpn-gateway" {
256-
provider = google-beta
257256
name = "test-ha-vpngw"
258257
network = google_compute_network.network.id
259258
vpn_interfaces {
@@ -267,7 +266,6 @@ resource "google_compute_ha_vpn_gateway" "vpn-gateway" {
267266
}
268267
269268
resource "google_compute_interconnect_attachment" "attachment1" {
270-
provider = google-beta
271269
name = "test-interconnect-attachment1"
272270
edge_availability_domain = "AVAILABILITY_DOMAIN_1"
273271
type = "PARTNER"
@@ -279,7 +277,6 @@ resource "google_compute_interconnect_attachment" "attachment1" {
279277
}
280278
281279
resource "google_compute_interconnect_attachment" "attachment2" {
282-
provider = google-beta
283280
name = "test-interconnect-attachment2"
284281
edge_availability_domain = "AVAILABILITY_DOMAIN_2"
285282
type = "PARTNER"
@@ -291,7 +288,6 @@ resource "google_compute_interconnect_attachment" "attachment2" {
291288
}
292289
293290
resource "google_compute_address" "address1" {
294-
provider = google-beta
295291
name = "test-address1"
296292
address_type = "INTERNAL"
297293
purpose = "IPSEC_INTERCONNECT"
@@ -301,7 +297,6 @@ resource "google_compute_address" "address1" {
301297
}
302298
303299
resource "google_compute_address" "address2" {
304-
provider = google-beta
305300
name = "test-address2"
306301
address_type = "INTERNAL"
307302
purpose = "IPSEC_INTERCONNECT"
@@ -311,7 +306,6 @@ resource "google_compute_address" "address2" {
311306
}
312307
313308
resource "google_compute_router" "router" {
314-
provider = google-beta
315309
name = "test-router"
316310
network = google_compute_network.network.name
317311
encrypted_interconnect_router = true
@@ -321,7 +315,6 @@ resource "google_compute_router" "router" {
321315
}
322316
323317
resource "google_compute_network" "network" {
324-
provider = google-beta
325318
name = "test-network"
326319
auto_create_subnetworks = false
327320
}

website/docs/r/compute_interconnect_attachment.html.markdown

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,6 @@ resource "google_compute_network" "foobar" {
6767

6868
```hcl
6969
resource "google_compute_interconnect_attachment" "ipsec-encrypted-interconnect-attachment" {
70-
provider = google-beta
7170
name = "test-interconnect-attachment"
7271
edge_availability_domain = "AVAILABILITY_DOMAIN_1"
7372
type = "PARTNER"
@@ -79,7 +78,6 @@ resource "google_compute_interconnect_attachment" "ipsec-encrypted-interconnect-
7978
}
8079
8180
resource "google_compute_address" "address" {
82-
provider = google-beta
8381
name = "test-address"
8482
address_type = "INTERNAL"
8583
purpose = "IPSEC_INTERCONNECT"
@@ -89,7 +87,6 @@ resource "google_compute_address" "address" {
8987
}
9088
9189
resource "google_compute_router" "router" {
92-
provider = google-beta
9390
name = "test-router"
9491
network = google_compute_network.network.name
9592
encrypted_interconnect_router = true
@@ -99,7 +96,6 @@ resource "google_compute_router" "router" {
9996
}
10097
10198
resource "google_compute_network" "network" {
102-
provider = google-beta
10399
name = "test-network"
104100
auto_create_subnetworks = false
105101
}

website/docs/r/compute_router.html.markdown

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,6 @@ resource "google_compute_network" "foobar" {
7171

7272
```hcl
7373
resource "google_compute_router" "encrypted-interconnect-router" {
74-
provider = google-beta
7574
name = "test-router"
7675
network = google_compute_network.network.name
7776
encrypted_interconnect_router = true
@@ -81,7 +80,6 @@ resource "google_compute_router" "encrypted-interconnect-router" {
8180
}
8281
8382
resource "google_compute_network" "network" {
84-
provider = google-beta
8583
name = "test-network"
8684
auto_create_subnetworks = false
8785
}

0 commit comments

Comments
 (0)