terraform-provider-hcloud
terraform-provider-hcloud copied to clipboard
[Bug]:
What happened?
The example usage in this page is incorrect: https://registry.terraform.io/providers/hetznercloud/hcloud/latest/docs
The 'token' value is not good.
INCORRECT # Configure the Hetzner Cloud Provider provider "hcloud" { token = var.hcloud_token }
CORRECT # Configure the Hetzner Cloud Provider provider "hcloud" { token = "${var.hcloud_token}" }
What did you expect to happen?
Please correct the example.
Please provide a minimal working example
This is a correct example of use:
# Set the variable value in *.tfvars file
# or using the -var="hcloud_token=..." CLI option
variable "hcloud_token" {}
# Configure the Hetzner Cloud Provider
provider "hcloud" {
token = "${var.hcloud_token}"
}
# Create a server
resource "hcloud_server" "web" {
# ...
}
@carcoco IIRC that's an issue if you use a quite old terraform release. If you upgrade to a contemporary release (v1.1.16 is the latest stable one) it will work
As @phaer said, this was added in Terraform v0.12.0: https://github.com/hashicorp/terraform/releases/tag/v0.12.0 which was released over 3 years ago.
Going to close this issue as it works as intended. Please feel free to reopen the issue or create a new one if you still have issues.