Skip to content

Commit 3a191d0

Browse files
authored
Rewrite docs to website format (#36)
1 parent 208a0ac commit 3a191d0

File tree

6 files changed

+123
-37
lines changed

6 files changed

+123
-37
lines changed

docs/readme.md

+1-33
Original file line numberDiff line numberDiff line change
@@ -1,33 +1 @@
1-
# Hetzner Cloud Provider
2-
3-
The Hetzner Cloud (hcloud) provider is used to interact with the resources supported by Hetzner Cloud. The provider needs to be configured with the proper credentials before it can be used.
4-
5-
## Example Usage
6-
7-
```
8-
# Set the variable value in *.tfvars file
9-
# or using -var="hcloud_token=..." CLI option
10-
variable "hcloud_token" {}
11-
12-
# Configure the Hetzner Cloud Provider
13-
provider "hcloud" {
14-
token = "${var.hcloud_token}"
15-
}
16-
17-
# Create a web server
18-
resource "hcloud_server" "web" {
19-
# ...
20-
}
21-
```
22-
23-
## Argument Reference
24-
25-
The following arguments are supported:
26-
27-
- `token` - (Required) This is the Hetzner Cloud API Token. This can also be specified with the `HCLOUD_TOKEN` environment variable.
28-
29-
## Resources
30-
31-
- [hcloud_server](hcloud_server.md)
32-
- [hcloud_ssh_key](hcloud_ssh_key.md)
33-
- [hcloud_floating_ip](hcloud_floating_ip.md)
1+
Moved to /website directory

website/docs/index.html.markdown

+37
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
---
2+
layout: "hcloud"
3+
page_title: "Provider: Hetzner Cloud"
4+
sidebar_current: "docs-hcloud-index"
5+
description: |-
6+
The Hetzner Cloud (hcloud) provider is used to interact with the resources supported by Hetzner Cloud.
7+
---
8+
9+
# Hetzner Cloud Provider
10+
11+
The Hetzner Cloud (hcloud) provider is used to interact with the resources supported by Hetzner Cloud. The provider needs to be configured with the proper credentials before it can be used.
12+
13+
Use the navigation to the left to read about the available resources.
14+
15+
## Example Usage
16+
17+
```hcl
18+
# Set the variable value in *.tfvars file
19+
# or using -var="hcloud_token=..." CLI option
20+
variable "hcloud_token" {}
21+
22+
# Configure the Hetzner Cloud Provider
23+
provider "hcloud" {
24+
token = "${var.hcloud_token}"
25+
}
26+
27+
# Create a server
28+
resource "hcloud_server" "web" {
29+
# ...
30+
}
31+
```
32+
33+
## Argument Reference
34+
35+
The following arguments are supported:
36+
37+
- `token` - (Required) This is the Hetzner Cloud API Token. This can also be specified with the `HCLOUD_TOKEN` environment variable.

docs/hcloud_floating_ip.md website/docs/r/floating_ip.html.md

+16
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
---
2+
layout: "hcloud"
3+
page_title: "Hetzner Cloud: hcloud_floating_ip"
4+
sidebar_current: "docs-hcloud-resource-floating-ip"
5+
description: |-
6+
Provides a Hetzner Cloud Floating IP to represent a publicly-accessible static IP addresses that can be mapped to one of your Servers.
7+
---
8+
19
# hcloud_floating_ip
210

311
Provides a Hetzner Cloud Floating IP to represent a publicly-accessible static IP addresses that can be mapped to one of your Servers.
@@ -32,3 +40,11 @@ resource "hcloud_floating_ip" "master" {
3240
- `home_location` - Home location.
3341
- `description` - Description of the Floating IP.
3442
- `ip_address` - IP Address of the Floating IP.
43+
44+
## Import
45+
46+
Floating IPs can be imported using its `id`:
47+
48+
```
49+
terraform import hcloud_floating_ip.myip <id>
50+
```

docs/hcloud_server.md website/docs/r/server.html.md

+18-3
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,18 @@
1+
---
2+
layout: "hcloud"
3+
page_title: "Hetzner Cloud: hcloud_server"
4+
sidebar_current: "docs-hcloud-resource-server"
5+
description: |-
6+
Provides an Hetzner Cloud server resource. This can be used to create, modify, and delete Servers. Servers also support provisioning.
7+
---
8+
19
# hcloud_server
210

311
Provides an Hetzner Cloud server resource. This can be used to create, modify, and delete Servers. Servers also support [provisioning](https://www.terraform.io/docs/provisioners/index.html).
412

513
## Example Usage
614

7-
```
15+
```hcl
816
# Create a new server running debian
917
resource "hcloud_server" "node1" {
1018
name = "node1"
@@ -22,8 +30,7 @@ The following arguments are supported:
2230
- `image` - (Required) Name or ID of the image the server is created from.
2331
- `location` - (Optional) The location name to create the server in.
2432
- `datacenter` - (Optional) The datacenter name to create the server in.
25-
- `user_data` - (Optional)
26-
Cloud-Init user data to use during server creation
33+
- `user_data` - (Optional) Cloud-Init user data to use during server creation
2734
- `ssh_keys` - (Optional) SSH key IDs or names which should be injected into the server at creation time
2835
- `keep_disk` - (Optional) If true, do not upgrade the disk. This allows downgrading the server type later.
2936
- `backup_window` - (Optional) Enable and configure backups for a server. Time window (UTC) in which the backup will run, choices: `22-02` `02-06` `06-10` `10-14` `14-18` `18-22`
@@ -46,3 +53,11 @@ The following attributes are exported:
4653
- `ipv4_address` - The IPv4 address.
4754
- `ipv6_address` - The IPv6 address.
4855
- `status` - The status of the server.
56+
57+
## Import
58+
59+
Servers can be imported using the server `id`:
60+
61+
```
62+
terraform import hcloud_server.myserver <id>
63+
```

docs/hcloud_ssh_key.md website/docs/r/ssh_key.html.md

+19-1
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,18 @@
1+
---
2+
layout: "hcloud"
3+
page_title: "Hetzner Cloud: hcloud_ssh_key"
4+
sidebar_current: "docs-hcloud-resource-ssh-key"
5+
description: |-
6+
Provides a Hetzner Cloud SSH key resource to manage SSH keys for server access.
7+
---
8+
19
# hcloud_ssh_key
210

11+
Provides a Hetzner Cloud SSH key resource to manage SSH keys for server access.
12+
313
## Example Usage
414

5-
```
15+
```hcl
616
# Create a new SSH key
717
resource "hcloud_ssh_key" "default" {
818
name = "Terraform Example"
@@ -25,3 +35,11 @@ The following attributes are exported:
2535
- `name` - The name of the SSH key
2636
- `public_key` - The text of the public key
2737
- `fingerprint` - The fingerprint of the SSH key
38+
39+
## Import
40+
41+
SSH keys can be imported using the SSH key `id`:
42+
43+
```
44+
terraform import hcloud_ssh_key.mykey <id>
45+
```

website/template.erb

+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
<% wrap_layout :inner do %>
2+
<% content_for :sidebar do %>
3+
<div class="docs-sidebar hidden-print affix-top" role="complementary">
4+
<ul class="nav docs-sidenav">
5+
<li<%= sidebar_current("docs-home") %>>
6+
<a href="/docs/providers/index.html">All Providers</a>
7+
</li>
8+
9+
<li<%= sidebar_current("docs-hcloud-index") %>>
10+
<a href="/docs/providers/hcloud/index.html">Hetzner Cloud Provider</a>
11+
</li>
12+
13+
<li<%= sidebar_current("docs-hcloud-resource") %>>
14+
<a href="#">Resources</a>
15+
<ul class="nav nav-visible">
16+
<li<%= sidebar_current("docs-hcloud-resource-server") %>>
17+
<a href="/docs/providers/hcloud/r/server.html">hcloud_server</a>
18+
</li>
19+
<li<%= sidebar_current("docs-hcloud-resource-ssh-key") %>>
20+
<a href="/docs/providers/hcloud/r/ssh_key.html">hcloud_ssh_key</a>
21+
</li>
22+
<li<%= sidebar_current("docs-hcloud-resource-floating-ip") %>>
23+
<a href="/docs/providers/hcloud/r/floating_ip.html">hcloud_floating_ip</a>
24+
</li>
25+
</ul>
26+
</li>
27+
</ul>
28+
</div>
29+
<% end %>
30+
31+
<%= yield %>
32+
<% end %>

0 commit comments

Comments
 (0)