diff --git a/terraform/modules/azure/registry/main.tf b/terraform/modules/azure/registry/main.tf index 63ea8ef..365b00a 100644 --- a/terraform/modules/azure/registry/main.tf +++ b/terraform/modules/azure/registry/main.tf @@ -50,4 +50,29 @@ resource "azurerm_container_registry_cache_rule" "docker-io" { // This credentialset has been created manually in the portal using kedacoreci credentials // https://learn.microsoft.com/en-us/azure/container-registry/container-registry-artifact-cache?pivots=development-environment-azure-portal#create-new-credentials credential_set_id = "${azurerm_container_registry.acr.id}/credentialSets/docker-credentials" +} + +resource "azurerm_container_registry_task" "acr_purge_task" { + name = "scheduledAcrPurgeTask" + container_registry_id = azurerm_container_registry.acr.id + platform { + os = "Linux" + architecture = "amd64" + } + encoded_step { + task_content = <