terraform-aws-modules / terraform-aws-ecr

Terraform module to create AWS ECR resources 🇺🇦
https://registry.terraform.io/modules/terraform-aws-modules/ecr/aws
Apache License 2.0
52 stars 109 forks source link

feat: Add `credentials_arn` to support ECR pull through cache #30

Closed JoseAlvarezSonos closed 5 months ago

JoseAlvarezSonos commented 6 months ago

Description

This feature PR adds the ability to pass a credentials_arn to the registry_pull_through_cache_rules variable, to allow to use this new field for pull through caches.

Motivation and Context

Since November 2023, ECR supports new upstream registries as pull through cache, including Dockerhub and GHCR. To use these new upstream registries, it's required to use credentials for the respective registries. AWS added a feature of providing a Secret Manager resource ARN to the ECR pull through cache rule to rely on this credentials. Along side this, the terraform-provider-aws added the same capabilities to the aws_ecr_pull_through_cache_rule resource.

Breaking Changes

This requires an update of the aws provider to >= 5.37 (previously >= 4.20). But there isn't any breaking change to update to this version.

How Has This Been Tested?

We are using our fork to make sure that it works and added all the required docs and examples to this repo as well.

shivanand-deriv commented 6 months ago

+1

bryantbiggs commented 5 months ago

for the example? we don't usually enforce this for examples and just stick with the default commercial regions. the module source code we absolutely use the data sources to infer the correct partition, region, etc.

antonbabenko commented 5 months ago

@bryantbiggs I looked in the wrong place :) Approved now

antonbabenko commented 5 months ago

This PR is included in version 2.1.0 :tada:

github-actions[bot] commented 4 months ago

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. If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.