Skip to content

Commit

Permalink
fix: readd support to deactivate auto-sync which was broken by #41
Browse files Browse the repository at this point in the history
  • Loading branch information
lentidas committed Aug 9, 2023
1 parent cf4db12 commit 6f989bc
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 @@ -71,10 +71,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 6f989bc

Please sign in to comment.