Skip to content

Commit

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

Please sign in to comment.