mirror of
https://github.com/letic/terraform-provider-google.git
synced 2024-09-07 09:36:44 +00:00
33 lines
830 B
Go
33 lines
830 B
Go
![]() |
package google
|
||
|
|
||
|
import (
|
||
|
"fmt"
|
||
|
"testing"
|
||
|
|
||
|
"github.com/hashicorp/terraform/helper/acctest"
|
||
|
"github.com/hashicorp/terraform/helper/resource"
|
||
|
)
|
||
|
|
||
|
func TestAccComputeFirewall_importBasic(t *testing.T) {
|
||
|
resourceName := "google_compute_firewall.foobar"
|
||
|
networkName := fmt.Sprintf("firewall-test-%s", acctest.RandString(10))
|
||
|
firewallName := fmt.Sprintf("firewall-test-%s", acctest.RandString(10))
|
||
|
|
||
|
resource.Test(t, resource.TestCase{
|
||
|
PreCheck: func() { testAccPreCheck(t) },
|
||
|
Providers: testAccProviders,
|
||
|
CheckDestroy: testAccCheckComputeFirewallDestroy,
|
||
|
Steps: []resource.TestStep{
|
||
|
resource.TestStep{
|
||
|
Config: testAccComputeFirewall_basic(networkName, firewallName),
|
||
|
},
|
||
|
|
||
|
resource.TestStep{
|
||
|
ResourceName: resourceName,
|
||
|
ImportState: true,
|
||
|
ImportStateVerify: true,
|
||
|
},
|
||
|
},
|
||
|
})
|
||
|
}
|