mirror of
https://github.com/letic/terraform-provider-google.git
synced 2024-09-07 01:26:43 +00:00
![Joe Selman](/assets/img/avatar_default.png)
* Add compute_backend_service import support * Fixed the nit * Made example names a bit more intuitive * Use underscores wherever possible instead of dashes
31 lines
806 B
Go
31 lines
806 B
Go
package google
|
|
|
|
import (
|
|
"fmt"
|
|
"testing"
|
|
|
|
"github.com/hashicorp/terraform/helper/acctest"
|
|
"github.com/hashicorp/terraform/helper/resource"
|
|
)
|
|
|
|
func TestAccComputeBackendService_importBasic(t *testing.T) {
|
|
serviceName := fmt.Sprintf("tf-test-%s", acctest.RandString(10))
|
|
checkName := fmt.Sprintf("tf-test-%s", acctest.RandString(10))
|
|
|
|
resource.Test(t, resource.TestCase{
|
|
PreCheck: func() { testAccPreCheck(t) },
|
|
Providers: testAccProviders,
|
|
CheckDestroy: testAccCheckComputeBackendServiceDestroy,
|
|
Steps: []resource.TestStep{
|
|
resource.TestStep{
|
|
Config: testAccComputeBackendService_basic(serviceName, checkName),
|
|
},
|
|
resource.TestStep{
|
|
ResourceName: "google_compute_backend_service.foobar",
|
|
ImportState: true,
|
|
ImportStateVerify: true,
|
|
},
|
|
},
|
|
})
|
|
}
|