diff --git a/builtin/providers/aws/import_aws_iam_account_password_policy_test.go b/builtin/providers/aws/import_aws_iam_account_password_policy_test.go new file mode 100644 index 000000000..b5fec9eca --- /dev/null +++ b/builtin/providers/aws/import_aws_iam_account_password_policy_test.go @@ -0,0 +1,28 @@ +package aws + +import ( + "testing" + + "github.com/hashicorp/terraform/helper/resource" +) + +func TestAccAWSIAMAccountPasswordPolicy_importBasic(t *testing.T) { + resourceName := "aws_iam_account_password_policy.default" + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSIAMAccountPasswordPolicyDestroy, + Steps: []resource.TestStep{ + resource.TestStep{ + Config: testAccAWSIAMAccountPasswordPolicy, + }, + + resource.TestStep{ + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + }, + }) +} diff --git a/builtin/providers/aws/resource_aws_iam_account_password_policy.go b/builtin/providers/aws/resource_aws_iam_account_password_policy.go index 6f4f092f9..71dfbf0c8 100644 --- a/builtin/providers/aws/resource_aws_iam_account_password_policy.go +++ b/builtin/providers/aws/resource_aws_iam_account_password_policy.go @@ -17,6 +17,9 @@ func resourceAwsIamAccountPasswordPolicy() *schema.Resource { Read: resourceAwsIamAccountPasswordPolicyRead, Update: resourceAwsIamAccountPasswordPolicyUpdate, Delete: resourceAwsIamAccountPasswordPolicyDelete, + Importer: &schema.ResourceImporter{ + State: schema.ImportStatePassthrough, + }, Schema: map[string]*schema.Schema{ "allow_users_to_change_password": &schema.Schema{