Skip to content

Commit 17191a2

Browse files
authored
docs: example on provider README does not work (#875)
If a user just specifies the current code, they will get an error "Error: Failed to query available provider packages". The "required_providers" block tells Terraform which namespace "hcloud" is coming from. This is required since the Provider was migrated from "hashicorp" to "hetznercloud".
1 parent 40df28d commit 17191a2

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

website/docs/index.html.markdown

+12-1
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,21 @@ Use the navigation to the left to read about the available resources.
1515
## Example Usage
1616

1717
```hcl
18+
# Tell terraform to use the provider and select a version.
19+
terraform {
20+
required_providers {
21+
hcloud = {
22+
source = "hetznercloud/hcloud"
23+
version = "~> 1.45"
24+
}
25+
}
26+
}
27+
28+
1829
# Set the variable value in *.tfvars file
1930
# or using the -var="hcloud_token=..." CLI option
2031
variable "hcloud_token" {
21-
sensitive = true # Requires terraform >= 0.14
32+
sensitive = true
2233
}
2334
2435
# Configure the Hetzner Cloud Provider

0 commit comments

Comments
 (0)