Skip to content

Releases: cloudposse/terraform-aws-ecr

v0.44.0

25 Jul 21:16
Compare
Choose a tag to compare
Support disabling default rules @Benbentwo (#149) ## what

Adds 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

#146


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

25 Jul 16:08
7f3b6bc
Compare
Choose a tag to compare
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: The selection merging logic now includes a check to ensure that countUnit is only added if it is not null, and the filtering logic for keys like tagPrefixList and tagPatternList has been updated to handle null values more gracefully. (main.tf, main.tfL140-R152)

Refinements to validation logic:

  • Validation for tagStatus in variables.tf: Updated the condition to use length(coalesce(...)) for checking tagPrefixList and tagPatternList, ensuring proper handling of null or empty lists. (variables.tf, variables.tfL163-R163)
  • Validation for countType in variables.tf: Adjusted the condition to ensure that countUnit is specified when countType is sinceImagePushed, with a clearer error message for improved readability. (variables.tf, variables.tfL193-R195)

v0.42.2

24 Jul 15:46
Compare
Choose a tag to compare
Custom lifecycle policy support @Benbentwo (#146) ## what

why

Allows supporting Custom Lifecycle Policies for your ECR Repositories

references

🤖 Automatic Updates

Fix go version in tests @osterman (#144) ## what - Update go `1.24`

why

  • Error loading shared library libresolv.so.2 in Go 1.20

References

Replace Makefile with atmos.yaml @osterman (#142) ## what - Remove `Makefile` - Add `atmos.yaml`

why

  • Replace build-harness with atmos for readme genration

References

  • DEV-3229 Migrate from build-harness to atmos

v0.42.1

17 Nov 09:28
5a11959
Compare
Choose a tag to compare
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` files

why

  • Re-apply .github/settings.yml from org level to get terratest 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
Update .github/settings.yml @osterman (#136) ## what - Update `.github/settings.yml` - Drop `.github/auto-release.yml` files

why

  • 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 .github/settings.yml @osterman (#135) ## what - Update `.github/settings.yml` - Drop `.github/auto-release.yml` files

why

  • 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

v0.42.0

15 Aug 16:09
Compare
Choose a tag to compare
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

v0.41.1

30 Jul 09:42
Compare
Choose a tag to compare
Add support for time based rotation @uhlajs (#132) ## what

Add 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` files

why

  • 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 PR

why

  • 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` repo

why

  • 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` action

why

  • 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 docs

why

To have most recent changes of README.md and doc from origin templates

Update Scaffolding @osterman (#121) ## what - Reran `make readme` to rebuild `README.md` from `README.yaml` - Migrate to square badges - Add scaffolding for repo settings and Mergify

why

  • Upstream template changed in the .github repo
  • Work better with repository rulesets
  • Modernize look & feel

v0.41.0

07 Mar 16:53
6570c59
Compare
Choose a tag to compare

v0.40.1

21 Feb 16:37
8476a6d
Compare
Choose a tag to compare
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

v0.40.0

08 Nov 12:47
1bdedff
Compare
Choose a tag to compare
feat: support scan_type @dudymas (#113)

what

  • add scanning_configuration as child module

why

  • support scan_type settings
  • should be deployed as a per-account global, rather than per-ecr-repo

Notes

v0.39.0

31 Oct 11:40
69cd569
Compare
Choose a tag to compare
feat: add organizations as readonly access @dragosmc (#106)

what

  • Add the ability to have organizations as trustees (read-only) for the ECR repository

why

  • As described in #82 , it's sometimes useful to allow an entire organization to consume images from a centralized repository

references