mirror of
https://github.com/letic/terraform-provider-google.git
synced 2024-09-06 09:06:44 +00:00
35 lines
1.1 KiB
Go
35 lines
1.1 KiB
Go
![]() |
package google
|
||
|
|
||
|
import (
|
||
|
"fmt"
|
||
|
"github.com/hashicorp/terraform/helper/acctest"
|
||
|
"github.com/hashicorp/terraform/helper/resource"
|
||
|
"testing"
|
||
|
)
|
||
|
|
||
|
func TestAccComputeGlobalForwardingRule_import(t *testing.T) {
|
||
|
t.Parallel()
|
||
|
|
||
|
fr := fmt.Sprintf("forwardrule-test-%s", acctest.RandString(10))
|
||
|
proxy1 := fmt.Sprintf("forwardrule-test-%s", acctest.RandString(10))
|
||
|
proxy2 := fmt.Sprintf("forwardrule-test-%s", acctest.RandString(10))
|
||
|
backend := fmt.Sprintf("forwardrule-test-%s", acctest.RandString(10))
|
||
|
hc := fmt.Sprintf("forwardrule-test-%s", acctest.RandString(10))
|
||
|
urlmap := fmt.Sprintf("forwardrule-test-%s", acctest.RandString(10))
|
||
|
|
||
|
resource.Test(t, resource.TestCase{
|
||
|
PreCheck: func() { testAccPreCheck(t) },
|
||
|
Providers: testAccProviders,
|
||
|
CheckDestroy: testAccCheckComputeGlobalForwardingRuleDestroy,
|
||
|
Steps: []resource.TestStep{
|
||
|
resource.TestStep{
|
||
|
Config: testAccComputeGlobalForwardingRule_basic1(fr, proxy1, proxy2, backend, hc, urlmap),
|
||
|
},
|
||
|
resource.TestStep{
|
||
|
ResourceName: "google_compute_global_forwarding_rule.foobar",
|
||
|
ImportState: true,
|
||
|
ImportStateVerify: true,
|
||
|
},
|
||
|
}})
|
||
|
}
|