// ---------------------------------------------------------------------------- // // *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** // // ---------------------------------------------------------------------------- // // This file is automatically generated by Magic Modules and manual // changes will be clobbered when the file is regenerated. // // Please read more about how to change this file in // .github/CONTRIBUTING.md. // // ---------------------------------------------------------------------------- package google import ( "fmt" "testing" "github.com/hashicorp/terraform/helper/acctest" "github.com/hashicorp/terraform/helper/resource" ) func TestAccComputeSubnetwork_subnetworkBasicExample(t *testing.T) { t.Parallel() resource.Test(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckComputeSubnetworkDestroy, Steps: []resource.TestStep{ { Config: testAccComputeSubnetwork_subnetworkBasicExample(acctest.RandString(10)), }, { ResourceName: "google_compute_subnetwork.network-with-private-secondary-ip-ranges", ImportState: true, ImportStateVerify: true, }, }, }) } func testAccComputeSubnetwork_subnetworkBasicExample(val string) string { return fmt.Sprintf(` resource "google_compute_subnetwork" "network-with-private-secondary-ip-ranges" { name = "test-subnetwork-%s" ip_cidr_range = "10.2.0.0/16" region = "us-central1" network = "${google_compute_network.custom-test.self_link}" secondary_ip_range { range_name = "tf-test-secondary-range-update1" ip_cidr_range = "192.168.10.0/24" } } resource "google_compute_network" "custom-test" { name = "test-network-%s" auto_create_subnetworks = false } `, val, val, ) }