-
Notifications
You must be signed in to change notification settings - Fork 9.4k
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
Add new data source: iam_access_keys
#29278
Conversation
This data source can be used to fetch information about IAM access keys of a specific IAM user.
Community NoteVoting for Prioritization
For Submitters
|
iam_access_keys
There was a problem hiding this 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=TestAccIAMAccessKeysDataSource_' PKG=iam
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/iam/... -v -count 1 -parallel 20 -run=TestAccIAMAccessKeysDataSource_ -timeout 180m
=== RUN TestAccIAMAccessKeysDataSource_basic
=== PAUSE TestAccIAMAccessKeysDataSource_basic
=== RUN TestAccIAMAccessKeysDataSource_twoKeys
=== PAUSE TestAccIAMAccessKeysDataSource_twoKeys
=== CONT TestAccIAMAccessKeysDataSource_basic
=== CONT TestAccIAMAccessKeysDataSource_twoKeys
--- PASS: TestAccIAMAccessKeysDataSource_basic (19.56s)
--- PASS: TestAccIAMAccessKeysDataSource_twoKeys (19.63s)
PASS
ok github.com/hashicorp/terraform-provider-aws/internal/service/iam 26.131s
@tmatilai Thanks for the contribution 🎉 👏. |
This functionality has been released in v4.64.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! |
Thanks for merging! 🤗 Btw, the changelog item was not included in the release notes or changelog, maybe because of this failure? |
@tmatilai Actually the problem is there are only 2 backtick characters at the start of |
Oh my 🤦 😂 |
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. |
Description
The
aws_iam_access_keys
data source can be used to fetch information about IAM access keys of a specific IAM user.One use case would be to conditionally create access keys (with the
aws_iam_access_key
resource) for a user only if none exist yet, and pass the created keys to a service which will then rotate them. This way there are no active keys in the Terraform state, nor anywhere outside the service.Relations
Closes #25585
Output from Acceptance Testing