Skip to content

Commit 90ef741

Browse files
artifactregistry: accept all valid durations (#12667) (#886)
[upstream:94499923e80f3168760b9a75e0b3d3a5c07e67e3] Signed-off-by: Modular Magician <[email protected]>
1 parent 3187cd6 commit 90ef741

File tree

1 file changed

+16
-1
lines changed
  • artifact_registry_repository_cleanup

1 file changed

+16
-1
lines changed

artifact_registry_repository_cleanup/main.tf

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff 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 {

0 commit comments

Comments
 (0)