terraform/builtin/providers/azurerm/import_arm_loadbalancer_tes...

30 lines
665 B
Go

package azurerm
import (
"testing"
"github.com/hashicorp/terraform/helper/acctest"
"github.com/hashicorp/terraform/helper/resource"
)
func TestAccAzureRMLoadBalancer_importBasic(t *testing.T) {
resourceName := "azurerm_lb.test"
resource.Test(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
Providers: testAccProviders,
CheckDestroy: testCheckAzureRMLoadBalancerDestroy,
Steps: []resource.TestStep{
resource.TestStep{
Config: testAccAzureRMLoadBalancer_basic(acctest.RandInt()),
},
resource.TestStep{
ResourceName: resourceName,
ImportState: true,
ImportStateVerify: true,
},
},
})
}