Skip to content

resource/aws_iam_access_key: Ensure Inactive status is properly configured during resource creation#17322

Merged
bflad merged 3 commits into
mainfrom
b-aws_iam_access_key-inactive-on-create
Jan 29, 2021
Merged

resource/aws_iam_access_key: Ensure Inactive status is properly configured during resource creation#17322
bflad merged 3 commits into
mainfrom
b-aws_iam_access_key-inactive-on-create

Conversation

@bflad

@bflad bflad commented Jan 28, 2021

Copy link
Copy Markdown
Contributor

Community Note

  • Please vote on this pull request by adding a 👍 reaction to the original pull request comment to help the community and maintainers prioritize this request
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for pull request followers and do not help prioritize the request

Closes #16818

Previously before code updates:

=== CONT  TestAccAWSAccessKey_Status
    resource_aws_iam_access_key_test.go:71: Step 1/3 error: Check failed: Check 2/2 error: aws_iam_access_key.a_key: Attribute 'status' expected "Inactive", got "Active"
--- FAIL: TestAccAWSAccessKey_Status (5.97s)

Output from acceptance testing:

--- PASS: TestAccAWSAccessKey_basic (8.96s)
--- PASS: TestAccAWSAccessKey_encrypted (9.13s)
--- PASS: TestAccAWSAccessKey_Status (27.74s)

…gured during resource creation

Reference: #16818

Previously before code updates:

```
=== CONT  TestAccAWSAccessKey_Status
    resource_aws_iam_access_key_test.go:71: Step 1/3 error: Check failed: Check 2/2 error: aws_iam_access_key.a_key: Attribute 'status' expected "Inactive", got "Active"
--- FAIL: TestAccAWSAccessKey_Status (5.97s)
```

Output from acceptance testing:

```
--- PASS: TestAccAWSAccessKey_basic (8.96s)
--- PASS: TestAccAWSAccessKey_encrypted (9.13s)
--- PASS: TestAccAWSAccessKey_Status (27.74s)
```
@bflad bflad added the bug Addresses a defect in current functionality. label Jan 28, 2021
@bflad bflad requested a review from a team as a code owner January 28, 2021 00:54
@ghost ghost added size/S Managed by automation to categorize the size of a PR. service/iam Issues and PRs that pertain to the iam service. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. labels Jan 28, 2021

@YakDriver YakDriver left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great 🎉

GovCloud:

--- PASS: TestAccAWSAccessKey_encrypted (16.38s)
--- PASS: TestAccAWSAccessKey_basic (16.39s)
--- PASS: TestAccAWSAccessKey_Status (39.30s)

us-west-2:

--- PASS: TestAccAWSAccessKey_basic (8.98s)
--- PASS: TestAccAWSAccessKey_encrypted (9.54s)
--- PASS: TestAccAWSAccessKey_Status (23.74s)

@bflad

bflad commented Jan 29, 2021

Copy link
Copy Markdown
Contributor Author

Gah, I was trying so hard not to have the 3 aws_iam_access_key resource pull requests have merge conflicts, but this one finally did. 😛 Rebased and re-verified:

--- PASS: TestAccAWSAccessKey_basic (11.81s)
--- PASS: TestAccAWSAccessKey_encrypted (12.11s)
--- PASS: TestAccAWSAccessKey_Status (25.44s)

@bflad bflad merged commit 11525f3 into main Jan 29, 2021
@bflad bflad deleted the b-aws_iam_access_key-inactive-on-create branch January 29, 2021 18:43
@github-actions github-actions Bot added this to the v3.27.0 milestone Jan 29, 2021
github-actions Bot pushed a commit that referenced this pull request Jan 29, 2021
@ghost

ghost commented Feb 5, 2021

Copy link
Copy Markdown

This has been released in version 3.27.0 of the Terraform AWS provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.

For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template for triage. Thanks!

@ghost

ghost commented Mar 1, 2021

Copy link
Copy Markdown

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thanks!

@ghost ghost locked as resolved and limited conversation to collaborators Mar 1, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

bug Addresses a defect in current functionality. service/iam Issues and PRs that pertain to the iam service. size/S Managed by automation to categorize the size of a PR. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

aws_iam_access_key keys created with state = "Inactive" are in fact Active

3 participants