2016-09-29 12:44:58 +02:00
|
|
|
package aws
|
|
|
|
|
|
|
|
import (
|
|
|
|
"testing"
|
|
|
|
|
|
|
|
"github.com/hashicorp/terraform/helper/acctest"
|
|
|
|
"github.com/hashicorp/terraform/helper/resource"
|
|
|
|
)
|
|
|
|
|
2016-10-03 17:45:02 +02:00
|
|
|
func TestAccAWSOpsworksStackImportBasic(t *testing.T) {
|
2016-09-29 12:44:58 +02:00
|
|
|
name := acctest.RandString(10)
|
|
|
|
|
2016-09-29 14:00:52 +02:00
|
|
|
resourceName := "aws_opsworks_stack.tf-acc"
|
2016-09-29 12:44:58 +02:00
|
|
|
|
|
|
|
resource.Test(t, resource.TestCase{
|
|
|
|
PreCheck: func() { testAccPreCheck(t) },
|
|
|
|
Providers: testAccProviders,
|
|
|
|
CheckDestroy: testAccCheckAwsOpsworksStackDestroy,
|
|
|
|
Steps: []resource.TestStep{
|
|
|
|
resource.TestStep{
|
|
|
|
Config: testAccAwsOpsworksStackConfigVpcCreate(name),
|
|
|
|
},
|
|
|
|
|
|
|
|
resource.TestStep{
|
|
|
|
ResourceName: resourceName,
|
|
|
|
ImportState: true,
|
|
|
|
ImportStateVerify: true,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
})
|
|
|
|
}
|