File tree Expand file tree Collapse file tree 1 file changed +16
-1
lines changed
artifact_registry_repository_cleanup Expand file tree Collapse file tree 1 file changed +16
-1
lines changed Original file line number Diff line number Diff line change @@ -4,13 +4,28 @@ resource "google_artifact_registry_repository" "my-repo" {
44 description = " example docker repository with cleanup policies-${ local . name_suffix } "
55 format = " DOCKER"
66 cleanup_policy_dry_run = false
7+ cleanup_policies {
8+ id = " delete-untagged"
9+ action = " DELETE"
10+ condition {
11+ tag_state = " UNTAGGED"
12+ }
13+ }
14+ cleanup_policies {
15+ id = " keep-new-untagged"
16+ action = " KEEP"
17+ condition {
18+ tag_state = " UNTAGGED"
19+ newer_than = " 7d"
20+ }
21+ }
722 cleanup_policies {
823 id = " delete-prerelease"
924 action = " DELETE"
1025 condition {
1126 tag_state = " TAGGED"
1227 tag_prefixes = [" alpha" , " v0" ]
13- older_than = " 2592000s "
28+ older_than = " 30d "
1429 }
1530 }
1631 cleanup_policies {
You can’t perform that action at this time.
0 commit comments