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

[Bug]: user_data does not allow executing shell script

Open rbjorklin opened this issue 2 years ago • 0 comments

What happened?

I see my script copied as desired into: /var/lib/cloud/instances/*/scripts/part-001

What did you expect to happen?

I expected the script to get executed. As the documentation suggest should be possible.

Please provide a minimal working example

resource "hcloud_server" "node" {
  count       = 1
  name        = "test"
  image       = "fedora-36"
  server_type = "cpx21"
  location    = "ash"
  ssh_keys    = "<your key here>"
  user_data   = <<EOT
  #!/bin/bash
  dnf install --assumeyes zsh
  EOT
}

rbjorklin avatar Sep 23 '22 06:09 rbjorklin