mirror of
https://github.com/letic/terraform-provider-google.git
synced 2024-10-04 17:51:11 +00:00
Refactor import tests for the remaining compute resources (#909)
* Improve instance group manager import tests * Improe instance template & project metadata import test * Improve region autoscaler import test * Improve router interface import test * Improve router peer import test * Improve SSL certs import test * Improve http & https target proxy import tests * Improve target pool import test * Improve url map import test * Improve target ssl & tcp proxy import test * Add import test for instance template disk
This commit is contained in:
parent
835bff14e6
commit
52462382c9
@ -1,69 +0,0 @@
|
|||||||
package google
|
|
||||||
|
|
||||||
import (
|
|
||||||
"fmt"
|
|
||||||
"testing"
|
|
||||||
|
|
||||||
"github.com/hashicorp/terraform/helper/acctest"
|
|
||||||
"github.com/hashicorp/terraform/helper/resource"
|
|
||||||
)
|
|
||||||
|
|
||||||
func TestAccInstanceGroupManager_importBasic(t *testing.T) {
|
|
||||||
t.Parallel()
|
|
||||||
|
|
||||||
resourceName1 := "google_compute_instance_group_manager.igm-basic"
|
|
||||||
resourceName2 := "google_compute_instance_group_manager.igm-no-tp"
|
|
||||||
template := fmt.Sprintf("igm-test-%s", acctest.RandString(10))
|
|
||||||
target := fmt.Sprintf("igm-test-%s", acctest.RandString(10))
|
|
||||||
igm1 := fmt.Sprintf("igm-test-%s", acctest.RandString(10))
|
|
||||||
igm2 := fmt.Sprintf("igm-test-%s", acctest.RandString(10))
|
|
||||||
|
|
||||||
resource.Test(t, resource.TestCase{
|
|
||||||
PreCheck: func() { testAccPreCheck(t) },
|
|
||||||
Providers: testAccProviders,
|
|
||||||
CheckDestroy: testAccCheckInstanceGroupManagerDestroy,
|
|
||||||
Steps: []resource.TestStep{
|
|
||||||
resource.TestStep{
|
|
||||||
Config: testAccInstanceGroupManager_basic(template, target, igm1, igm2),
|
|
||||||
},
|
|
||||||
|
|
||||||
resource.TestStep{
|
|
||||||
ResourceName: resourceName1,
|
|
||||||
ImportState: true,
|
|
||||||
ImportStateVerify: true,
|
|
||||||
},
|
|
||||||
|
|
||||||
resource.TestStep{
|
|
||||||
ResourceName: resourceName2,
|
|
||||||
ImportState: true,
|
|
||||||
ImportStateVerify: true,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
func TestAccInstanceGroupManager_importUpdate(t *testing.T) {
|
|
||||||
t.Parallel()
|
|
||||||
|
|
||||||
resourceName := "google_compute_instance_group_manager.igm-update"
|
|
||||||
template := fmt.Sprintf("igm-test-%s", acctest.RandString(10))
|
|
||||||
target := fmt.Sprintf("igm-test-%s", acctest.RandString(10))
|
|
||||||
igm := fmt.Sprintf("igm-test-%s", acctest.RandString(10))
|
|
||||||
|
|
||||||
resource.Test(t, resource.TestCase{
|
|
||||||
PreCheck: func() { testAccPreCheck(t) },
|
|
||||||
Providers: testAccProviders,
|
|
||||||
CheckDestroy: testAccCheckInstanceGroupManagerDestroy,
|
|
||||||
Steps: []resource.TestStep{
|
|
||||||
resource.TestStep{
|
|
||||||
Config: testAccInstanceGroupManager_update(template, target, igm),
|
|
||||||
},
|
|
||||||
|
|
||||||
resource.TestStep{
|
|
||||||
ResourceName: resourceName,
|
|
||||||
ImportState: true,
|
|
||||||
ImportStateVerify: true,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
})
|
|
||||||
}
|
|
@ -1,30 +0,0 @@
|
|||||||
package google
|
|
||||||
|
|
||||||
import (
|
|
||||||
"fmt"
|
|
||||||
"github.com/hashicorp/terraform/helper/acctest"
|
|
||||||
"github.com/hashicorp/terraform/helper/resource"
|
|
||||||
"testing"
|
|
||||||
)
|
|
||||||
|
|
||||||
func TestAccComputeInstanceGroup_import(t *testing.T) {
|
|
||||||
t.Parallel()
|
|
||||||
|
|
||||||
instanceName := fmt.Sprintf("instancegroup-test-%s", acctest.RandString(10))
|
|
||||||
|
|
||||||
resource.Test(t, resource.TestCase{
|
|
||||||
PreCheck: func() { testAccPreCheck(t) },
|
|
||||||
Providers: testAccProviders,
|
|
||||||
CheckDestroy: testAccComputeInstanceGroup_destroy,
|
|
||||||
Steps: []resource.TestStep{
|
|
||||||
resource.TestStep{
|
|
||||||
Config: testAccComputeInstanceGroup_basic(instanceName),
|
|
||||||
},
|
|
||||||
resource.TestStep{
|
|
||||||
ResourceName: "google_compute_instance_group.basic",
|
|
||||||
ImportState: true,
|
|
||||||
ImportStateVerify: true,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
})
|
|
||||||
}
|
|
@ -1,147 +0,0 @@
|
|||||||
package google
|
|
||||||
|
|
||||||
import (
|
|
||||||
"testing"
|
|
||||||
|
|
||||||
"github.com/hashicorp/terraform/helper/acctest"
|
|
||||||
"github.com/hashicorp/terraform/helper/resource"
|
|
||||||
)
|
|
||||||
|
|
||||||
func TestAccComputeInstanceTemplate_importBasic(t *testing.T) {
|
|
||||||
t.Parallel()
|
|
||||||
|
|
||||||
resourceName := "google_compute_instance_template.foobar"
|
|
||||||
|
|
||||||
resource.Test(t, resource.TestCase{
|
|
||||||
PreCheck: func() { testAccPreCheck(t) },
|
|
||||||
Providers: testAccProviders,
|
|
||||||
CheckDestroy: testAccCheckComputeInstanceTemplateDestroy,
|
|
||||||
Steps: []resource.TestStep{
|
|
||||||
resource.TestStep{
|
|
||||||
Config: testAccComputeInstanceTemplate_basic(),
|
|
||||||
},
|
|
||||||
|
|
||||||
resource.TestStep{
|
|
||||||
ResourceName: resourceName,
|
|
||||||
ImportState: true,
|
|
||||||
ImportStateVerify: true,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
func TestAccComputeInstanceTemplate_importIp(t *testing.T) {
|
|
||||||
t.Parallel()
|
|
||||||
|
|
||||||
resourceName := "google_compute_instance_template.foobar"
|
|
||||||
|
|
||||||
resource.Test(t, resource.TestCase{
|
|
||||||
PreCheck: func() { testAccPreCheck(t) },
|
|
||||||
Providers: testAccProviders,
|
|
||||||
CheckDestroy: testAccCheckComputeInstanceTemplateDestroy,
|
|
||||||
Steps: []resource.TestStep{
|
|
||||||
resource.TestStep{
|
|
||||||
Config: testAccComputeInstanceTemplate_ip(),
|
|
||||||
},
|
|
||||||
|
|
||||||
resource.TestStep{
|
|
||||||
ResourceName: resourceName,
|
|
||||||
ImportState: true,
|
|
||||||
ImportStateVerify: true,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
func TestAccComputeInstanceTemplate_importDisks(t *testing.T) {
|
|
||||||
t.Parallel()
|
|
||||||
|
|
||||||
resourceName := "google_compute_instance_template.foobar"
|
|
||||||
|
|
||||||
resource.Test(t, resource.TestCase{
|
|
||||||
PreCheck: func() { testAccPreCheck(t) },
|
|
||||||
Providers: testAccProviders,
|
|
||||||
CheckDestroy: testAccCheckComputeInstanceTemplateDestroy,
|
|
||||||
Steps: []resource.TestStep{
|
|
||||||
resource.TestStep{
|
|
||||||
Config: testAccComputeInstanceTemplate_disks(),
|
|
||||||
},
|
|
||||||
|
|
||||||
resource.TestStep{
|
|
||||||
ResourceName: resourceName,
|
|
||||||
ImportState: true,
|
|
||||||
ImportStateVerify: true,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
func TestAccComputeInstanceTemplate_importSubnetAuto(t *testing.T) {
|
|
||||||
t.Parallel()
|
|
||||||
|
|
||||||
resourceName := "google_compute_instance_template.foobar"
|
|
||||||
network := "network-" + acctest.RandString(10)
|
|
||||||
|
|
||||||
resource.Test(t, resource.TestCase{
|
|
||||||
PreCheck: func() { testAccPreCheck(t) },
|
|
||||||
Providers: testAccProviders,
|
|
||||||
CheckDestroy: testAccCheckComputeInstanceTemplateDestroy,
|
|
||||||
Steps: []resource.TestStep{
|
|
||||||
resource.TestStep{
|
|
||||||
Config: testAccComputeInstanceTemplate_subnet_auto(network),
|
|
||||||
},
|
|
||||||
|
|
||||||
resource.TestStep{
|
|
||||||
ResourceName: resourceName,
|
|
||||||
ImportState: true,
|
|
||||||
ImportStateVerify: true,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
func TestAccComputeInstanceTemplate_importSubnetCustom(t *testing.T) {
|
|
||||||
t.Parallel()
|
|
||||||
|
|
||||||
resourceName := "google_compute_instance_template.foobar"
|
|
||||||
|
|
||||||
resource.Test(t, resource.TestCase{
|
|
||||||
PreCheck: func() { testAccPreCheck(t) },
|
|
||||||
Providers: testAccProviders,
|
|
||||||
CheckDestroy: testAccCheckComputeInstanceTemplateDestroy,
|
|
||||||
Steps: []resource.TestStep{
|
|
||||||
resource.TestStep{
|
|
||||||
Config: testAccComputeInstanceTemplate_subnet_custom(),
|
|
||||||
},
|
|
||||||
|
|
||||||
resource.TestStep{
|
|
||||||
ResourceName: resourceName,
|
|
||||||
ImportState: true,
|
|
||||||
ImportStateVerify: true,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
func TestAccComputeInstanceTemplate_importPrimaryAliasIpRange(t *testing.T) {
|
|
||||||
t.Parallel()
|
|
||||||
|
|
||||||
resourceName := "google_compute_instance_template.foobar"
|
|
||||||
|
|
||||||
resource.Test(t, resource.TestCase{
|
|
||||||
PreCheck: func() { testAccPreCheck(t) },
|
|
||||||
Providers: testAccProviders,
|
|
||||||
CheckDestroy: testAccCheckComputeInstanceTemplateDestroy,
|
|
||||||
Steps: []resource.TestStep{
|
|
||||||
resource.TestStep{
|
|
||||||
Config: testAccComputeInstanceTemplate_primaryAliasIpRange(acctest.RandString(10)),
|
|
||||||
},
|
|
||||||
|
|
||||||
resource.TestStep{
|
|
||||||
ResourceName: resourceName,
|
|
||||||
ImportState: true,
|
|
||||||
ImportStateVerify: true,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
})
|
|
||||||
}
|
|
@ -1,30 +0,0 @@
|
|||||||
package google
|
|
||||||
|
|
||||||
import (
|
|
||||||
"testing"
|
|
||||||
|
|
||||||
"github.com/hashicorp/terraform/helper/acctest"
|
|
||||||
"github.com/hashicorp/terraform/helper/resource"
|
|
||||||
)
|
|
||||||
|
|
||||||
func TestAccComputeProjectMetadataItem_importBasic(t *testing.T) {
|
|
||||||
t.Parallel()
|
|
||||||
|
|
||||||
key := "myKey" + acctest.RandString(10)
|
|
||||||
|
|
||||||
resource.Test(t, resource.TestCase{
|
|
||||||
PreCheck: func() { testAccPreCheck(t) },
|
|
||||||
Providers: testAccProviders,
|
|
||||||
CheckDestroy: testAccCheckProjectMetadataItemDestroy,
|
|
||||||
Steps: []resource.TestStep{
|
|
||||||
{
|
|
||||||
Config: testAccProjectMetadataItem_basicWithResourceName("foobar", key, "myValue"),
|
|
||||||
},
|
|
||||||
{
|
|
||||||
ResourceName: "google_compute_project_metadata_item.foobar",
|
|
||||||
ImportState: true,
|
|
||||||
ImportStateVerify: true,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
})
|
|
||||||
}
|
|
@ -1,36 +0,0 @@
|
|||||||
package google
|
|
||||||
|
|
||||||
import (
|
|
||||||
"testing"
|
|
||||||
|
|
||||||
"fmt"
|
|
||||||
|
|
||||||
"github.com/hashicorp/terraform/helper/acctest"
|
|
||||||
"github.com/hashicorp/terraform/helper/resource"
|
|
||||||
)
|
|
||||||
|
|
||||||
func TestAccComputeRegionAutoscaler_importBasic(t *testing.T) {
|
|
||||||
resourceName := "google_compute_region_autoscaler.foobar"
|
|
||||||
|
|
||||||
var it_name = fmt.Sprintf("region-autoscaler-test-%s", acctest.RandString(10))
|
|
||||||
var tp_name = fmt.Sprintf("region-autoscaler-test-%s", acctest.RandString(10))
|
|
||||||
var igm_name = fmt.Sprintf("region-autoscaler-test-%s", acctest.RandString(10))
|
|
||||||
var autoscaler_name = fmt.Sprintf("region-autoscaler-test-%s", acctest.RandString(10))
|
|
||||||
|
|
||||||
resource.Test(t, resource.TestCase{
|
|
||||||
PreCheck: func() { testAccPreCheck(t) },
|
|
||||||
Providers: testAccProviders,
|
|
||||||
CheckDestroy: testAccCheckComputeRegionAutoscalerDestroy,
|
|
||||||
Steps: []resource.TestStep{
|
|
||||||
resource.TestStep{
|
|
||||||
Config: testAccComputeRegionAutoscaler_basic(it_name, tp_name, igm_name, autoscaler_name),
|
|
||||||
},
|
|
||||||
|
|
||||||
resource.TestStep{
|
|
||||||
ResourceName: resourceName,
|
|
||||||
ImportState: true,
|
|
||||||
ImportStateVerify: true,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
})
|
|
||||||
}
|
|
@ -1,30 +0,0 @@
|
|||||||
package google
|
|
||||||
|
|
||||||
import (
|
|
||||||
"testing"
|
|
||||||
|
|
||||||
"github.com/hashicorp/terraform/helper/acctest"
|
|
||||||
"github.com/hashicorp/terraform/helper/resource"
|
|
||||||
)
|
|
||||||
|
|
||||||
func TestAccComputeRouterInterface_import(t *testing.T) {
|
|
||||||
t.Parallel()
|
|
||||||
|
|
||||||
resourceName := "google_compute_router_interface.foobar"
|
|
||||||
testId := acctest.RandString(10)
|
|
||||||
resource.Test(t, resource.TestCase{
|
|
||||||
PreCheck: func() { testAccPreCheck(t) },
|
|
||||||
Providers: testAccProviders,
|
|
||||||
Steps: []resource.TestStep{
|
|
||||||
resource.TestStep{
|
|
||||||
Config: testAccComputeRouterInterfaceBasic(testId),
|
|
||||||
},
|
|
||||||
|
|
||||||
resource.TestStep{
|
|
||||||
ResourceName: resourceName,
|
|
||||||
ImportState: true,
|
|
||||||
ImportStateVerify: true,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
})
|
|
||||||
}
|
|
@ -1,30 +0,0 @@
|
|||||||
package google
|
|
||||||
|
|
||||||
import (
|
|
||||||
"testing"
|
|
||||||
|
|
||||||
"github.com/hashicorp/terraform/helper/acctest"
|
|
||||||
"github.com/hashicorp/terraform/helper/resource"
|
|
||||||
)
|
|
||||||
|
|
||||||
func TestAccComputeRouterPeer_import(t *testing.T) {
|
|
||||||
t.Parallel()
|
|
||||||
|
|
||||||
resourceName := "google_compute_router_peer.foobar"
|
|
||||||
testId := acctest.RandString(10)
|
|
||||||
resource.Test(t, resource.TestCase{
|
|
||||||
PreCheck: func() { testAccPreCheck(t) },
|
|
||||||
Providers: testAccProviders,
|
|
||||||
Steps: []resource.TestStep{
|
|
||||||
resource.TestStep{
|
|
||||||
Config: testAccComputeRouterPeerBasic(testId),
|
|
||||||
},
|
|
||||||
|
|
||||||
resource.TestStep{
|
|
||||||
ResourceName: resourceName,
|
|
||||||
ImportState: true,
|
|
||||||
ImportStateVerify: true,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
})
|
|
||||||
}
|
|
@ -1,27 +0,0 @@
|
|||||||
package google
|
|
||||||
|
|
||||||
import (
|
|
||||||
"github.com/hashicorp/terraform/helper/resource"
|
|
||||||
"testing"
|
|
||||||
)
|
|
||||||
|
|
||||||
func TestAccComputeSslCertificate_import(t *testing.T) {
|
|
||||||
t.Parallel()
|
|
||||||
|
|
||||||
resource.Test(t, resource.TestCase{
|
|
||||||
PreCheck: func() { testAccPreCheck(t) },
|
|
||||||
Providers: testAccProviders,
|
|
||||||
CheckDestroy: testAccCheckComputeSslCertificateDestroy,
|
|
||||||
Steps: []resource.TestStep{
|
|
||||||
resource.TestStep{
|
|
||||||
Config: testAccComputeSslCertificate_import(),
|
|
||||||
},
|
|
||||||
resource.TestStep{
|
|
||||||
ResourceName: "google_compute_ssl_certificate.foobar",
|
|
||||||
ImportState: true,
|
|
||||||
ImportStateVerify: true,
|
|
||||||
ImportStateVerifyIgnore: []string{"private_key"},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
})
|
|
||||||
}
|
|
@ -1,34 +0,0 @@
|
|||||||
package google
|
|
||||||
|
|
||||||
import (
|
|
||||||
"fmt"
|
|
||||||
"github.com/hashicorp/terraform/helper/acctest"
|
|
||||||
"github.com/hashicorp/terraform/helper/resource"
|
|
||||||
"testing"
|
|
||||||
)
|
|
||||||
|
|
||||||
func TestAccComputeTargetHttpProxy_import(t *testing.T) {
|
|
||||||
t.Parallel()
|
|
||||||
|
|
||||||
target := fmt.Sprintf("thttp-test-%s", acctest.RandString(10))
|
|
||||||
backend := fmt.Sprintf("thttp-test-%s", acctest.RandString(10))
|
|
||||||
hc := fmt.Sprintf("thttp-test-%s", acctest.RandString(10))
|
|
||||||
urlmap1 := fmt.Sprintf("thttp-test-%s", acctest.RandString(10))
|
|
||||||
urlmap2 := fmt.Sprintf("thttp-test-%s", acctest.RandString(10))
|
|
||||||
|
|
||||||
resource.Test(t, resource.TestCase{
|
|
||||||
PreCheck: func() { testAccPreCheck(t) },
|
|
||||||
Providers: testAccProviders,
|
|
||||||
CheckDestroy: testAccCheckComputeTargetHttpProxyDestroy,
|
|
||||||
Steps: []resource.TestStep{
|
|
||||||
resource.TestStep{
|
|
||||||
Config: testAccComputeTargetHttpProxy_basic1(target, backend, hc, urlmap1, urlmap2),
|
|
||||||
},
|
|
||||||
resource.TestStep{
|
|
||||||
ResourceName: "google_compute_target_http_proxy.foobar",
|
|
||||||
ImportState: true,
|
|
||||||
ImportStateVerify: true,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
})
|
|
||||||
}
|
|
@ -1,30 +0,0 @@
|
|||||||
package google
|
|
||||||
|
|
||||||
import (
|
|
||||||
"fmt"
|
|
||||||
"github.com/hashicorp/terraform/helper/acctest"
|
|
||||||
"github.com/hashicorp/terraform/helper/resource"
|
|
||||||
"testing"
|
|
||||||
)
|
|
||||||
|
|
||||||
func TestAccComputeTargetHttpsProxy_import(t *testing.T) {
|
|
||||||
t.Parallel()
|
|
||||||
|
|
||||||
id := fmt.Sprintf("thttps-test-%s", acctest.RandString(10))
|
|
||||||
|
|
||||||
resource.Test(t, resource.TestCase{
|
|
||||||
PreCheck: func() { testAccPreCheck(t) },
|
|
||||||
Providers: testAccProviders,
|
|
||||||
CheckDestroy: testAccCheckComputeTargetHttpsProxyDestroy,
|
|
||||||
Steps: []resource.TestStep{
|
|
||||||
resource.TestStep{
|
|
||||||
Config: testAccComputeTargetHttpsProxy_basic1(id),
|
|
||||||
},
|
|
||||||
resource.TestStep{
|
|
||||||
ResourceName: "google_compute_target_https_proxy.foobar",
|
|
||||||
ImportState: true,
|
|
||||||
ImportStateVerify: true,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
})
|
|
||||||
}
|
|
@ -1,30 +0,0 @@
|
|||||||
package google
|
|
||||||
|
|
||||||
import (
|
|
||||||
"testing"
|
|
||||||
|
|
||||||
"github.com/hashicorp/terraform/helper/resource"
|
|
||||||
)
|
|
||||||
|
|
||||||
func TestAccComputeTargetPool_importBasic(t *testing.T) {
|
|
||||||
t.Parallel()
|
|
||||||
|
|
||||||
resourceName := "google_compute_target_pool.foo"
|
|
||||||
|
|
||||||
resource.Test(t, resource.TestCase{
|
|
||||||
PreCheck: func() { testAccPreCheck(t) },
|
|
||||||
Providers: testAccProviders,
|
|
||||||
CheckDestroy: testAccCheckComputeTargetPoolDestroy,
|
|
||||||
Steps: []resource.TestStep{
|
|
||||||
resource.TestStep{
|
|
||||||
Config: testAccComputeTargetPool_basic(),
|
|
||||||
},
|
|
||||||
|
|
||||||
resource.TestStep{
|
|
||||||
ResourceName: resourceName,
|
|
||||||
ImportState: true,
|
|
||||||
ImportStateVerify: true,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
})
|
|
||||||
}
|
|
@ -1,31 +0,0 @@
|
|||||||
package google
|
|
||||||
|
|
||||||
import (
|
|
||||||
"fmt"
|
|
||||||
"github.com/hashicorp/terraform/helper/acctest"
|
|
||||||
"github.com/hashicorp/terraform/helper/resource"
|
|
||||||
"testing"
|
|
||||||
)
|
|
||||||
|
|
||||||
func TestAccComputeTargetSslProxy_import(t *testing.T) {
|
|
||||||
target := fmt.Sprintf("tssl-test-%s", acctest.RandString(10))
|
|
||||||
cert := fmt.Sprintf("tssl-test-%s", acctest.RandString(10))
|
|
||||||
backend := fmt.Sprintf("tssl-test-%s", acctest.RandString(10))
|
|
||||||
hc := fmt.Sprintf("tssl-test-%s", acctest.RandString(10))
|
|
||||||
|
|
||||||
resource.Test(t, resource.TestCase{
|
|
||||||
PreCheck: func() { testAccPreCheck(t) },
|
|
||||||
Providers: testAccProviders,
|
|
||||||
CheckDestroy: testAccCheckComputeTargetSslProxyDestroy,
|
|
||||||
Steps: []resource.TestStep{
|
|
||||||
resource.TestStep{
|
|
||||||
Config: testAccComputeTargetSslProxy_basic1(target, cert, backend, hc),
|
|
||||||
},
|
|
||||||
resource.TestStep{
|
|
||||||
ResourceName: "google_compute_target_ssl_proxy.foobar",
|
|
||||||
ImportState: true,
|
|
||||||
ImportStateVerify: true,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
})
|
|
||||||
}
|
|
@ -1,32 +0,0 @@
|
|||||||
package google
|
|
||||||
|
|
||||||
import (
|
|
||||||
"fmt"
|
|
||||||
"github.com/hashicorp/terraform/helper/acctest"
|
|
||||||
"github.com/hashicorp/terraform/helper/resource"
|
|
||||||
"testing"
|
|
||||||
)
|
|
||||||
|
|
||||||
func TestAccComputeTargetTcpProxy_import(t *testing.T) {
|
|
||||||
t.Parallel()
|
|
||||||
|
|
||||||
target := fmt.Sprintf("ttcp-test-%s", acctest.RandString(10))
|
|
||||||
backend := fmt.Sprintf("ttcp-test-%s", acctest.RandString(10))
|
|
||||||
hc := fmt.Sprintf("ttcp-test-%s", acctest.RandString(10))
|
|
||||||
|
|
||||||
resource.Test(t, resource.TestCase{
|
|
||||||
PreCheck: func() { testAccPreCheck(t) },
|
|
||||||
Providers: testAccProviders,
|
|
||||||
CheckDestroy: testAccCheckComputeTargetTcpProxyDestroy,
|
|
||||||
Steps: []resource.TestStep{
|
|
||||||
resource.TestStep{
|
|
||||||
Config: testAccComputeTargetTcpProxy_basic1(target, backend, hc),
|
|
||||||
},
|
|
||||||
resource.TestStep{
|
|
||||||
ResourceName: "google_compute_target_tcp_proxy.foobar",
|
|
||||||
ImportState: true,
|
|
||||||
ImportStateVerify: true,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
})
|
|
||||||
}
|
|
@ -1,32 +0,0 @@
|
|||||||
package google
|
|
||||||
|
|
||||||
import (
|
|
||||||
"fmt"
|
|
||||||
"github.com/hashicorp/terraform/helper/acctest"
|
|
||||||
"github.com/hashicorp/terraform/helper/resource"
|
|
||||||
"testing"
|
|
||||||
)
|
|
||||||
|
|
||||||
func TestAccComputeUrlMap_import(t *testing.T) {
|
|
||||||
t.Parallel()
|
|
||||||
|
|
||||||
bsName := fmt.Sprintf("bs-test-%s", acctest.RandString(10))
|
|
||||||
hcName := fmt.Sprintf("hc-test-%s", acctest.RandString(10))
|
|
||||||
umName := fmt.Sprintf("um-test-%s", acctest.RandString(10))
|
|
||||||
|
|
||||||
resource.Test(t, resource.TestCase{
|
|
||||||
PreCheck: func() { testAccPreCheck(t) },
|
|
||||||
Providers: testAccProviders,
|
|
||||||
CheckDestroy: testAccCheckComputeUrlMapDestroy,
|
|
||||||
Steps: []resource.TestStep{
|
|
||||||
resource.TestStep{
|
|
||||||
Config: testAccComputeUrlMap_basic1(bsName, hcName, umName),
|
|
||||||
},
|
|
||||||
resource.TestStep{
|
|
||||||
ResourceName: "google_compute_url_map.foobar",
|
|
||||||
ImportState: true,
|
|
||||||
ImportStateVerify: true,
|
|
||||||
ImportStateVerifyIgnore: []string{"host_rule", "path_matcher", "test"},
|
|
||||||
},
|
|
||||||
}})
|
|
||||||
}
|
|
@ -40,6 +40,16 @@ func TestAccInstanceGroupManager_basic(t *testing.T) {
|
|||||||
"google_compute_instance_group_manager.igm-no-tp", &manager),
|
"google_compute_instance_group_manager.igm-no-tp", &manager),
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
|
resource.TestStep{
|
||||||
|
ResourceName: "google_compute_instance_group_manager.igm-basic",
|
||||||
|
ImportState: true,
|
||||||
|
ImportStateVerify: true,
|
||||||
|
},
|
||||||
|
resource.TestStep{
|
||||||
|
ResourceName: "google_compute_instance_group_manager.igm-no-tp",
|
||||||
|
ImportState: true,
|
||||||
|
ImportStateVerify: true,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@ -225,6 +235,9 @@ func TestAccInstanceGroupManager_autoHealingPolicies(t *testing.T) {
|
|||||||
testAccCheckInstanceGroupManagerAutoHealingPolicies("google_compute_instance_group_manager.igm-basic", hck, 10),
|
testAccCheckInstanceGroupManagerAutoHealingPolicies("google_compute_instance_group_manager.igm-basic", hck, 10),
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
|
// TODO: Add import test for auto healing policies
|
||||||
|
// Import doesn't work for auto healing policies because import is not supported
|
||||||
|
// for beta features. See https://github.com/terraform-providers/terraform-provider-google/issues/694
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
@ -31,6 +31,11 @@ func TestAccComputeInstanceGroup_basic(t *testing.T) {
|
|||||||
"google_compute_instance_group.empty", &instanceGroup),
|
"google_compute_instance_group.empty", &instanceGroup),
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
ResourceName: "google_compute_instance_group.basic",
|
||||||
|
ImportState: true,
|
||||||
|
ImportStateVerify: true,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
@ -35,6 +35,11 @@ func TestAccComputeInstanceTemplate_basic(t *testing.T) {
|
|||||||
testAccCheckComputeInstanceTemplateContainsLabel(&instanceTemplate, "my_label", "foobar"),
|
testAccCheckComputeInstanceTemplateContainsLabel(&instanceTemplate, "my_label", "foobar"),
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
|
resource.TestStep{
|
||||||
|
ResourceName: "google_compute_instance_template.foobar",
|
||||||
|
ImportState: true,
|
||||||
|
ImportStateVerify: true,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@ -58,6 +63,11 @@ func TestAccComputeInstanceTemplate_preemptible(t *testing.T) {
|
|||||||
testAccCheckComputeInstanceTemplatePreemptible(&instanceTemplate, true),
|
testAccCheckComputeInstanceTemplatePreemptible(&instanceTemplate, true),
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
|
resource.TestStep{
|
||||||
|
ResourceName: "google_compute_instance_template.foobar",
|
||||||
|
ImportState: true,
|
||||||
|
ImportStateVerify: true,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@ -80,6 +90,11 @@ func TestAccComputeInstanceTemplate_IP(t *testing.T) {
|
|||||||
testAccCheckComputeInstanceTemplateNetwork(&instanceTemplate),
|
testAccCheckComputeInstanceTemplateNetwork(&instanceTemplate),
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
|
resource.TestStep{
|
||||||
|
ResourceName: "google_compute_instance_template.foobar",
|
||||||
|
ImportState: true,
|
||||||
|
ImportStateVerify: true,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@ -105,6 +120,11 @@ func TestAccComputeInstanceTemplate_networkIP(t *testing.T) {
|
|||||||
"google_compute_instance_template.foobar", networkIP, &instanceTemplate),
|
"google_compute_instance_template.foobar", networkIP, &instanceTemplate),
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
|
resource.TestStep{
|
||||||
|
ResourceName: "google_compute_instance_template.foobar",
|
||||||
|
ImportState: true,
|
||||||
|
ImportStateVerify: true,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@ -129,6 +149,11 @@ func TestAccComputeInstanceTemplate_address(t *testing.T) {
|
|||||||
"google_compute_instance_template.foobar", address, &instanceTemplate),
|
"google_compute_instance_template.foobar", address, &instanceTemplate),
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
|
resource.TestStep{
|
||||||
|
ResourceName: "google_compute_instance_template.foobar",
|
||||||
|
ImportState: true,
|
||||||
|
ImportStateVerify: true,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@ -152,6 +177,11 @@ func TestAccComputeInstanceTemplate_disks(t *testing.T) {
|
|||||||
testAccCheckComputeInstanceTemplateDisk(&instanceTemplate, "terraform-test-foobar", false, false),
|
testAccCheckComputeInstanceTemplateDisk(&instanceTemplate, "terraform-test-foobar", false, false),
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
|
resource.TestStep{
|
||||||
|
ResourceName: "google_compute_instance_template.foobar",
|
||||||
|
ImportState: true,
|
||||||
|
ImportStateVerify: true,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@ -175,6 +205,11 @@ func TestAccComputeInstanceTemplate_subnet_auto(t *testing.T) {
|
|||||||
testAccCheckComputeInstanceTemplateNetworkName(&instanceTemplate, network),
|
testAccCheckComputeInstanceTemplateNetworkName(&instanceTemplate, network),
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
|
resource.TestStep{
|
||||||
|
ResourceName: "google_compute_instance_template.foobar",
|
||||||
|
ImportState: true,
|
||||||
|
ImportStateVerify: true,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@ -197,6 +232,11 @@ func TestAccComputeInstanceTemplate_subnet_custom(t *testing.T) {
|
|||||||
testAccCheckComputeInstanceTemplateSubnetwork(&instanceTemplate),
|
testAccCheckComputeInstanceTemplateSubnetwork(&instanceTemplate),
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
|
resource.TestStep{
|
||||||
|
ResourceName: "google_compute_instance_template.foobar",
|
||||||
|
ImportState: true,
|
||||||
|
ImportStateVerify: true,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@ -265,6 +305,11 @@ func TestAccComputeInstanceTemplate_primaryAliasIpRange(t *testing.T) {
|
|||||||
testAccCheckComputeInstanceTemplateHasAliasIpRange(&instanceTemplate, "", "/24"),
|
testAccCheckComputeInstanceTemplateHasAliasIpRange(&instanceTemplate, "", "/24"),
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
|
resource.TestStep{
|
||||||
|
ResourceName: "google_compute_instance_template.foobar",
|
||||||
|
ImportState: true,
|
||||||
|
ImportStateVerify: true,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@ -286,6 +331,11 @@ func TestAccComputeInstanceTemplate_secondaryAliasIpRange(t *testing.T) {
|
|||||||
testAccCheckComputeInstanceTemplateHasAliasIpRange(&instanceTemplate, "inst-test-secondary", "/24"),
|
testAccCheckComputeInstanceTemplateHasAliasIpRange(&instanceTemplate, "inst-test-secondary", "/24"),
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
|
resource.TestStep{
|
||||||
|
ResourceName: "google_compute_instance_template.foobar",
|
||||||
|
ImportState: true,
|
||||||
|
ImportStateVerify: true,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@ -307,6 +357,11 @@ func TestAccComputeInstanceTemplate_guestAccelerator(t *testing.T) {
|
|||||||
testAccCheckComputeInstanceTemplateHasGuestAccelerator(&instanceTemplate, "nvidia-tesla-k80", 1),
|
testAccCheckComputeInstanceTemplateHasGuestAccelerator(&instanceTemplate, "nvidia-tesla-k80", 1),
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
|
resource.TestStep{
|
||||||
|
ResourceName: "google_compute_instance_template.foobar",
|
||||||
|
ImportState: true,
|
||||||
|
ImportStateVerify: true,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
@ -329,6 +384,11 @@ func TestAccComputeInstanceTemplate_minCpuPlatform(t *testing.T) {
|
|||||||
testAccCheckComputeInstanceTemplateHasMinCpuPlatform(&instanceTemplate, DEFAULT_MIN_CPU_TEST_VALUE),
|
testAccCheckComputeInstanceTemplateHasMinCpuPlatform(&instanceTemplate, DEFAULT_MIN_CPU_TEST_VALUE),
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
|
resource.TestStep{
|
||||||
|
ResourceName: "google_compute_instance_template.foobar",
|
||||||
|
ImportState: true,
|
||||||
|
ImportStateVerify: true,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
@ -22,11 +22,16 @@ func TestAccComputeProjectMetadataItem_basic(t *testing.T) {
|
|||||||
CheckDestroy: testAccCheckProjectMetadataItemDestroy,
|
CheckDestroy: testAccCheckProjectMetadataItemDestroy,
|
||||||
Steps: []resource.TestStep{
|
Steps: []resource.TestStep{
|
||||||
{
|
{
|
||||||
Config: testAccProjectMetadataItem_basic(key, "myValue"),
|
Config: testAccProjectMetadataItem_basicWithResourceName("foobar", key, "myValue"),
|
||||||
Check: resource.ComposeTestCheckFunc(
|
Check: resource.ComposeTestCheckFunc(
|
||||||
testAccCheckProjectMetadataItem_hasMetadata(key, "myValue"),
|
testAccCheckProjectMetadataItem_hasMetadata(key, "myValue"),
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
ResourceName: "google_compute_project_metadata_item.foobar",
|
||||||
|
ImportState: true,
|
||||||
|
ImportStateVerify: true,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@ -67,11 +72,16 @@ func TestAccComputeProjectMetadataItem_basicWithEmptyVal(t *testing.T) {
|
|||||||
CheckDestroy: testAccCheckProjectMetadataItemDestroy,
|
CheckDestroy: testAccCheckProjectMetadataItemDestroy,
|
||||||
Steps: []resource.TestStep{
|
Steps: []resource.TestStep{
|
||||||
{
|
{
|
||||||
Config: testAccProjectMetadataItem_basic(key, ""),
|
Config: testAccProjectMetadataItem_basicWithResourceName("foobar", key, ""),
|
||||||
Check: resource.ComposeTestCheckFunc(
|
Check: resource.ComposeTestCheckFunc(
|
||||||
testAccCheckProjectMetadataItem_hasMetadata(key, ""),
|
testAccCheckProjectMetadataItem_hasMetadata(key, ""),
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
ResourceName: "google_compute_project_metadata_item.foobar",
|
||||||
|
ImportState: true,
|
||||||
|
ImportStateVerify: true,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
@ -30,6 +30,11 @@ func TestAccComputeRegionAutoscaler_basic(t *testing.T) {
|
|||||||
"google_compute_region_autoscaler.foobar", &ascaler),
|
"google_compute_region_autoscaler.foobar", &ascaler),
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
|
resource.TestStep{
|
||||||
|
ResourceName: "google_compute_region_autoscaler.foobar",
|
||||||
|
ImportState: true,
|
||||||
|
ImportStateVerify: true,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
@ -23,6 +23,11 @@ func TestAccComputeRouterInterface_basic(t *testing.T) {
|
|||||||
Check: testAccCheckComputeRouterInterfaceExists(
|
Check: testAccCheckComputeRouterInterfaceExists(
|
||||||
"google_compute_router_interface.foobar"),
|
"google_compute_router_interface.foobar"),
|
||||||
},
|
},
|
||||||
|
resource.TestStep{
|
||||||
|
ResourceName: "google_compute_router_interface.foobar",
|
||||||
|
ImportState: true,
|
||||||
|
ImportStateVerify: true,
|
||||||
|
},
|
||||||
resource.TestStep{
|
resource.TestStep{
|
||||||
Config: testAccComputeRouterInterfaceKeepRouter(testId),
|
Config: testAccComputeRouterInterfaceKeepRouter(testId),
|
||||||
Check: testAccCheckComputeRouterInterfaceDelete(
|
Check: testAccCheckComputeRouterInterfaceDelete(
|
||||||
|
@ -23,6 +23,11 @@ func TestAccComputeRouterPeer_basic(t *testing.T) {
|
|||||||
Check: testAccCheckComputeRouterPeerExists(
|
Check: testAccCheckComputeRouterPeerExists(
|
||||||
"google_compute_router_peer.foobar"),
|
"google_compute_router_peer.foobar"),
|
||||||
},
|
},
|
||||||
|
resource.TestStep{
|
||||||
|
ResourceName: "google_compute_router_peer.foobar",
|
||||||
|
ImportState: true,
|
||||||
|
ImportStateVerify: true,
|
||||||
|
},
|
||||||
resource.TestStep{
|
resource.TestStep{
|
||||||
Config: testAccComputeRouterPeerKeepRouter(testId),
|
Config: testAccComputeRouterPeerKeepRouter(testId),
|
||||||
Check: testAccCheckComputeRouterPeerDelete(
|
Check: testAccCheckComputeRouterPeerDelete(
|
||||||
|
@ -24,6 +24,12 @@ func TestAccComputeSslCertificate_basic(t *testing.T) {
|
|||||||
"google_compute_ssl_certificate.foobar"),
|
"google_compute_ssl_certificate.foobar"),
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
|
resource.TestStep{
|
||||||
|
ResourceName: "google_compute_ssl_certificate.foobar",
|
||||||
|
ImportState: true,
|
||||||
|
ImportStateVerify: true,
|
||||||
|
ImportStateVerifyIgnore: []string{"private_key"},
|
||||||
|
},
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@ -142,14 +148,3 @@ resource "google_compute_ssl_certificate" "foobar" {
|
|||||||
}
|
}
|
||||||
`, acctest.RandString(10))
|
`, acctest.RandString(10))
|
||||||
}
|
}
|
||||||
|
|
||||||
func testAccComputeSslCertificate_import() string {
|
|
||||||
return fmt.Sprintf(`
|
|
||||||
resource "google_compute_ssl_certificate" "foobar" {
|
|
||||||
name = "sslcert-test-%s"
|
|
||||||
description = "very descriptive"
|
|
||||||
private_key = "${file("test-fixtures/ssl_cert/test.key")}"
|
|
||||||
certificate = "${file("test-fixtures/ssl_cert/test.crt")}"
|
|
||||||
}
|
|
||||||
`, acctest.RandString(10))
|
|
||||||
}
|
|
||||||
|
@ -30,6 +30,11 @@ func TestAccComputeTargetHttpProxy_basic(t *testing.T) {
|
|||||||
"google_compute_target_http_proxy.foobar"),
|
"google_compute_target_http_proxy.foobar"),
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
|
resource.TestStep{
|
||||||
|
ResourceName: "google_compute_target_http_proxy.foobar",
|
||||||
|
ImportState: true,
|
||||||
|
ImportStateVerify: true,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
@ -31,6 +31,11 @@ func TestAccComputeTargetHttpsProxy_basic(t *testing.T) {
|
|||||||
testAccComputeTargetHttpsProxyHasSslCertificate("httpsproxy-test-cert1-"+resourceSuffix, &proxy),
|
testAccComputeTargetHttpsProxyHasSslCertificate("httpsproxy-test-cert1-"+resourceSuffix, &proxy),
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
|
resource.TestStep{
|
||||||
|
ResourceName: "google_compute_target_https_proxy.foobar",
|
||||||
|
ImportState: true,
|
||||||
|
ImportStateVerify: true,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
@ -28,6 +28,11 @@ func TestAccComputeTargetPool_basic(t *testing.T) {
|
|||||||
testAccCheckComputeTargetPoolHealthCheck("google_compute_target_pool.bar", "google_compute_http_health_check.foobar"),
|
testAccCheckComputeTargetPoolHealthCheck("google_compute_target_pool.bar", "google_compute_http_health_check.foobar"),
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
|
resource.TestStep{
|
||||||
|
ResourceName: "google_compute_target_pool.foo",
|
||||||
|
ImportState: true,
|
||||||
|
ImportStateVerify: true,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
@ -27,6 +27,11 @@ func TestAccComputeTargetSslProxy_basic(t *testing.T) {
|
|||||||
"google_compute_target_ssl_proxy.foobar", "NONE", cert),
|
"google_compute_target_ssl_proxy.foobar", "NONE", cert),
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
|
resource.TestStep{
|
||||||
|
ResourceName: "google_compute_target_ssl_proxy.foobar",
|
||||||
|
ImportState: true,
|
||||||
|
ImportStateVerify: true,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
@ -28,6 +28,11 @@ func TestAccComputeTargetTcpProxy_basic(t *testing.T) {
|
|||||||
"google_compute_target_tcp_proxy.foobar"),
|
"google_compute_target_tcp_proxy.foobar"),
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
|
resource.TestStep{
|
||||||
|
ResourceName: "google_compute_target_tcp_proxy.foobar",
|
||||||
|
ImportState: true,
|
||||||
|
ImportStateVerify: true,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
@ -27,6 +27,12 @@ func TestAccComputeUrlMap_basic(t *testing.T) {
|
|||||||
"google_compute_url_map.foobar"),
|
"google_compute_url_map.foobar"),
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
|
resource.TestStep{
|
||||||
|
ResourceName: "google_compute_url_map.foobar",
|
||||||
|
ImportState: true,
|
||||||
|
ImportStateVerify: true,
|
||||||
|
ImportStateVerifyIgnore: []string{"host_rule", "path_matcher", "test"},
|
||||||
|
},
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user