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

[Bug]: aws_ecr_image with most_recent fails if there is no "latest" image in the ECR on 5.32.0 #35263

Closed
RalphSleighK opened this issue Jan 12, 2024 · 3 comments · Fixed by #35269
Assignees
Labels
bug Addresses a defect in current functionality. prioritized Part of the maintainer teams immediate focus. To be addressed within the current quarter. regression Pertains to a degraded workflow resulting from an upstream patch or internal enhancement. service/ecr Issues and PRs that pertain to the ecr service.
Milestone

Comments

@RalphSleighK
Copy link

RalphSleighK commented Jan 12, 2024

Terraform Core Version

1.3.5

AWS Provider Version

5.32.0

Affected Resource(s)

aws_ecr_image

Expected Behavior

The aws_ecr_image should find an image

Actual Behavior

It errors out

Relevant Error/Panic Output Snippet

Error: reading ECR Images: ImageNotFoundException: The image with imageId {imageDigest:'null', imageTag:'latest'} does not exist within the repository with name '***' in the registry with id '***'

Terraform Configuration Files

I am doing something like:

terraform {
  backend "s3" {
  }

  required_providers {
    aws = {
      version = ">= 3.0"
    }
  }
}

Steps to Reproduce

Create an ECR that does NOT have an image with the "latest" tag, then do:

data "aws_ecr_image" "my_image" {
  repository_name = "my-ecr-repo"
  most_recent     = true
}

This works on 5.31, not 5.32

Debug Output

No response

Panic Output

No response

Important Factoids

n/a

References

Almost certainly caused by #24526 which went into 5.32

Would you like to implement a fix?

None

@RalphSleighK RalphSleighK added the bug Addresses a defect in current functionality. label Jan 12, 2024
@github-actions github-actions bot added the service/ecr Issues and PRs that pertain to the ecr service. label Jan 12, 2024
Copy link

Community Note

Voting for Prioritization

  • Please vote on this issue by adding a 👍 reaction to the original post to help the community and maintainers prioritize this 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.

Volunteering to Work on This Issue

  • If you are interested in working on this issue, please leave a comment.
  • If this would be your first contribution, please review the contribution guide.

@terraform-aws-provider terraform-aws-provider bot added the needs-triage Waiting for first response or review from a maintainer. label Jan 12, 2024
@RalphSleighK RalphSleighK changed the title [Bug]: aws_ecr_image with most_recent fails if there is no "latest" image in the ECR [Bug]: aws_ecr_image with most_recent fails if there is no "latest" image in the ECR on 5.32 Jan 12, 2024
@RalphSleighK RalphSleighK changed the title [Bug]: aws_ecr_image with most_recent fails if there is no "latest" image in the ECR on 5.32 [Bug]: aws_ecr_image with most_recent fails if there is no "latest" image in the ECR on 5.32.0 Jan 12, 2024
@johnsonaj johnsonaj added regression Pertains to a degraded workflow resulting from an upstream patch or internal enhancement. and removed needs-triage Waiting for first response or review from a maintainer. labels Jan 12, 2024
@johnsonaj johnsonaj self-assigned this Jan 12, 2024
@terraform-aws-provider terraform-aws-provider bot added the prioritized Part of the maintainer teams immediate focus. To be addressed within the current quarter. label Jan 12, 2024
@justinretzolk justinretzolk mentioned this issue Jan 12, 2024
@github-actions github-actions bot added this to the v5.33.0 milestone Jan 12, 2024
@github-actions github-actions bot removed the bug Addresses a defect in current functionality. label Jan 12, 2024
Copy link

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

@justinretzolk justinretzolk added the bug Addresses a defect in current functionality. label Feb 10, 2024
Copy link

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 have found a problem that seems similar to this, 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 Mar 12, 2024
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. prioritized Part of the maintainer teams immediate focus. To be addressed within the current quarter. regression Pertains to a degraded workflow resulting from an upstream patch or internal enhancement. service/ecr Issues and PRs that pertain to the ecr service.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants