Skip to content

Commit

Permalink
fix: Ability to override existing cluster addons
Browse files Browse the repository at this point in the history
Added the ability to override existing cluster addons via an optional flag

Signed-off-by: Deepak Devadathan <deepak.devadathan@oracle.com>
  • Loading branch information
ddevadat authored and hyder committed Dec 19, 2024
1 parent 3741987 commit 1a7e7a2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions examples/cluster-addons/vars-cluster-addons.auto.tfvars
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
cluster_addons = {
"CertManager" = {
remove_addon_resources_on_delete = true
override_existing = true # Default is false if not specified
# The list of supported configurations for the cluster addons is here: https://docs.oracle.com/en-us/iaas/Content/ContEng/Tasks/contengconfiguringclusteraddons-configurationarguments.htm#contengconfiguringclusteraddons-configurationarguments_CertificateManager
configurations = [
{
Expand Down
8 changes: 4 additions & 4 deletions modules/cluster-addons/addons.tf
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ resource "oci_containerengine_addon" "primary_addon" {
value = tostring(lookup(config.value, "value"))
}
}

version = lookup(each.value, "version", null)
override_existing = lookup(each.value, "override_existing", false)
version = lookup(each.value, "version", null)

lifecycle {

Expand Down Expand Up @@ -67,8 +67,8 @@ resource "oci_containerengine_addon" "secondary_addon" {
value = tostring(lookup(config.value, "value"))
}
}

version = lookup(each.value, "version", null)
override_existing = lookup(each.value, "override_existing", false)
version = lookup(each.value, "version", null)

lifecycle {

Expand Down

0 comments on commit 1a7e7a2

Please sign in to comment.