resource "azuredevops_git_repository" "repositories" { for_each = { for pipeline in local.lz_config.aks_workloads : pipeline.repo => pipeline } project_id = data.azuredevops_project.project.id name = each.value.repo initialization { init_type = "Clean" } lifecycle { # Repositories are critical, long-lived assets. # Prevent accidental deletion caused by config changes, # refactors, or terraform destroy. prevent_destroy = true # Ignore changes to initialization to support importing existing repositories. # Once a repo exists, initialization settings are irrelevant. ignore_changes = [ initialization, ] } }