package google import ( "fmt" "testing" "github.com/hashicorp/terraform/helper/acctest" "github.com/hashicorp/terraform/helper/resource" ) func TestAccContainerCluster_import(t *testing.T) { t.Parallel() resourceName := "google_container_cluster.primary" name := fmt.Sprintf("tf-cluster-test-%s", acctest.RandString(10)) conf := testAccContainerCluster_basic(name) resource.Test(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckContainerClusterDestroy, Steps: []resource.TestStep{ resource.TestStep{ Config: conf, }, resource.TestStep{ ResourceName: resourceName, ImportStateIdPrefix: "us-central1-a/", ImportState: true, ImportStateVerify: true, }, }, }) }