oracle-terraform-modules / terraform-oci-oke

The Terraform OKE Module Installer for Oracle Cloud Infrastructure provides a Terraform module that provisions the necessary resources for Oracle Container Engine.
https://oracle-terraform-modules.github.io/terraform-oci-oke/
Universal Permissive License v1.0
150 stars 204 forks source link

Cloudinit script changes not applied to node pool #944

Open nicolas-laduguie opened 4 weeks ago

nicolas-laduguie commented 4 weeks ago

Community Note

Terraform Version and Provider Version

Terraform v1.6.6 on darwin_arm64

Affected Resource(s)

modules/workers

Expected Behavior

When creating node pools with modules/workers, and managing cloudinit with "cloud_init" input variable, any further changes applied to cloudinit should be automatically applied to node pool and newly created nodes should inherit from the latest cloudinit changes.

Actual Behavior

Newly created nodes after applying changes on cloudinit do not inherit from those changes.

Steps to Reproduce

  1. setup node pool with cloudinit configured
  2. create node on that pool
  3. change cloudinit and apply changes
  4. drop the old node and create new one => the new node would not get latest cloudinit changes.

References

https://github.com/oracle-terraform-modules/terraform-oci-oke/issues/877

nicolas-laduguie commented 4 weeks ago

Seems linked to this ignore_changes config : https://github.com/oracle-terraform-modules/terraform-oci-oke/blob/46ec5f4f8464b209f1248bcbacf89f342c269d8f/modules/workers/nodepools.tf#L277C1-L278C1 Tested removing this line, applied the changes, and it worked like a charm:

Changes to Outputs:
  ~ worker_pools                   = {
      ~ test= {
            id                               = "ocid1.nodepool.oc1.xxx"
            name                             = "test"
          ~ node_metadata                    = {
              ~ user_data                = REDACTED