rancher / terraform-provider-rancher2

Terraform Rancher2 provider
https://www.terraform.io/docs/providers/rancher2/
Mozilla Public License 2.0
253 stars 216 forks source link

[BUG] Rancher don't remember the options defined in the rancher2_machine_config_v2 resource when editing cluster config using the Rancher GUI #1285

Closed TazTheManiac closed 5 months ago

TazTheManiac commented 6 months ago

Rancher Server Setup

Information about the Cluster

User Information

Provider Information

Describe the bug

After running terraform apply, Rancher don't seem to completely remember the config that was used for provisioning the cluster when using VMware vSphere and viewed in the Rancher GUI. Instead it defaults to the first options available for the fields Data Center, Resource Pool, Datastore and Virtual Machine, and leaves the Folder, and Network fields empty. Leading to cluster changes being done unintentionally when doing stuff from the GUI.

Example of the fields and values specified in the resource rancher2_machine_config_v2:

datacenter    = "SESA"
datastore     = "PRIM-Kub-02"
pool          = "Production IT-1"
network       = [ "Network 606" ]
folder        = "Kubernetes/sesaklulab1
creation_type = "vm"
clone_from    = "kubernetes-template-worker"

To Reproduce

  1. Provision a cluster vith the infrastructure provider VMware vSphere, selecting a different Data Center, Resource Pool, and Datastore fields than the first available.
  2. Wait for the new cluster ro be provisioned.
  3. Login to Rancher GUI and edit the config for the new cluster in the Cluster Manager section.
  4. The Scheduling options should be different than the ones supplied in the rancher2_machine_config_v2 resource

Actual Result

The cluster created with terraform is created, but trying to edit it using the Rancher GUI default to different options then what was specified in the rancher2_machine_config_v2 resource.

Scheduling options changed:

image

Network options removed:

image

Virtual Machine changed:

image

Expected Result

Rancher should remember the options that was defined in the rancher2_machine_config_v2 resource and not default to the first ones available.

TazTheManiac commented 5 months ago

This was a rancher issue and not a provider issue, it is solved with the rancher v2.8.0 upgrade