Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

service/iam: Handle read-after-create eventual consistency in IAM User resources #18458

Merged
merged 3 commits into from
Apr 2, 2021

Commits on Mar 29, 2021

  1. service/iam: Handle read-after-create eventual consistency in IAM Use…

    …r resources
    
    Reference: #16796
    
    Output from acceptance testing in AWS Commercial:
    
    ```
    --- PASS: TestAccAWSIAMUserPolicy_basic (38.41s)
    --- PASS: TestAccAWSIAMUserPolicy_disappears (23.13s)
    --- PASS: TestAccAWSIAMUserPolicy_generatedName (40.70s)
    --- PASS: TestAccAWSIAMUserPolicy_multiplePolicies (48.72s)
    --- PASS: TestAccAWSIAMUserPolicy_namePrefix (41.87s)
    
    --- PASS: TestAccAWSUser_basic (36.07s)
    --- PASS: TestAccAWSUser_disappears (20.47s)
    --- PASS: TestAccAWSUser_ForceDestroy_AccessKey (27.25s)
    --- PASS: TestAccAWSUser_ForceDestroy_LoginProfile (43.02s)
    --- PASS: TestAccAWSUser_ForceDestroy_MFADevice (24.70s)
    --- PASS: TestAccAWSUser_ForceDestroy_SigningCertificate (27.38s)
    --- PASS: TestAccAWSUser_ForceDestroy_SSHKey (26.60s)
    --- PASS: TestAccAWSUser_nameChange (27.75s)
    --- PASS: TestAccAWSUser_pathChange (31.26s)
    --- PASS: TestAccAWSUser_permissionsBoundary (70.82s)
    --- PASS: TestAccAWSUser_tags (36.07s)
    
    --- PASS: TestAccAWSUserGroupMembership_basic (81.80s)
    
    --- PASS: TestAccAWSUserLoginProfile_basic (32.17s)
    --- PASS: TestAccAWSUserLoginProfile_keybase (48.60s)
    --- PASS: TestAccAWSUserLoginProfile_keybaseDoesntExist (14.41s)
    --- PASS: TestAccAWSUserLoginProfile_notAKey (14.70s)
    --- PASS: TestAccAWSUserLoginProfile_PasswordLength (45.94s)
    
    --- PASS: TestAccAWSUserPolicyAttachment_basic (38.58s)
    
    --- PASS: TestAccAWSUserSSHKey_basic (26.70s)
    --- PASS: TestAccAWSUserSSHKey_pemEncoding (26.11s)
    ```
    
    Output from acceptance testing in AWS GovCloud (US):
    
    ```
    --- PASS: TestAccAWSIAMUserPolicy_basic (59.83s)
    --- PASS: TestAccAWSIAMUserPolicy_disappears (23.85s)
    --- PASS: TestAccAWSIAMUserPolicy_generatedName (54.43s)
    --- PASS: TestAccAWSIAMUserPolicy_multiplePolicies (80.63s)
    --- PASS: TestAccAWSIAMUserPolicy_namePrefix (53.68s)
    
    --- PASS: TestAccAWSUser_basic (35.77s)
    --- PASS: TestAccAWSUser_disappears (18.71s)
    --- PASS: TestAccAWSUser_ForceDestroy_AccessKey (32.21s)
    --- PASS: TestAccAWSUser_ForceDestroy_LoginProfile (40.12s)
    --- PASS: TestAccAWSUser_ForceDestroy_MFADevice (47.70s)
    --- PASS: TestAccAWSUser_ForceDestroy_SigningCertificate (31.31s)
    --- PASS: TestAccAWSUser_ForceDestroy_SSHKey (29.54s)
    --- PASS: TestAccAWSUser_nameChange (36.80s)
    --- PASS: TestAccAWSUser_pathChange (37.43s)
    --- PASS: TestAccAWSUser_permissionsBoundary (98.35s)
    --- PASS: TestAccAWSUser_tags (46.03s)
    
    --- PASS: TestAccAWSUserGroupMembership_basic (104.29s)
    
    --- PASS: TestAccAWSUserLoginProfile_basic (55.38s)
    --- PASS: TestAccAWSUserLoginProfile_keybase (48.45s)
    --- PASS: TestAccAWSUserLoginProfile_keybaseDoesntExist (33.47s)
    --- PASS: TestAccAWSUserLoginProfile_notAKey (27.08s)
    --- PASS: TestAccAWSUserLoginProfile_PasswordLength (29.66s)
    
    --- PASS: TestAccAWSUserPolicyAttachment_basic (51.20s)
    
    --- PASS: TestAccAWSUserSSHKey_basic (31.28s)
    --- PASS: TestAccAWSUserSSHKey_pemEncoding (28.18s)
    ```
    bflad committed Mar 29, 2021
    Configuration menu
    Copy the full SHA
    5347bb9 View commit details
    Browse the repository at this point in the history
  2. Update CHANGELOG for #18458

    bflad committed Mar 29, 2021
    Configuration menu
    Copy the full SHA
    fc9a431 View commit details
    Browse the repository at this point in the history
  3. resource/aws_iam_user_policy_attachment: Remove unused iamUserHasPoli…

    …cyARNAttachment function
    
    Previously:
    
    ```
    aws/resource_aws_iam_user_policy_attachment.go:162:6: `iamUserHasPolicyARNAttachment` is unused (deadcode)
    func iamUserHasPolicyARNAttachment(conn *iam.IAM, user string, policyARN string) (bool, error) {
         ^
    ```
    bflad committed Mar 29, 2021
    Configuration menu
    Copy the full SHA
    4055443 View commit details
    Browse the repository at this point in the history