Merge pull request #7294 from hashicorp/import-aws-iampp
provider/aws: Support Import for `aws_iam_account_password_policy`
This commit is contained in:
commit
51af5e793d
|
@ -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,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
})
|
||||||
|
}
|
|
@ -17,6 +17,9 @@ func resourceAwsIamAccountPasswordPolicy() *schema.Resource {
|
||||||
Read: resourceAwsIamAccountPasswordPolicyRead,
|
Read: resourceAwsIamAccountPasswordPolicyRead,
|
||||||
Update: resourceAwsIamAccountPasswordPolicyUpdate,
|
Update: resourceAwsIamAccountPasswordPolicyUpdate,
|
||||||
Delete: resourceAwsIamAccountPasswordPolicyDelete,
|
Delete: resourceAwsIamAccountPasswordPolicyDelete,
|
||||||
|
Importer: &schema.ResourceImporter{
|
||||||
|
State: schema.ImportStatePassthrough,
|
||||||
|
},
|
||||||
|
|
||||||
Schema: map[string]*schema.Schema{
|
Schema: map[string]*schema.Schema{
|
||||||
"allow_users_to_change_password": &schema.Schema{
|
"allow_users_to_change_password": &schema.Schema{
|
||||||
|
|
Loading…
Reference in New Issue