Releases: cloudposse/terraform-aws-ecr
v0.44.0
Support disabling default rules @Benbentwo (#149)
## whatAdds a variable with defaults to allow disabling the default rules.
why
As part of #146 we added custom lifecycle policies. Now there's a problem where our default rules conflict or are forced at certain points in certain orders relative to our custom lifecycle policies. We want to be able to disable them if they don't meet our needs.
references
e.g.
default_lifecycle_rules_settings:
untagged_image_rule:
enabled: false
remove_old_image_rule:
enabled: false
custom_lifecycle_rules:
- selection:
tagStatus: "tagged"
countType: "imageCountMoreThan"
countNumber: 1000
tagPrefixList: ["prod-"]
description: "Expire images older than 1000 for all tags starting with prod-"
action:
type: "expire"
- selection:
tagStatus: "tagged"
countType: "imageCountMoreThan"
countNumber: 1000
tagPrefixList: ["staging-"]
description: "Expire images older than 1000 for all tags starting with staging-"
action:
type: "expire"
- selection:
tagStatus: "tagged"
countType: "imageCountMoreThan"
countNumber: 1000
tagPrefixList: ["dev-"]
description: "Expire images older than 1000 for all tags starting with dev-"
action:
type: "expire"
results in just the custom_lifecycle_rules
being created. No default behavior change
v0.43.0
bugfix: validation and null countUnit @Benbentwo (#148)
This pull request refines the handling of custom lifecycle rules in Terraform configurations by improving validation logic and enhancing the selection merging process. The changes aim to make the code more robust and handle edge cases more effectively.Improvements to selection merging logic:
- Enhanced null-checks and condition handling in
main.tf
: Theselection
merging logic now includes a check to ensure thatcountUnit
is only added if it is not null, and the filtering logic for keys liketagPrefixList
andtagPatternList
has been updated to handle null values more gracefully. (main.tf
, main.tfL140-R152)
Refinements to validation logic:
- Validation for
tagStatus
invariables.tf
: Updated the condition to uselength(coalesce(...))
for checkingtagPrefixList
andtagPatternList
, ensuring proper handling of null or empty lists. (variables.tf
, variables.tfL163-R163) - Validation for
countType
invariables.tf
: Adjusted the condition to ensure thatcountUnit
is specified whencountType
issinceImagePushed
, with a clearer error message for improved readability. (variables.tf
, variables.tfL193-R195)
v0.42.2
Custom lifecycle policy support @Benbentwo (#146)
## whatwhy
Allows supporting Custom Lifecycle Policies for your ECR Repositories
references
- closes #92
🤖 Automatic Updates
v0.42.1
protected tags keep count @whereismyjetpack (#139)
- **introduce `protected_tags_keep_count`** - **updates readme**what
Adds protected_tags_keep_count
and defaults it to 999999
why
A user may want to retain release tags for an extended period, but not indefinitely.
🤖 Automatic Updates
Migrate new test account @osterman (#138)
## what - Update `.github/settings.yml` - Update `.github/chatops.yml` fileswhy
- Re-apply
.github/settings.yml
from org level to getterratest
environment - Migrate to new
test
account
References
- DEV-388 Automate clean up of test account in new organization
- DEV-387 Update terratest to work on a shared workflow instead of a dispatch action
- DEV-386 Update terratest to use new testing account with GitHub OIDC
v0.42.0
fix(#133): have ability to use wildcards in protected_tags variale @mrdntgrn (#134)
## what- the change allows to pass wildcards in protected_tags list
why
- there are use cases when the protected tags are not only prefix defineable and only wildcard can be used like "*prod" or semversion
*.*.*
references
- fixes #133
v0.41.1
Add support for time based rotation @uhlajs (#132)
## whatAdd support for countType "sinceImagePushed" ECR Lifepolicy rule.
why
- Increase flexibility and usefulness of this module.
references
- Implements #92.
🤖 Automatic Updates
Update .github/settings.yml @osterman (#131)
## what - Update `.github/settings.yml` - Drop `.github/auto-release.yml` fileswhy
- Re-apply
.github/settings.yml
from org level - Use organization level auto-release settings
references
- DEV-1242 Add protected tags with Repository Rulesets on GitHub
Update release workflow to allow pull-requests: write @osterman (#129)
## what - Update workflow (`.github/workflows/release.yaml`) to have permission to comment on PRwhy
- So we can support commenting on PRs with a link to the release
Update GitHub Workflows to use shared workflows from '.github' repo @osterman (#128)
## what - Update workflows (`.github/workflows`) to use shared workflows from `.github` repowhy
- Reduce nested levels of reusable workflows
Update GitHub Workflows to Fix ReviewDog TFLint Action @osterman (#127)
## what - Update workflows (`.github/workflows`) to add `issue: write` permission needed by ReviewDog `tflint` actionwhy
- The ReviewDog action will comment with line-level suggestions based on linting failures
Update GitHub workflows @osterman (#126)
## what - Update workflows (`.github/workflows/settings.yaml`)why
- Support new readme generation workflow.
- Generate banners
Use GitHub Action Workflows from `cloudposse/.github` Repo @osterman (#125)
## what- Install latest GitHub Action Workflows
why
- Use shared workflows from
cldouposse/.github
repository - Simplify management of workflows from centralized hub of configuration
Add GitHub Settings @osterman (#123)
## what - Install a repository config (`.github/settings.yaml`)why
- Programmatically manage GitHub repo settings
Update README.md and docs @cloudpossebot (#120)
## what This is an auto-generated PR that updates the README.md and docswhy
To have most recent changes of README.md and doc from origin templates
v0.41.0
Allow to use ECR replication @dmitrijn (#103)
- Allow to use ECR replication
- https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/ecr_replication_configuration
Closes #99
v0.40.1
Allow cache though enabled repositories to fetch image from upstream @mfuhrmeisterDM (#117)
what
Add a principal list (principals_pull_though_access
) which are allowed to use specific repositories as pull through cache (import images from upstream). This holds for repositories where one of the strings in prefixes_pull_through_repositories
is a prefix of the repository name.
why
We are using ecr-public
pull through cache and we want also new images to be downloaded automatically to the cache. Allowed principals for respective repos can use it with the newly introduced variables.
🤖 Automatic Updates
Update README.md and docs @cloudpossebot (#116)
what
This is an auto-generated PR that updates the README.md and docs
why
To have most recent changes of README.md and doc from origin templates
Update README.md and docs @cloudpossebot (#115)
what
This is an auto-generated PR that updates the README.md and docs
why
To have most recent changes of README.md and doc from origin templates
Update README.md and docs @cloudpossebot (#114)
what
This is an auto-generated PR that updates the README.md and docs
why
To have most recent changes of README.md and doc from origin templates