-
Notifications
You must be signed in to change notification settings - Fork 75
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: embed markdown descriptions for datacenter (#794)
This embeds the description from external markdown files. In addition, the datacenter list markdown description was using the same as for the datacenter data source, the markdown file now contains the new description picked from `website/docs/d/datacenters.html.md`
- Loading branch information
Showing
3 changed files
with
42 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
Provides details about a specific Hetzner Cloud Datacenter. | ||
|
||
Use this resource to get detailed information about a specific datacenter. | ||
|
||
## Example | ||
|
||
```hcl | ||
data "hcloud_datacenter" "datacenter1" { | ||
name = "fsn1-dc14" | ||
} | ||
data "hcloud_datacenter" "datacenter2" { | ||
id = 4 | ||
} | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
Provides a list of available Hetzner Cloud Datacenters. | ||
|
||
This resource may be useful to create highly available infrastructure, distributed across several datacenters. | ||
|
||
## Example | ||
|
||
```hcl | ||
data "hcloud_datacenters" "datacenters" {} | ||
resource "hcloud_server" "workers" { | ||
count = 5 | ||
name = "node${count.index}" | ||
image = "debian-11" | ||
server_type = "cx31" | ||
datacenter = element(data.hcloud_datacenters.datacenters.datacenters, count.index).name | ||
} | ||
``` |