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

fix: Use the custom repository policy when create_repository_policy is true #10

Closed pkruk closed 1 year ago

pkruk commented 1 year ago

Description

Create repository policy flag when will be set to true will use a custom policy passed to module instead of default one.

Motivation and Context

I find this disturbing when I set the create_repository_policy to true and my custom policy was ignored and I still have a default one. I think this condition should have a different order, so when I set the create_policy_argument true then module should use my custom policy.

How Has This Been Tested?

Locally in my terragrunt module.

antonbabenko commented 1 year ago

This is the right behavior. create_repository_policy should be set to false if you want to provide your own custom policy.

github-actions[bot] commented 1 year 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.