Skip to content

Commit

Permalink
fix: readd support to deactivate auto-sync which was broken by #59
Browse files Browse the repository at this point in the history
  • Loading branch information
lentidas committed Jul 19, 2023
1 parent 9e34e12 commit e9b3d41
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,13 @@ resource "argocd_application" "this" {
}

sync_policy {
automated {
prune = var.app_autosync.prune
self_heal = var.app_autosync.self_heal
allow_empty = var.app_autosync.allow_empty
dynamic "automated" {
for_each = toset(var.app_autosync == { "allow_empty" = tobool(null), "prune" = tobool(null), "self_heal" = tobool(null) } ? [] : [var.app_autosync])
content {
prune = automated.value.prune
self_heal = automated.value.self_heal
allow_empty = automated.value.allow_empty
}
}

retry {
Expand Down

0 comments on commit e9b3d41

Please sign in to comment.