Skip to content

Commit

Permalink
Skip TestAccComputeHaVpnGateway_computeHaVpnGatewayEncryptedInterconn…
Browse files Browse the repository at this point in the history
…ectExample (#7313) (#13794)

Signed-off-by: Modular Magician <[email protected]>
  • Loading branch information
modular-magician authored Feb 21, 2023
1 parent 5ea7cb7 commit 93962a1
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 101 deletions.
3 changes: 3 additions & 0 deletions .changelog/7313.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:none

```
96 changes: 0 additions & 96 deletions google/resource_compute_ha_vpn_gateway_generated_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,102 +63,6 @@ resource "google_compute_network" "network1" {
`, context)
}

func TestAccComputeHaVpnGateway_computeHaVpnGatewayEncryptedInterconnectExample(t *testing.T) {
t.Parallel()

context := map[string]interface{}{
"random_suffix": randString(t, 10),
}

vcrTest(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
Providers: testAccProviders,
CheckDestroy: testAccCheckComputeHaVpnGatewayDestroyProducer(t),
Steps: []resource.TestStep{
{
Config: testAccComputeHaVpnGateway_computeHaVpnGatewayEncryptedInterconnectExample(context),
},
{
ResourceName: "google_compute_ha_vpn_gateway.vpn-gateway",
ImportState: true,
ImportStateVerify: true,
ImportStateVerifyIgnore: []string{"network", "region"},
},
},
})
}

func testAccComputeHaVpnGateway_computeHaVpnGatewayEncryptedInterconnectExample(context map[string]interface{}) string {
return Nprintf(`
resource "google_compute_ha_vpn_gateway" "vpn-gateway" {
name = "tf-test-test-ha-vpngw%{random_suffix}"
network = google_compute_network.network.id
vpn_interfaces {
id = 0
interconnect_attachment = google_compute_interconnect_attachment.attachment1.self_link
}
vpn_interfaces {
id = 1
interconnect_attachment = google_compute_interconnect_attachment.attachment2.self_link
}
}
resource "google_compute_interconnect_attachment" "attachment1" {
name = "tf-test-test-interconnect-attachment1%{random_suffix}"
edge_availability_domain = "AVAILABILITY_DOMAIN_1"
type = "PARTNER"
router = google_compute_router.router.id
encryption = "IPSEC"
ipsec_internal_addresses = [
google_compute_address.address1.self_link,
]
}
resource "google_compute_interconnect_attachment" "attachment2" {
name = "tf-test-test-interconnect-attachment2%{random_suffix}"
edge_availability_domain = "AVAILABILITY_DOMAIN_2"
type = "PARTNER"
router = google_compute_router.router.id
encryption = "IPSEC"
ipsec_internal_addresses = [
google_compute_address.address2.self_link,
]
}
resource "google_compute_address" "address1" {
name = "tf-test-test-address1%{random_suffix}"
address_type = "INTERNAL"
purpose = "IPSEC_INTERCONNECT"
address = "192.168.1.0"
prefix_length = 29
network = google_compute_network.network.self_link
}
resource "google_compute_address" "address2" {
name = "tf-test-test-address2%{random_suffix}"
address_type = "INTERNAL"
purpose = "IPSEC_INTERCONNECT"
address = "192.168.2.0"
prefix_length = 29
network = google_compute_network.network.self_link
}
resource "google_compute_router" "router" {
name = "tf-test-test-router%{random_suffix}"
network = google_compute_network.network.name
encrypted_interconnect_router = true
bgp {
asn = 16550
}
}
resource "google_compute_network" "network" {
name = "tf-test-test-network%{random_suffix}"
auto_create_subnetworks = false
}
`, context)
}

func testAccCheckComputeHaVpnGatewayDestroyProducer(t *testing.T) func(s *terraform.State) error {
return func(s *terraform.State) error {
for name, rs := range s.RootModule().Resources {
Expand Down
5 changes: 0 additions & 5 deletions website/docs/r/compute_ha_vpn_gateway.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,6 @@ resource "google_compute_network" "network1" {
auto_create_subnetworks = false
}
```
<div class = "oics-button" style="float: right; margin: 0 0 -15px">
<a href="https://console.cloud.google.com/cloudshell/open?cloudshell_git_repo=https%3A%2F%2Fgithub.com%2Fterraform-google-modules%2Fdocs-examples.git&cloudshell_working_dir=compute_ha_vpn_gateway_encrypted_interconnect&cloudshell_image=gcr.io%2Fgraphite-cloud-shell-images%2Fterraform%3Alatest&open_in_editor=main.tf&cloudshell_print=.%2Fmotd&cloudshell_tutorial=.%2Ftutorial.md" target="_blank">
<img alt="Open in Cloud Shell" src="//gstatic.com/cloudssh/images/open-btn.svg" style="max-height: 44px; margin: 32px auto; max-width: 100%;">
</a>
</div>
## Example Usage - Compute Ha Vpn Gateway Encrypted Interconnect


Expand Down

0 comments on commit 93962a1

Please sign in to comment.