Skip to content

Commit

Permalink
fix: readd support to deactivate auto-sync which was broken by #20 (#22)
Browse files Browse the repository at this point in the history
* fix: readd support to deactivate auto-sync which was broken by #20

* docs(terraform-docs): generate docs and write to README.adoc

---------

Co-authored-by: lentidas <lentidas@users.noreply.github.com>
  • Loading branch information
lentidas and lentidas authored Aug 9, 2023
1 parent c5e5c50 commit f1ebfff
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 16 deletions.
10 changes: 5 additions & 5 deletions README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,6 @@ The following requirements are needed by this module:

The following providers are used by this module:

- [[provider_null]] <<provider_null,null>> (>= 3)

- [[provider_random]] <<provider_random,random>> (>= 3)

- [[provider_utils]] <<provider_utils,utils>> (>= 1)
Expand All @@ -109,6 +107,8 @@ The following providers are used by this module:

- [[provider_kubernetes]] <<provider_kubernetes,kubernetes>> (>= 2)

- [[provider_null]] <<provider_null,null>> (>= 3)

=== Resources

The following resources are used by this module:
Expand Down Expand Up @@ -157,7 +157,7 @@ Description: Override of target revision of the application chart.

Type: `string`

Default: `"v1.1.1"`
Default: `"v2.0.0"`

==== [[input_cluster_issuer]] <<input_cluster_issuer,cluster_issuer>>

Expand Down Expand Up @@ -268,11 +268,11 @@ Description: Credentials for the administrator user of the master realm created
[cols="a,a",options="header,autowidth"]
|===
|Name |Version
|[[provider_null]] <<provider_null,null>> |>= 3
|[[provider_random]] <<provider_random,random>> |>= 3
|[[provider_utils]] <<provider_utils,utils>> |>= 1
|[[provider_argocd]] <<provider_argocd,argocd>> |>= 5
|[[provider_kubernetes]] <<provider_kubernetes,kubernetes>> |>= 2
|[[provider_null]] <<provider_null,null>> |>= 3
|===
= Resources
Expand Down Expand Up @@ -317,7 +317,7 @@ Description: Credentials for the administrator user of the master realm created
|[[input_target_revision]] <<input_target_revision,target_revision>>
|Override of target revision of the application chart.
|`string`
|`"v1.1.1"`
|`"v2.0.0"`
|no
|[[input_cluster_issuer]] <<input_cluster_issuer,cluster_issuer>>
Expand Down
22 changes: 14 additions & 8 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,13 @@ resource "argocd_application" "operator" {
}

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 Expand Up @@ -120,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 {
backoff {
Expand Down
6 changes: 3 additions & 3 deletions oidc_bootstrap/README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -161,12 +161,12 @@ The following requirements are needed by this module:

The following providers are used by this module:

- [[provider_null]] <<provider_null,null>> (>= 3)

- [[provider_keycloak]] <<provider_keycloak,keycloak>> (>= 4)

- [[provider_random]] <<provider_random,random>> (>= 3)

- [[provider_null]] <<provider_null,null>> (>= 3)

=== Resources

The following resources are used by this module:
Expand Down Expand Up @@ -302,8 +302,8 @@ Description: Map containing the credentials of each created user.
[cols="a,a",options="header,autowidth"]
|===
|Name |Version
|[[provider_keycloak]] <<provider_keycloak,keycloak>> |>= 4
|[[provider_random]] <<provider_random,random>> |>= 3
|[[provider_keycloak]] <<provider_keycloak,keycloak>> |>= 4
|[[provider_null]] <<provider_null,null>> |>= 3
|===
Expand Down

0 comments on commit f1ebfff

Please sign in to comment.