github.com/richardmarshall/terraform@v0.9.5-0.20170429023105-15704cc6ee35/builtin/providers/azurerm/import_arm_loadbalancer_nat_rule_test.go (about) 1 package azurerm 2 3 import ( 4 "fmt" 5 "testing" 6 7 "github.com/hashicorp/terraform/helper/acctest" 8 "github.com/hashicorp/terraform/helper/resource" 9 ) 10 11 func TestAccAzureRMLoadBalancerNatRule_importBasic(t *testing.T) { 12 resourceName := "azurerm_lb_nat_rule.test" 13 14 ri := acctest.RandInt() 15 natRuleName := fmt.Sprintf("NatRule-%d", ri) 16 17 resource.Test(t, resource.TestCase{ 18 PreCheck: func() { testAccPreCheck(t) }, 19 Providers: testAccProviders, 20 CheckDestroy: testCheckAzureRMLoadBalancerDestroy, 21 Steps: []resource.TestStep{ 22 resource.TestStep{ 23 Config: testAccAzureRMLoadBalancerNatRule_basic(ri, natRuleName), 24 }, 25 26 resource.TestStep{ 27 ResourceName: resourceName, 28 ImportState: true, 29 ImportStateVerify: true, 30 // location is deprecated and was never actually used 31 ImportStateVerifyIgnore: []string{"location"}, 32 }, 33 }, 34 }) 35 }