alexzimmer96 / rancher-hcloud

A Terraform script to deploy a highly available Rancher installation on Hetzner Cloud
MIT License
53 stars 26 forks source link

Private network does not work for node template #11

Open stefandevo opened 3 years ago

stefandevo commented 3 years ago

Was trying to set this value when create a node template

I am afraid that there is an error in the PR (but not sure because I have little understanding) https://github.com/rancher/terraform-provider-rancher2/commit/494be80135cd2f716b8b53ac194b0a59c14b00ae

https://github.com/rancher/terraform-provider-rancher2/commit/494be80135cd2f716b8b53ac194b0a59c14b00ae#diff-3a3c352348da5029e7784b64c2ba7dca9b0b43a4faae659af8314894f1961068R57

the field is called here use_private_networks the one I need to use in the node template creation.

But here https://github.com/rancher/terraform-provider-rancher2/commit/494be80135cd2f716b8b53ac194b0a59c14b00ae#diff-4b801ad3f5706cb255f64333cb7c96eaa70081c020b12c5cc5a406dccb53ba45R31

the field is mapped to use_private_network without the ending s

and here https://github.com/rancher/terraform-provider-rancher2/commit/494be80135cd2f716b8b53ac194b0a59c14b00ae#diff-4b801ad3f5706cb255f64333cb7c96eaa70081c020b12c5cc5a406dccb53ba45R73

again note sure.

But what I see is in the terraform out :

      + hetzner_config {
          + api_token            = (sensitive value)
          + image                = "ubuntu-20.04"
          + networks             = "kubernetes-internal"
          + server_location      = "nbg1"
          + server_type          = "cx11"
          + use_private_networks = true

that true is passed, but when I see in rancher, the checkbox is not there.

alexzimmer96 commented 3 years ago

Seems to be an issue with the plugin (like you already said). I will file them an issue (And maybe fix this later)

alexzimmer96 commented 3 years ago

I have provided a fix for this: https://github.com/rancher/terraform-provider-rancher2/pull/570 Should be fixed when this is merged.