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

r/aws_iam_role: Remove role_last_used attribute #31656

Merged
merged 3 commits into from
Jun 1, 2023

Conversation

jar-b
Copy link
Member

@jar-b jar-b commented May 30, 2023

Description

Removes the recently added read-only role_last_used attribute to address the concerns expressed in #30861. While technically a breaking change, we've opted to remove the attribute in a minor release rather than wait until v6.0.0 (12-18 months from now). We are considering a breaking change acceptable in this context for the following reasons:

  1. The attribute, while functioning correctly, is causing a negative user experience, evidenced by the number of upvotes and comments on the linked issue in a relatively short time since its release.
  2. The attribute is relatively new (release with v4.64.0, from April 2023), read-only, and unlikely to be used as an input to any other resource.
  3. The corresponding data source provides an alternative source for this information.

Relations

Closes #30861
Relates #30750

Output from Acceptance Testing

$ make testacc PKG=iam TESTS=TestAccIAMRole_
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/iam/... -v -count 1 -parallel 20 -run='TestAccIAMRole_'  -timeout 180m

--- PASS: TestAccIAMRole_badJSON (5.70s)
=== CONT  TestAccIAMRole_permissionsBoundary
--- PASS: TestAccIAMRole_InlinePolicy_empty (39.38s)
=== CONT  TestAccIAMRole_policiesForceDetach
--- PASS: TestAccIAMRole_nameGenerated (43.76s)
=== CONT  TestAccIAMRole_disappears
--- PASS: TestAccIAMRole_basic (46.95s)
=== CONT  TestAccIAMRole_diffs
--- PASS: TestAccIAMRole_namePrefix (47.13s)
=== CONT  TestAccIAMRole_description
--- PASS: TestAccIAMRole_ManagedPolicy_outOfBandAdditionIgnored (66.48s)
--- PASS: TestAccIAMRole_InlinePolicy_outOfBandRemovalAddedBack (66.78s)
--- PASS: TestAccIAMRole_InlinePolicy_outOfBandAdditionRemovedEmpty (69.50s)
--- PASS: TestAccIAMRole_ManagedPolicy_outOfBandRemovalAddedBack (69.84s)
--- PASS: TestAccIAMRole_InlinePolicy_outOfBandAdditionRemoved (69.88s)
--- PASS: TestAccIAMRole_ManagedPolicy_outOfBandAdditionRemovedEmpty (71.52s)
--- PASS: TestAccIAMRole_ManagedPolicy_outOfBandAdditionRemoved (71.81s)
--- PASS: TestAccIAMRole_testNameChange (73.54s)
--- PASS: TestAccIAMRole_tags (73.73s)
--- PASS: TestAccIAMRole_disappears (32.68s)
--- PASS: TestAccIAMRole_policiesForceDetach (38.74s)
--- PASS: TestAccIAMRole_maxSessionDuration (79.21s)
--- PASS: TestAccIAMRole_InlinePolicy_outOfBandAdditionIgnored (82.68s)
--- PASS: TestAccIAMRole_InlinePolicy_ignoreOrder (83.94s)
--- PASS: TestAccIAMRole_ManagedPolicy_basic (86.92s)
--- PASS: TestAccIAMRole_InlinePolicy_basic (87.95s)
--- PASS: TestAccIAMRole_description (56.24s)
--- PASS: TestAccIAMRole_diffsCondition (106.23s)
--- PASS: TestAccIAMRole_permissionsBoundary (103.47s)
--- PASS: TestAccIAMRole_diffs (225.03s)
PASS
ok      github.com/hashicorp/terraform-provider-aws/internal/service/iam        275.285s
$ make testacc PKG=iam TESTS=TestAccIAMRoleDataSource_
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/iam/... -v -count 1 -parallel 20 -run='TestAccIAMRoleDataSource_'  -timeout 180m

--- PASS: TestAccIAMRoleDataSource_tags (13.13s)
--- PASS: TestAccIAMRoleDataSource_basic (13.14s)
PASS
ok      github.com/hashicorp/terraform-provider-aws/internal/service/iam        16.373s

@github-actions
Copy link

Community Note

Voting for Prioritization

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

For Submitters

  • Review the contribution guide relating to the type of change you are making to ensure all of the necessary steps have been taken.
  • For new resources and data sources, use skaff to generate scaffolding with comments detailing common expectations.
  • Whether or not the branch has been rebased will not impact prioritization, but doing so is always a welcome surprise.

