2016-06-23 04:10:31 +02:00
|
|
|
package aws
|
|
|
|
|
|
|
|
import (
|
|
|
|
"testing"
|
|
|
|
|
2017-02-02 19:03:39 +01:00
|
|
|
"github.com/hashicorp/terraform/helper/acctest"
|
2016-06-23 04:10:31 +02:00
|
|
|
"github.com/hashicorp/terraform/helper/resource"
|
|
|
|
)
|
|
|
|
|
|
|
|
func TestAccAWSIAMGroup_importBasic(t *testing.T) {
|
2017-02-02 19:03:39 +01:00
|
|
|
rInt := acctest.RandInt()
|
2016-06-23 04:10:31 +02:00
|
|
|
resourceName := "aws_iam_group.group"
|
|
|
|
|
|
|
|
resource.Test(t, resource.TestCase{
|
|
|
|
PreCheck: func() { testAccPreCheck(t) },
|
|
|
|
Providers: testAccProviders,
|
|
|
|
CheckDestroy: testAccCheckAWSGroupDestroy,
|
|
|
|
Steps: []resource.TestStep{
|
2017-02-02 19:03:39 +01:00
|
|
|
{
|
|
|
|
Config: testAccAWSGroupConfig(rInt),
|
2016-06-23 04:10:31 +02:00
|
|
|
},
|
|
|
|
|
2017-02-02 19:03:39 +01:00
|
|
|
{
|
2016-06-23 04:10:31 +02:00
|
|
|
ResourceName: resourceName,
|
|
|
|
ImportState: true,
|
|
|
|
ImportStateVerify: true,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
})
|
|
|
|
}
|