You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
IIUC, nutanix_karbon_cluster creates 1 worker_node_pool and nutanix_karbon_worker_nodepool creates another worker_node_pool . when we run 2nd terraform apply, it sees a change in worker_node_pool as there is only 1 worker_node_pool in tfconfig for nutanix_karbon_cluster resource and in addition, we have added second worker_node_pool using nutanix_karbon_worker_nodepool resource to the existing infra, so terraform plans detects a change as now there will be 2 worker_nodes_pool present in cluster. hence it is replacing.
you can use lifecylce to ignore changes in nutanix_karbon_cluster for node_pool. lifecycle { ignore_changes = [ worker_node_pool, ] }
if I add lifecycle { ignore_changes = [ worker_node_pool, ] } terraform does not see changes anymore each time I run apply.
But it does not allow to add new node pools after the creation of the cluster. If I try to add a new node pool, I have another error :
│ Error: unable to expand node pool during flattening: nodepool name must be passed
│
│ with nutanix_karbon_cluster.mycluster,
│ on nke.tf line 1, in resource "nutanix_karbon_cluster" "mycluster":
│ 1: resource "nutanix_karbon_cluster" "mycluster" {
│
Nutanix Cluster Information
Terraform Version
Affected Resource(s)
Terraform Configuration Files
Debug Output
Panic Output
Expected Behavior
I expect running
terraform apply
twice should not detect any changes.Actual Behavior
The first command
terraform apply
creates the cluster and the nodepool.Running the command
terraform apply
a second time forces a replacement :Steps to Reproduce
terraform apply
terraform apply
Important Factors
References
The text was updated successfully, but these errors were encountered: