This cli command with filter https://awscli.amazonaws.com/v2/documentation/api/latest/reference/ecr/describe-images.html would be awesome to port to Terraform. Sometimes container tags are multi-purpose as in they have various architectures or OSes and you need to filter for a particular type of container along with the most recent. Could optionally provide most recent based on a query result, or the results from this could be fed into the regular aws_ecr_image data source to provide the most recent one of that particular tag. Would be nicer though to have it all from this one place, although I understand since the underlying api might not easily support that.
Affected Resource(s) and/or Data Source(s)
aws_ecr_images (data source)
Potential Terraform Configuration
# Analogous to https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/ami_ids in that it should take a regex/wildcard:
data "aws_ecr_images" "ubuntu" {
repository_name = "my/service"
filter {
name = "image_tag"
values = ["ubuntu-*"]
}
filter {
name = "most_recent"
values = true
}
}
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.
Description
This cli command with filter https://awscli.amazonaws.com/v2/documentation/api/latest/reference/ecr/describe-images.html would be awesome to port to Terraform. Sometimes container tags are multi-purpose as in they have various architectures or OSes and you need to filter for a particular type of container along with the most recent. Could optionally provide most recent based on a query result, or the results from this could be fed into the regular aws_ecr_image data source to provide the most recent one of that particular tag. Would be nicer though to have it all from this one place, although I understand since the underlying api might not easily support that.
Affected Resource(s) and/or Data Source(s)
Potential Terraform Configuration
References
Describe Images AMI IDs
Would you like to implement a fix?
None