@github-actions github-actions bot added documentation Introduces or discusses updates to documentation. service/iam Issues and PRs that pertain to the iam service. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. size/S Managed by automation to categorize the size of a PR. and removed documentation Introduces or discusses updates to documentation. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. service/iam Issues and PRs that pertain to the iam service. labels May 30, 2023
@jar-b jar-b added service/iam Issues and PRs that pertain to the iam service. breaking-change Introduces a breaking change in current functionality; usually deferred to the next major release. labels May 30, 2023
@github-actions github-actions bot added size/M Managed by automation to categorize the size of a PR. documentation Introduces or discusses updates to documentation. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. and removed size/S Managed by automation to categorize the size of a PR. labels May 30, 2023
Copy link
Contributor

@ewbankkit ewbankkit left a comment

Choose a reason for hiding this comment

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

LGTM 🚀.

% make testacc TESTARGS='-run=TestAccIAMRole_' PKG=iam ACCTEST_PARALLELISM=2
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/iam/... -v -count 1 -parallel 2  -run=TestAccIAMRole_ -timeout 180m
=== RUN   TestAccIAMRole_basic
=== PAUSE TestAccIAMRole_basic
=== RUN   TestAccIAMRole_description
=== PAUSE TestAccIAMRole_description
=== RUN   TestAccIAMRole_nameGenerated
=== PAUSE TestAccIAMRole_nameGenerated
=== RUN   TestAccIAMRole_namePrefix
=== PAUSE TestAccIAMRole_namePrefix
=== RUN   TestAccIAMRole_testNameChange
=== PAUSE TestAccIAMRole_testNameChange
=== RUN   TestAccIAMRole_diffs
=== PAUSE TestAccIAMRole_diffs
=== RUN   TestAccIAMRole_diffsCondition
=== PAUSE TestAccIAMRole_diffsCondition
=== RUN   TestAccIAMRole_badJSON
=== PAUSE TestAccIAMRole_badJSON
=== RUN   TestAccIAMRole_disappears
=== PAUSE TestAccIAMRole_disappears
=== RUN   TestAccIAMRole_policiesForceDetach
=== PAUSE TestAccIAMRole_policiesForceDetach
=== RUN   TestAccIAMRole_maxSessionDuration
=== PAUSE TestAccIAMRole_maxSessionDuration
=== RUN   TestAccIAMRole_permissionsBoundary
=== PAUSE TestAccIAMRole_permissionsBoundary
=== RUN   TestAccIAMRole_tags
=== PAUSE TestAccIAMRole_tags
=== RUN   TestAccIAMRole_InlinePolicy_basic
=== PAUSE TestAccIAMRole_InlinePolicy_basic
=== RUN   TestAccIAMRole_InlinePolicy_ignoreOrder
=== PAUSE TestAccIAMRole_InlinePolicy_ignoreOrder
=== RUN   TestAccIAMRole_InlinePolicy_empty
=== PAUSE TestAccIAMRole_InlinePolicy_empty
=== RUN   TestAccIAMRole_ManagedPolicy_basic
=== PAUSE TestAccIAMRole_ManagedPolicy_basic
=== RUN   TestAccIAMRole_ManagedPolicy_outOfBandRemovalAddedBack
=== PAUSE TestAccIAMRole_ManagedPolicy_outOfBandRemovalAddedBack
=== RUN   TestAccIAMRole_InlinePolicy_outOfBandRemovalAddedBack
=== PAUSE TestAccIAMRole_InlinePolicy_outOfBandRemovalAddedBack
=== RUN   TestAccIAMRole_ManagedPolicy_outOfBandAdditionRemoved
=== PAUSE TestAccIAMRole_ManagedPolicy_outOfBandAdditionRemoved
=== RUN   TestAccIAMRole_InlinePolicy_outOfBandAdditionRemoved
=== PAUSE TestAccIAMRole_InlinePolicy_outOfBandAdditionRemoved
=== RUN   TestAccIAMRole_InlinePolicy_outOfBandAdditionIgnored
=== PAUSE TestAccIAMRole_InlinePolicy_outOfBandAdditionIgnored
=== RUN   TestAccIAMRole_ManagedPolicy_outOfBandAdditionIgnored
=== PAUSE TestAccIAMRole_ManagedPolicy_outOfBandAdditionIgnored
=== RUN   TestAccIAMRole_InlinePolicy_outOfBandAdditionRemovedEmpty
=== PAUSE TestAccIAMRole_InlinePolicy_outOfBandAdditionRemovedEmpty
=== RUN   TestAccIAMRole_ManagedPolicy_outOfBandAdditionRemovedEmpty
=== PAUSE TestAccIAMRole_ManagedPolicy_outOfBandAdditionRemovedEmpty
=== CONT  TestAccIAMRole_basic
=== CONT  TestAccIAMRole_InlinePolicy_basic
--- PASS: TestAccIAMRole_basic (19.36s)
=== CONT  TestAccIAMRole_badJSON
--- PASS: TestAccIAMRole_badJSON (2.59s)
=== CONT  TestAccIAMRole_tags
--- PASS: TestAccIAMRole_InlinePolicy_basic (47.51s)
=== CONT  TestAccIAMRole_permissionsBoundary
--- PASS: TestAccIAMRole_tags (32.28s)
=== CONT  TestAccIAMRole_maxSessionDuration
--- PASS: TestAccIAMRole_maxSessionDuration (40.63s)
=== CONT  TestAccIAMRole_policiesForceDetach
--- PASS: TestAccIAMRole_policiesForceDetach (21.51s)
=== CONT  TestAccIAMRole_disappears
--- PASS: TestAccIAMRole_permissionsBoundary (76.26s)
=== CONT  TestAccIAMRole_testNameChange
--- PASS: TestAccIAMRole_disappears (14.54s)
=== CONT  TestAccIAMRole_diffsCondition
--- PASS: TestAccIAMRole_testNameChange (32.79s)
=== CONT  TestAccIAMRole_diffs
--- PASS: TestAccIAMRole_diffsCondition (82.19s)
=== CONT  TestAccIAMRole_ManagedPolicy_outOfBandAdditionRemoved
--- PASS: TestAccIAMRole_ManagedPolicy_outOfBandAdditionRemoved (31.99s)
=== CONT  TestAccIAMRole_ManagedPolicy_outOfBandAdditionRemovedEmpty
--- PASS: TestAccIAMRole_ManagedPolicy_outOfBandAdditionRemovedEmpty (29.85s)
=== CONT  TestAccIAMRole_InlinePolicy_outOfBandAdditionRemovedEmpty
--- PASS: TestAccIAMRole_InlinePolicy_outOfBandAdditionRemovedEmpty (31.79s)
=== CONT  TestAccIAMRole_ManagedPolicy_outOfBandAdditionIgnored
--- PASS: TestAccIAMRole_ManagedPolicy_outOfBandAdditionIgnored (27.20s)
=== CONT  TestAccIAMRole_InlinePolicy_outOfBandAdditionIgnored
--- PASS: TestAccIAMRole_InlinePolicy_outOfBandAdditionIgnored (39.77s)
=== CONT  TestAccIAMRole_InlinePolicy_outOfBandAdditionRemoved
--- PASS: TestAccIAMRole_InlinePolicy_outOfBandAdditionRemoved (52.72s)
=== CONT  TestAccIAMRole_InlinePolicy_outOfBandRemovalAddedBack
--- PASS: TestAccIAMRole_diffs (291.05s)
=== CONT  TestAccIAMRole_nameGenerated
--- PASS: TestAccIAMRole_InlinePolicy_outOfBandRemovalAddedBack (32.83s)
=== CONT  TestAccIAMRole_namePrefix
--- PASS: TestAccIAMRole_nameGenerated (21.93s)
=== CONT  TestAccIAMRole_InlinePolicy_empty
--- PASS: TestAccIAMRole_namePrefix (22.90s)
=== CONT  TestAccIAMRole_description
--- PASS: TestAccIAMRole_InlinePolicy_empty (19.67s)
=== CONT  TestAccIAMRole_InlinePolicy_ignoreOrder
--- PASS: TestAccIAMRole_description (47.57s)
=== CONT  TestAccIAMRole_ManagedPolicy_outOfBandRemovalAddedBack
--- PASS: TestAccIAMRole_InlinePolicy_ignoreOrder (42.60s)
=== CONT  TestAccIAMRole_ManagedPolicy_basic
--- PASS: TestAccIAMRole_ManagedPolicy_outOfBandRemovalAddedBack (30.95s)
--- PASS: TestAccIAMRole_ManagedPolicy_basic (46.32s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/iam	583.404s

@jar-b jar-b merged commit 483f3e0 into main Jun 1, 2023
53 checks passed
@jar-b jar-b deleted the td-aws_iam_role-remove-role_last_used branch June 1, 2023 13:26
@github-actions github-actions bot added this to the v5.1.0 milestone Jun 1, 2023
github-actions bot pushed a commit that referenced this pull request Jun 1, 2023
@github-actions
Copy link

github-actions bot commented Jun 1, 2023

This functionality has been released in v5.1.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. Thank you!

@github-actions
Copy link

github-actions bot commented Jul 3, 2023

I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 3, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
breaking-change Introduces a breaking change in current functionality; usually deferred to the next major release. documentation Introduces or discusses updates to documentation. service/iam Issues and PRs that pertain to the iam service. size/M 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.

[Bug]: aws_iam_role role_last_used has changed outside of Terraform
2 participants