terraform-provider-rancher2 icon indicating copy to clipboard operation
terraform-provider-rancher2 copied to clipboard

Update and Expand: hetzner_node_template

Open KittlitzMichael opened this issue 2 years ago • 0 comments

The file node_template.md contains only four attributes for the configuration:

hetzner_config { api_token = "XXXXXXXXXX" image = "ubuntu-18.04" (outdated! - see Issue below!) server_location = "nbg1" server_type = "cx11" }

But the Driver offers many more options, which should be accessable in order to setup the template fully functional, like:

  • ImageID
  • Volumes
  • Networks
  • Firewalls
  • AdditionalKeys (which should be called ssh_keys though, to stay withing the same naming conventions as on Rancher2)
  • ServerLabels
  • keyLabels

See lines 27 to 56 on https://github.com/JonasProgrammer/docker-machine-driver-hetzner/blob/master/driver.go

in combination with Issues https://github.com/JonasProgrammer/docker-machine-driver-hetzner/issues/85

Upgrading the Ubuntu-Version: https://github.com/JonasProgrammer/docker-machine-driver-hetzner/issues/87

Suggestion:

resource "rancher2_node_template" "my_hetzner_node_template" { name = "my-hetzner-node-template" driver_id = rancher2_node_driver.hetzner_node_driver.id hetzner_config { api_token = "" image = "ubuntu-20.04" imageId = 0 server_location = "nbg1" server_type = "cx11" SSHKeys = "" Volumes = "" Firewalls = "" ServerLabel = "" keyLabels = "" UsePrivateNetwork = false DisablePublic4 = false DisablePublic6 = false placementGroup = "" } }

=> It must be serverLabel (without the S) as this is how it is send from the Rancher2 API.

KittlitzMichael avatar Aug 08 '22 12:08 KittlitzMichael