providers/aws: placement group import
This commit is contained in:
parent
519f0ae4d6
commit
dc3163c464
|
@ -0,0 +1,28 @@
|
||||||
|
package aws
|
||||||
|
|
||||||
|
import (
|
||||||
|
"testing"
|
||||||
|
|
||||||
|
"github.com/hashicorp/terraform/helper/resource"
|
||||||
|
)
|
||||||
|
|
||||||
|
func TestAccAWSPlacementGroup_importBasic(t *testing.T) {
|
||||||
|
resourceName := "aws_placement_group.pg"
|
||||||
|
|
||||||
|
resource.Test(t, resource.TestCase{
|
||||||
|
PreCheck: func() { testAccPreCheck(t) },
|
||||||
|
Providers: testAccProviders,
|
||||||
|
CheckDestroy: testAccCheckAWSPlacementGroupDestroy,
|
||||||
|
Steps: []resource.TestStep{
|
||||||
|
resource.TestStep{
|
||||||
|
Config: testAccAWSPlacementGroupConfig,
|
||||||
|
},
|
||||||
|
|
||||||
|
resource.TestStep{
|
||||||
|
ResourceName: resourceName,
|
||||||
|
ImportState: true,
|
||||||
|
ImportStateVerify: true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
})
|
||||||
|
}
|
|
@ -17,6 +17,9 @@ func resourceAwsPlacementGroup() *schema.Resource {
|
||||||
Create: resourceAwsPlacementGroupCreate,
|
Create: resourceAwsPlacementGroupCreate,
|
||||||
Read: resourceAwsPlacementGroupRead,
|
Read: resourceAwsPlacementGroupRead,
|
||||||
Delete: resourceAwsPlacementGroupDelete,
|
Delete: resourceAwsPlacementGroupDelete,
|
||||||
|
Importer: &schema.ResourceImporter{
|
||||||
|
State: schema.ImportStatePassthrough,
|
||||||
|
},
|
||||||
|
|
||||||
Schema: map[string]*schema.Schema{
|
Schema: map[string]*schema.Schema{
|
||||||
"name": &schema.Schema{
|
"name": &schema.Schema{
|
||||||
|
|
Loading…
Reference in New Issue