-
Notifications
You must be signed in to change notification settings - Fork 9.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
provider/azurerm: support importing of subnet resource (#9646)
TF_ACC=1 go test ./builtin/providers/azurerm -v -run TestAccAzureRMSubnet -timeout 120m === RUN TestAccAzureRMSubnet_importBasic --- PASS: TestAccAzureRMSubnet_importBasic (165.04s) === RUN TestAccAzureRMSubnet_basic --- PASS: TestAccAzureRMSubnet_basic (165.39s) === RUN TestAccAzureRMSubnet_disappears --- PASS: TestAccAzureRMSubnet_disappears (170.02s) PASS ok github.com/hashicorp/terraform/builtin/providers/azurerm 500.533s
- Loading branch information
1 parent
1619a81
commit d920105
Showing
3 changed files
with
60 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
package azurerm | ||
|
||
import ( | ||
"fmt" | ||
"testing" | ||
|
||
"github.com/hashicorp/terraform/helper/acctest" | ||
"github.com/hashicorp/terraform/helper/resource" | ||
) | ||
|
||
func TestAccAzureRMSubnet_importBasic(t *testing.T) { | ||
resourceName := "azurerm_subnet.test" | ||
|
||
ri := acctest.RandInt() | ||
config := fmt.Sprintf(testAccAzureRMSubnet_basic, ri, ri, ri) | ||
|
||
resource.Test(t, resource.TestCase{ | ||
PreCheck: func() { testAccPreCheck(t) }, | ||
Providers: testAccProviders, | ||
CheckDestroy: testCheckAzureRMSubnetDestroy, | ||
Steps: []resource.TestStep{ | ||
resource.TestStep{ | ||
Config: config, | ||
}, | ||
|
||
resource.TestStep{ | ||
ResourceName: resourceName, | ||
ImportState: true, | ||
ImportStateVerify: true, | ||
}, | ||
}, | ||
}) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters