terraform/builtin/providers/aws/import_aws_iam_group_test.go

31 lines
618 B
Go

package aws
import (
"testing"
"github.com/hashicorp/terraform/helper/acctest"
"github.com/hashicorp/terraform/helper/resource"
)
func TestAccAWSIAMGroup_importBasic(t *testing.T) {
rInt := acctest.RandInt()
resourceName := "aws_iam_group.group"
resource.Test(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
Providers: testAccProviders,
CheckDestroy: testAccCheckAWSGroupDestroy,
Steps: []resource.TestStep{
{
Config: testAccAWSGroupConfig(rInt),
},
{
ResourceName: resourceName,
ImportState: true,
ImportStateVerify: true,
},
},
})
}