github.com/mohanarpit/terraform@v0.6.16-0.20160909104007-291f29853544/builtin/providers/azurerm/import_arm_availability_set_test.go (about) 1 package azurerm 2 3 import ( 4 "testing" 5 6 "fmt" 7 8 "github.com/hashicorp/terraform/helper/acctest" 9 "github.com/hashicorp/terraform/helper/resource" 10 ) 11 12 func TestAccAzureRMAvailabilitySet_importBasic(t *testing.T) { 13 resourceName := "azurerm_availability_set.test" 14 15 ri := acctest.RandInt() 16 config := fmt.Sprintf(testAccAzureRMVAvailabilitySet_basic, ri, ri) 17 18 resource.Test(t, resource.TestCase{ 19 PreCheck: func() { testAccPreCheck(t) }, 20 Providers: testAccProviders, 21 CheckDestroy: testCheckAzureRMAvailabilitySetDestroy, 22 Steps: []resource.TestStep{ 23 resource.TestStep{ 24 Config: config, 25 }, 26 27 resource.TestStep{ 28 ResourceName: resourceName, 29 ImportState: true, 30 ImportStateVerify: true, 31 ImportStateVerifyIgnore: []string{"resource_group_name"}, 32 //this isn't returned from the API! 33 }, 34 }, 35 }) 36 }