Skip to content

Commit

Permalink
Update docs (#57)
Browse files Browse the repository at this point in the history
* more docs update

* add some badges

* cleanup .MDs

* update .lock

* add cloud-config to the example doc
  • Loading branch information
bpg authored May 24, 2022
1 parent 2311f1e commit 8671925
Show file tree
Hide file tree
Showing 33 changed files with 122 additions and 73 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
[![Go Report Card](https://goreportcard.com/badge/github.com/bpg/terraform-provider-proxmox)](https://goreportcard.com/report/github.com/bpg/terraform-provider-proxmox)
[![GoDoc](https://godoc.org/github.com/bpg/terraform-provider-proxmox?status.svg)](http://godoc.org/github.com/bpg/terraform-provider-proxmox)
![GitHub release (latest by date)](https://img.shields.io/github/v/release/bpg/terraform-provider-proxmox)
![GitHub Release Date](https://img.shields.io/github/release-date/bpg/terraform-provider-proxmox)
[![GitHub stars](https://img.shields.io/github/stars/bpg/terraform-provider-proxmox)](https://github.com/bpg/terraform-provider-proxmox/stargazers)

# Terraform Provider for Proxmox
A Terraform Provider which adds support for Proxmox solutions.
Expand Down
5 changes: 2 additions & 3 deletions docs/Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
GEM
remote: https://rubygems.org/
specs:
activesupport (6.0.4.6)
activesupport (6.0.4.7)
concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (>= 0.7, < 2)
minitest (~> 5.1)
Expand Down Expand Up @@ -283,7 +283,6 @@ GEM
unf (0.1.4)
unf_ext
unf_ext (0.0.8)
unf_ext (0.0.8-x64-mingw32)
unicode-display_width (1.8.0)
webrick (1.7.0)
zeitwerk (2.5.4)
Expand All @@ -304,4 +303,4 @@ DEPENDENCIES
webrick (~> 1.7)

BUNDLED WITH
2.2.11
2.3.14
2 changes: 1 addition & 1 deletion docs/_config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@ plugins:
remote_theme: pmarsceill/just-the-docs

# Theme settings.
footer_content: 'Copyright &copy; 2019-2021 <a href="https://danitso.com/" target="_blank">Danitso</a> - Distributed under the <a href="https://github.com/danitso/terraform-provider-proxmox/blob/master/LICENSE" target="_blank">Mozilla Public License 2.0</a><br>Copyright &copy; 2021 <a href="https://github.com/bpg/" target="_blank">Pavel Boldyrev</a> - Distributed under the <a href="https://github.com/bpg/terraform-provider-proxmox/blob/main/LICENSE" target="_blank">Mozilla Public License 2.0</a>'
footer_content: 'Copyright &copy; 2019-2021 <a href="https://danitso.com/" target="_blank">Danitso</a> - Distributed under the <a href="https://github.com/danitso/terraform-provider-proxmox/blob/master/LICENSE" target="_blank">Mozilla Public License 2.0</a><br>Copyright &copy; 2021-2022 <a href="https://github.com/bpg/" target="_blank">Pavel Boldyrev</a> - Distributed under the <a href="https://github.com/bpg/terraform-provider-proxmox/blob/main/LICENSE" target="_blank">Mozilla Public License 2.0</a>'
heading_anchors: true
search_enabled: false
2 changes: 1 addition & 1 deletion docs/data-sources/virtual_environment_cluster_alias.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Retrieves information about a specific alias.

## Example Usage

```
```terraform
data "proxmox_virtual_environment_cluster_alias" "local_network" {
name = "local_network"
}
Expand Down
2 changes: 1 addition & 1 deletion docs/data-sources/virtual_environment_cluster_aliases.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Retrieves the identifiers for all the available aliases.

## Example Usage

```
```terraform
data "proxmox_virtual_environment_cluster_aliases" "available_aliases" {}
```

Expand Down
2 changes: 1 addition & 1 deletion docs/data-sources/virtual_environment_datastores.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Retrieves information about all the datastores available to a specific node.

## Example Usage

```
```terraform
data "proxmox_virtual_environment_datastores" "first_node" {
node_name = "first-node"
}
Expand Down
2 changes: 1 addition & 1 deletion docs/data-sources/virtual_environment_dns.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Retrieves the DNS configuration for a specific node.

## Example Usage

```
```terraform
data "proxmox_virtual_environment_dns" "first_node" {
node_name = "first-node"
}
Expand Down
2 changes: 1 addition & 1 deletion docs/data-sources/virtual_environment_group.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Retrieves information about a specific user group.

## Example Usage

```
```terraform
data "proxmox_virtual_environment_group" "operations_team" {
group_id = "operations-team"
}
Expand Down
2 changes: 1 addition & 1 deletion docs/data-sources/virtual_environment_groups.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Retrieves basic information about all available user groups.

## Example Usage

```
```terraform
data "proxmox_virtual_environment_groups" "available_groups" {}
```

Expand Down
2 changes: 1 addition & 1 deletion docs/data-sources/virtual_environment_hosts.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Retrieves all the host entries from a specific node.

## Example Usage

```
```terraform
data "proxmox_virtual_environment_hosts" "first_node_host_entries" {
node_name = "first-node"
}
Expand Down
2 changes: 1 addition & 1 deletion docs/data-sources/virtual_environment_nodes.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Retrieves information about all available nodes.

## Example Usage

```
```terraform
data "proxmox_virtual_environment_nodes" "available_nodes" {}
```

Expand Down
2 changes: 1 addition & 1 deletion docs/data-sources/virtual_environment_pool.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Retrieves information about a specific resource pool.

## Example Usage

```
```terraform
data "proxmox_virtual_environment_pool" "operations_pool" {
pool_id = "operations"
}
Expand Down
2 changes: 1 addition & 1 deletion docs/data-sources/virtual_environment_pools.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Retrieves the identifiers for all the available resource pools.

## Example Usage

```
```terraform
data "proxmox_virtual_environment_pools" "available_pools" {}
```

Expand Down
2 changes: 1 addition & 1 deletion docs/data-sources/virtual_environment_role.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Retrieves information about a specific role.

## Example Usage

```
```terraform
data "proxmox_virtual_environment_role" "operations_role" {
role_id = "operations"
}
Expand Down
2 changes: 1 addition & 1 deletion docs/data-sources/virtual_environment_roles.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Retrieves information about all the available roles.

## Example Usage

```
```terraform
data "proxmox_virtual_environment_roles" "available_roles" {}
```

Expand Down
2 changes: 1 addition & 1 deletion docs/data-sources/virtual_environment_time.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Retrieves the current time for a specific node.

## Example Usage

```
```terraform
data "proxmox_virtual_environment_time" "first_node_time" {
node_name = "first-node"
}
Expand Down
2 changes: 1 addition & 1 deletion docs/data-sources/virtual_environment_user.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Retrieves information about a specific user.

## Example Usage

```
```terraform
data "proxmox_virtual_environment_user" "operations_user" {
user_id = "operation@pam"
}
Expand Down
2 changes: 1 addition & 1 deletion docs/data-sources/virtual_environment_users.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Retrieves information about all the available users.

## Example Usage

```
```terraform
data "proxmox_virtual_environment_users" "available_users" {}
```

Expand Down
2 changes: 1 addition & 1 deletion docs/data-sources/virtual_environment_version.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Retrieves the version information from the API endpoint.

## Example Usage

```
```terraform
data "proxmox_virtual_environment_version" "current_version" {}
```

Expand Down
4 changes: 2 additions & 2 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Use the navigation to the left to read about the available resources.

## Example Usage

```
```terraform
provider "proxmox" {
virtual_environment {
endpoint = "https://10.0.0.2"
Expand All @@ -36,7 +36,7 @@ The Proxmox provider offers a flexible means of providing credentials for authen
Static credentials can be provided by adding a `username` and `password` in-line in the Proxmox provider block:

```
```terraform
provider "proxmox" {
virtual_environment {
username = "username@realm"
Expand Down
10 changes: 5 additions & 5 deletions docs/resources/virtual_environment_certificate.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ Manages the custom SSL/TLS certificate for a specific node.

## Example Usage

```
```terraform
resource "proxmox_virtual_environment_certificate" "example" {
certificate = "${tls_self_signed_cert.proxmox_virtual_environment_certificate.cert_pem}"
certificate = tls_self_signed_cert.proxmox_virtual_environment_certificate.cert_pem
node_name = "first-node"
private_key = "${tls_private_key.proxmox_virtual_environment_certificate.private_key_pem}"
private_key = tls_private_key.proxmox_virtual_environment_certificate.private_key_pem
}
resource "tls_private_key" "proxmox_virtual_environment_certificate" {
Expand All @@ -26,8 +26,8 @@ resource "tls_private_key" "proxmox_virtual_environment_certificate" {
}
resource "tls_self_signed_cert" "proxmox_virtual_environment_certificate" {
key_algorithm = "${tls_private_key.proxmox_virtual_environment_certificate.algorithm}"
private_key_pem = "${tls_private_key.proxmox_virtual_environment_certificate.private_key_pem}"
key_algorithm = tls_private_key.proxmox_virtual_environment_certificate.algorithm
private_key_pem = tls_private_key.proxmox_virtual_environment_certificate.private_key_pem
subject {
common_name = "example.com"
Expand Down
2 changes: 1 addition & 1 deletion docs/resources/virtual_environment_cluster_alias.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ We can create aliases to identify an IP address or a network.

## Example Usage

```
```terraform
resource "proxmox_virtual_environment_cluster_alias" "local_network" {
name = "local_network"
cidr = "192.168.0.0/23"
Expand Down
2 changes: 1 addition & 1 deletion docs/resources/virtual_environment_cluster_ipset.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ An IPSet allows us to group multiple IP addresses, IP subnets and aliases.

## Example Usage

```
```terraform
resource "proxmox_virtual_environment_cluster_ipset" "ipset" {
name = "local_network"
comment = "Managed by Terraform"
Expand Down
16 changes: 8 additions & 8 deletions docs/resources/virtual_environment_container.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Manages a container.

## Example Usage

```
```terraform
resource "proxmox_virtual_environment_container" "ubuntu_container" {
description = "Managed by Terraform"
Expand All @@ -30,8 +30,8 @@ resource "proxmox_virtual_environment_container" "ubuntu_container" {
}
user_account {
keys = ["${trimspace(tls_private_key.ubuntu_container_key.public_key_openssh)}"]
password = "${random_password.ubuntu_container_password.result}"
keys = [trimspace(tls_private_key.ubuntu_container_key.public_key_openssh)]
password = random_password.ubuntu_container_password.result
}
}
Expand All @@ -40,7 +40,7 @@ resource "proxmox_virtual_environment_container" "ubuntu_container" {
}
operating_system {
template_file_id = "${proxmox_virtual_environment_file.ubuntu_container_template.id}"
template_file_id = proxmox_virtual_environment_file.ubuntu_container_template.id
type = "ubuntu"
}
}
Expand All @@ -51,7 +51,7 @@ resource "proxmox_virtual_environment_file" "ubuntu_container_template" {
node_name = "first-node"
source_file {
path = "http://download.proxmox.com/images/system/ubuntu-18.04-standard_18.04.1-1_amd64.tar.gz"
path = "http://download.proxmox.com/images/system/ubuntu-20.04-standard_20.04-1_amd64.tar.gz"
}
}
Expand All @@ -67,17 +67,17 @@ resource "tls_private_key" "ubuntu_container_key" {
}
output "ubuntu_container_password" {
value = "${random_password.ubuntu_container_password.result}"
value = random_password.ubuntu_container_password.result
sensitive = true
}
output "ubuntu_container_private_key" {
value = "${tls_private_key.ubuntu_container_key.private_key_pem}"
value = tls_private_key.ubuntu_container_key.private_key_pem
sensitive = true
}
output "ubuntu_container_public_key" {
value = "${tls_private_key.ubuntu_container_key.public_key_openssh}"
value = tls_private_key.ubuntu_container_key.public_key_openssh
}
```

Expand Down
6 changes: 3 additions & 3 deletions docs/resources/virtual_environment_dns.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ Manages the DNS configuration for a specific node.

## Example Usage

```
```terraform
resource "proxmox_virtual_environment_dns" "first_node_dns_configuration" {
domain = "${data.proxmox_virtual_environment_dns.first_node_dns_configuration.domain}"
node_name = "${data.proxmox_virtual_environment_dns.first_node_dns_configuration.node_name}"
domain = data.proxmox_virtual_environment_dns.first_node_dns_configuration.domain
node_name = data.proxmox_virtual_environment_dns.first_node_dns_configuration.node_name
servers = [
"1.1.1.1",
Expand Down
41 changes: 37 additions & 4 deletions docs/resources/virtual_environment_file.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,45 @@ Manages a file.

## Example Usage

```
```terraform
resource "proxmox_virtual_environment_file" "ubuntu_container_template" {
content_type = "vztmpl"
datastore_id = "local"
node_name = "first-node"
source_file {
path = "http://download.proxmox.com/images/system/ubuntu-18.04-standard_18.04.1-1_amd64.tar.gz"
path = "https://download.proxmox.com/images/system/ubuntu-20.04-standard_20.04-1_amd64.tar.gz"
}
}
```

```terraform
resource "proxmox_virtual_environment_file" "cloud_config" {
content_type = "snippets"
datastore_id = "local"
node_name = "pve"
source_raw {
data = <<EOF
#cloud-config
chpasswd:
list: |
ubuntu:example
expire: false
hostname: example-hostname
packages:
- qemu-guest-agent
users:
- default
- name: ubuntu
groups: sudo
shell: /bin/bash
ssh-authorized-keys:
- ${trimspace(tls_private_key.example.public_key_openssh)}
sudo: ALL=(ALL) NOPASSWD:ALL
EOF
file_name = "example.cloud-config.yaml"
}
}
```
Expand Down Expand Up @@ -53,6 +84,8 @@ resource "proxmox_virtual_environment_file" "ubuntu_container_template" {

## Important Notes

The Proxmox VE API endpoint for file uploads does not support chunked transfer encoding, which means that we must first store the source file as a temporary file locally before uploading it.
The Proxmox VE API endpoint for file uploads does not support chunked transfer encoding, which means that we must first
store the source file as a temporary file locally before uploading it.

You must ensure that you have at least `Size-in-MB * 2 + 1` MB of storage space available (twice the size plus overhead because a multipart payload needs to be created as another temporary file).
You must ensure that you have at least `Size-in-MB * 2 + 1` MB of storage space available (twice the size plus overhead
because a multipart payload needs to be created as another temporary file).
2 changes: 1 addition & 1 deletion docs/resources/virtual_environment_group.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Manages a user group.

## Example Usage

```
```terraform
resource "proxmox_virtual_environment_group" "operations_team" {
comment = "Managed by Terraform"
group_id = "operations-team"
Expand Down
2 changes: 1 addition & 1 deletion docs/resources/virtual_environment_hosts.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Manages the host entries on a specific node.

## Example Usage

```
```terraform
resource "proxmox_virtual_environment_hosts" "first_node_host_entries" {
node_name = "first-node"
Expand Down
Loading

0 comments on commit 8671925

Please sign in to comment.