You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Run a plan against the above. This results in successful completion.
Running apply against the plan then creates the requested resources but also returns the following:
Error: InvalidParameter: 1 validation error(s) found.
- minimum field size of 100, PutLifecyclePolicyInput.LifecyclePolicyText.
with module.base_images.aws_ecr_lifecycle_policy.this[0],
on .terraform-management/modules/base_images/main.tf line 122, in resource "aws_ecr_lifecycle_policy" "this":
122: resource "aws_ecr_lifecycle_policy" "this" {
Upon closer inspection of the plan, the following unexpected resource is listed.
# module.base_images.aws_ecr_lifecycle_policy.this[0] will be created
+ resource "aws_ecr_lifecycle_policy" "this" {
+ id = (known after apply)
+ registry_id = (known after apply)
+ repository = "cronofy/base-images"
}
Expected behavior
Empty ECR repository created with no lifecycle policy.
Actual behavior
Empty ECR repository is created as expected but with a validation error thrown for lifecycle policy creation that wasn't requested.
Additional context
Not a huge issue from our point of view as we're working around the validation error by adding a policy that won't be triggered by anything in the repository but thought it worth mentioning.
Addendum. A colleague has advised that the same behaviour is observed even if create_repository_policy = false is set.
The text was updated successfully, but these errors were encountered:
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.
Description
Creating a private repository with
repository_lifecycle_policy
omitted or set to a value of""
results in a validation error being thrown.Versions
1.1.1 (latest)
1.2.1
aws v4.16.0
Reproduction Code [Required]
Steps to reproduce the behavior:
Run a plan against the above. This results in successful completion.
Running apply against the plan then creates the requested resources but also returns the following:
Upon closer inspection of the plan, the following unexpected resource is listed.
Expected behavior
Empty ECR repository created with no lifecycle policy.
Actual behavior
Empty ECR repository is created as expected but with a validation error thrown for lifecycle policy creation that wasn't requested.
Additional context
Not a huge issue from our point of view as we're working around the validation error by adding a policy that won't be triggered by anything in the repository but thought it worth mentioning.
Addendum. A colleague has advised that the same behaviour is observed even if
create_repository_policy = false
is set.The text was updated successfully, but these errors were encountered: