How to clean untagged artifacts only? #21861
-
I am using Harbor 2.12.2 I am trying to clean untagged artifacts only. Because when a new Based on https://registry.terraform.io/providers/goharbor/harbor/latest/docs/resources/retention_policy Experiment 1I initially tired this, once applied, but then the Policy page in Harbor project shows loading all time. resource "harbor_retention_policy" "clean_untagged_artifacts" {
scope = var.project_id
schedule = "Daily"
rule {
n_days_since_last_pull = 7
untagged_artifacts = true
}
} Experiment 2Then I am thinking resource "harbor_retention_policy" "clean_untagged_artifacts" {
scope = var.project_id
schedule = "Daily"
rule {
n_days_since_last_pull = 7
repo_matching = "**"
tag_excluding = "**"
untagged_artifacts = true
}
} However, after one day, all artifacts got cleaned. How to I clean untagged artifacts only? Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Beta Was this translation helpful? Give feedback.
Thanks @stonezdj for the info, I can confirm the proper way would be
https://registry.terraform.io/providers/goharbor/harbor/latest/docs/resources/garbage_collection