Skip to content

Commit 1a7e7a2

Browse files
ddevadathyder
authored andcommitted
fix: Ability to override existing cluster addons
Added the ability to override existing cluster addons via an optional flag Signed-off-by: Deepak Devadathan <[email protected]>
1 parent 3741987 commit 1a7e7a2

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

examples/cluster-addons/vars-cluster-addons.auto.tfvars

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
cluster_addons = {
55
"CertManager" = {
66
remove_addon_resources_on_delete = true
7+
override_existing = true # Default is false if not specified
78
# 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
89
configurations = [
910
{

modules/cluster-addons/addons.tf

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@ resource "oci_containerengine_addon" "primary_addon" {
3535
value = tostring(lookup(config.value, "value"))
3636
}
3737
}
38-
39-
version = lookup(each.value, "version", null)
38+
override_existing = lookup(each.value, "override_existing", false)
39+
version = lookup(each.value, "version", null)
4040

4141
lifecycle {
4242

@@ -67,8 +67,8 @@ resource "oci_containerengine_addon" "secondary_addon" {
6767
value = tostring(lookup(config.value, "value"))
6868
}
6969
}
70-
71-
version = lookup(each.value, "version", null)
70+
override_existing = lookup(each.value, "override_existing", false)
71+
version = lookup(each.value, "version", null)
7272

7373
lifecycle {
7474

0 commit comments

Comments
 (0)