terraform/builtin/providers/azurerm/import_arm_resource_group_t...

34 lines
729 B
Go

package azurerm
import (
"fmt"
"testing"
"github.com/hashicorp/terraform/helper/acctest"
"github.com/hashicorp/terraform/helper/resource"
)
func TestAccAzureRMResourceGroup_importBasic(t *testing.T) {
resourceName := "azurerm_resource_group.test"
ri := acctest.RandInt()
config := fmt.Sprintf(testAccAzureRMResourceGroup_basic, ri)
resource.Test(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
Providers: testAccProviders,
CheckDestroy: testCheckAzureRMResourceGroupDestroy,
Steps: []resource.TestStep{
resource.TestStep{
Config: config,
},
resource.TestStep{
ResourceName: resourceName,
ImportState: true,
ImportStateVerify: true,
},
},
})
}