ecrpublic: add ephemeral aws_ecrpublic_authorization_token resource#45841
Conversation
Fixes hashicorp#45735 Terraform (1.10) supports referencing ephemeral resource attributes directly in providers. Having an ephemeral variant available of aws_ecrpublic_authorization_token would greatly improve the security posture of Terraform users working with public Amazon ECR as the temporary obtained auth is no longer persisted to the state. ``` ephemeral "aws_ecrpublic_authorization_token" "token" {} resource "helm_release" "this" { # ... repository_password = ephemeral.aws_ecrpublic_authorization_token.this.password repository_username = ephemeral.aws_ecrpublic_authorization_token.this.user_name } ```
Community GuidelinesThis 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
Pull Request Authors
|
|
✅ Thank you for correcting the previously detected issues! The maintainers appreciate your efforts to make the review process as smooth as possible. |
johnsonaj
left a comment
There was a problem hiding this comment.
LGTM 🚀
% AWS_DEFAULT_REGION=us-east-1 make testacc PKG=ecrpublic TESTARGS='-run=TestAccECRPublicAuthorizationTokenEphemeral_'
make: Verifying source code with gofmt...
==> Checking that code complies with gofmt requirements...
make: Running acceptance tests on branch: 🌿 f-aws_ecrpublic_authorization_token 🌿...
TF_ACC=1 go1.25.6 test ./internal/service/ecrpublic/... -v -count 1 -parallel 20 -run=TestAccECRPublicAuthorizationTokenEphemeral_ -timeout 360m -vet=off
2026/01/30 14:24:58 Creating Terraform AWS Provider (SDKv2-style)...
2026/01/30 14:24:58 Initializing Terraform AWS Provider (SDKv2-style)...
=== RUN TestAccECRPublicAuthorizationTokenEphemeral_basic
=== PAUSE TestAccECRPublicAuthorizationTokenEphemeral_basic
=== CONT TestAccECRPublicAuthorizationTokenEphemeral_basic
--- PASS: TestAccECRPublicAuthorizationTokenEphemeral_basic (10.13s)
PASS
ok github.com/hashicorp/terraform-provider-aws/internal/service/ecrpublic 17.675s|
@kimor79 thank you for the contribution! 🎉 |
|
Warning This Issue has been closed, meaning that any additional comments are much easier for the maintainers to miss. Please assume that the maintainers will not see them. Ongoing conversations amongst community members are welcome, however, the issue will be locked after 30 days. Moving conversations to another venue, such as the AWS Provider forum, is recommended. If you have additional concerns, please open a new issue, referencing this one where needed. |
|
This functionality has been released in v6.31.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! |
|
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. |
Fixes #45735 (based on #44949)
Terraform (1.10) supports referencing ephemeral resource attributes directly in providers. Having an ephemeral variant available of aws_ecrpublic_authorization_token would greatly improve the security posture of Terraform users working with public Amazon ECR as the temporary obtained auth is no longer persisted to the state.