Skip to content

fix: preserve service_password in aws_iam_service_specific_credential Read#47424

Open
vringar wants to merge 1 commit intohashicorp:mainfrom
vringar:fix/iam-service-specific-credential-service-password
Open

fix: preserve service_password in aws_iam_service_specific_credential Read#47424
vringar wants to merge 1 commit intohashicorp:mainfrom
vringar:fix/iam-service-specific-credential-service-password

Conversation

@vringar
Copy link
Copy Markdown

@vringar vringar commented Apr 13, 2026

Rollback Plan

If a change needs to be reverted, we will publish an updated version of the library.

Changes to Security Controls

No.

Description

service_password is always "" in state after aws_iam_service_specific_credential is created. Read uses ListServiceSpecificCredentials which returns no password, so the value set by Create is cleared before state is finalised. Preserve the existing state value in Read.

Relations

Closes #47421

Output from Acceptance Testing

Unable to run acceptance tests (no funded AWS environment). Requesting maintainer run.

@vringar vringar requested a review from a team as a code owner April 13, 2026 18:38
@github-actions
Copy link
Copy Markdown
Contributor

Community Guidelines

This comment is added to every new Pull Request to provide quick reference to how the Terraform AWS Provider is maintained. Please review the information below, and thank you for contributing to the community that keeps the provider thriving! 🚀

Voting for Prioritization

  • Please vote on this Pull Request by adding a 👍 reaction to the original post to help the community and maintainers prioritize it.
  • Please see our prioritization guide for additional information on how the maintainers handle prioritization.
  • Please do not leave +1 or other comments that do not add relevant new information or questions; they generate extra noise for others following the Pull Request and do not help prioritize the request.

Pull Request Authors

  • Review the contribution guide relating to the type of change you are making to ensure all of the necessary steps have been taken.
  • Whether or not the branch has been rebased will not impact prioritization, but doing so is always a welcome surprise.

vringar added a commit to vringar/terraform-provider-aws that referenced this pull request Apr 13, 2026
@dosubot dosubot bot added the bug Addresses a defect in current functionality. label Apr 13, 2026
@github-actions github-actions bot added needs-triage Waiting for first response or review from a maintainer. service/iam Issues and PRs that pertain to the iam service. size/XS Managed by automation to categorize the size of a PR. labels Apr 13, 2026
@vringar vringar force-pushed the fix/iam-service-specific-credential-service-password branch from c6c6368 to 05c4b1b Compare April 13, 2026 18:42
@github-actions github-actions bot added the tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. label Apr 13, 2026
… Read

ListServiceSpecificCredentials returns only metadata (no password), so
resourceServiceSpecificCredentialRead never sets service_password. When
Create calls Read inline before returning, the value set from the API
response is cleared to "".

Preserve the existing state value in Read so the password survives the
implicit Read call after creation.

Fixes hashicorp#47421
@vringar vringar force-pushed the fix/iam-service-specific-credential-service-password branch from 7007ea1 to 6cb512a Compare April 13, 2026 18:44
@justinretzolk justinretzolk removed the needs-triage Waiting for first response or review from a maintainer. label Apr 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Addresses a defect in current functionality. service/iam Issues and PRs that pertain to the iam service. size/XS 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_service_specific_credential: service_password always empty in state after creation

2 participants