Skip to content

Commit 77e7e40

Browse files
add vpc_auto_create sample (#5023) (#3478)
Signed-off-by: Modular Magician <[email protected]>
1 parent 21631af commit 77e7e40

File tree

4 files changed

+13
-10
lines changed

4 files changed

+13
-10
lines changed

.changelog/5023.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_network_generated_test.go

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ func TestAccComputeNetwork_networkCustomMtuExample(t *testing.T) {
5959
t.Parallel()
6060

6161
context := map[string]interface{}{
62+
"project": getTestProjectFromEnv(),
6263
"random_suffix": randString(t, 10),
6364
}
6465

@@ -82,8 +83,10 @@ func TestAccComputeNetwork_networkCustomMtuExample(t *testing.T) {
8283
func testAccComputeNetwork_networkCustomMtuExample(context map[string]interface{}) string {
8384
return Nprintf(`
8485
resource "google_compute_network" "vpc_network" {
85-
name = "tf-test-vpc-network%{random_suffix}"
86-
mtu = 1500
86+
project = "%{project}"
87+
name = "tf-test-vpc-network%{random_suffix}"
88+
auto_create_subnetworks = true
89+
mtu = 1460
8790
}
8891
`, context)
8992
}

google-beta/resource_gke_hub_feature_membership_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import (
55
"fmt"
66
"testing"
77

8-
dcl "github.com/GoogleCloudPlatform/declarative-resource-client-library/dcl"
8+
"github.com/GoogleCloudPlatform/declarative-resource-client-library/dcl"
99
gkehub "github.com/GoogleCloudPlatform/declarative-resource-client-library/services/google/gkehub/beta"
1010
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource"
1111
"github.com/hashicorp/terraform-plugin-sdk/v2/terraform"

website/docs/r/compute_network.html.markdown

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -44,18 +44,15 @@ resource "google_compute_network" "vpc_network" {
4444
name = "vpc-network"
4545
}
4646
```
47-
<div class = "oics-button" style="float: right; margin: 0 0 -15px">
48-
<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=network_custom_mtu&cloudshell_image=gcr.io%2Fgraphite-cloud-shell-images%2Fterraform%3Alatest&open_in_editor=main.tf&cloudshell_print=.%2Fmotd&cloudshell_tutorial=.%2Ftutorial.md" target="_blank">
49-
<img alt="Open in Cloud Shell" src="//gstatic.com/cloudssh/images/open-btn.svg" style="max-height: 44px; margin: 32px auto; max-width: 100%;">
50-
</a>
51-
</div>
5247
## Example Usage - Network Custom Mtu
5348

5449

5550
```hcl
5651
resource "google_compute_network" "vpc_network" {
57-
name = "vpc-network"
58-
mtu = 1500
52+
project = "my-project-name"
53+
name = "vpc-network"
54+
auto_create_subnetworks = true
55+
mtu = 1460
5956
}
6057
```
6158

0 commit comments

Comments
 (0)