Skip to content

Commit

Permalink
misc: update documentation
Browse files Browse the repository at this point in the history
Signed-off-by: Pavel Boldyrev <[email protected]>
  • Loading branch information
bpg committed May 6, 2024
1 parent ce47411 commit b6af836
Show file tree
Hide file tree
Showing 40 changed files with 139 additions and 89 deletions.
5 changes: 3 additions & 2 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@ If applicable, add screenshots to help explain your problem.
Add any other context about the problem here.

- Single or clustered Proxmox:
- Proxmox version:
- Provider version (ideally it should be the latest version):
- Terraform version:
- OS (where you run Terraform from):
- Terraform/OpenTofu version:
- OS (where you run Terraform/OpenTofu from):
- Debug logs (`TF_LOG=DEBUG terraform apply`):
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ testing changes to the provider before submitting a PR.

- Create a $HOME/.terraformrc (POSIX) or %APPDATA%/terraform.rc (Windows) file with the following contents:

```terraform
```hcl
provider_installation {
dev_overrides {
Expand Down
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -142,3 +142,10 @@ See [CONTRIBUTORS.md](CONTRIBUTORS.md) for a list of contributors to this projec
- [Ben Bouillet](https://github.com/benbouillet)

Thanks again for your support, it is much appreciated! 🙏


## Acknowledgements

This project has been developed with **GoLand** IDE under the [JetBrains Open Source license](https://www.jetbrains.com/community/opensource/#support), generously provided by JetBrains s.r.o.

<img src="https://resources.jetbrains.com/storage/products/company/brand/logos/GoLand_icon.png" alt="GoLand logo" width="80">
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 @@ -11,7 +11,7 @@ Retrieves information about all the datastores available to a specific node.

## Example Usage

```terraform
```hcl
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 @@ -11,7 +11,7 @@ Retrieves the DNS configuration for a specific node.

## Example Usage

```terraform
```hcl
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 @@ -11,7 +11,7 @@ Retrieves information about a specific user group.

## Example Usage

```terraform
```hcl
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 @@ -11,7 +11,7 @@ Retrieves basic information about all available user groups.

## Example Usage

```terraform
```hcl
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 @@ -11,7 +11,7 @@ Retrieves all the host entries from a specific node.

## Example Usage

```terraform
```hcl
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_node.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Retrieves information about node.

## Example Usage

```terraform
```hcl
data "proxmox_virtual_environment_node" "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 @@ -11,7 +11,7 @@ Retrieves information about all available nodes.

## Example Usage

```terraform
```hcl
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 @@ -11,7 +11,7 @@ Retrieves information about a specific resource pool.

## Example Usage

```terraform
```hcl
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 @@ -11,7 +11,7 @@ Retrieves the identifiers for all the available resource pools.

## Example Usage

```terraform
```hcl
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 @@ -11,7 +11,7 @@ Retrieves information about a specific role.

## Example Usage

```terraform
```hcl
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 @@ -11,7 +11,7 @@ Retrieves information about all the available roles.

## Example Usage

```terraform
```hcl
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 @@ -11,7 +11,7 @@ Retrieves the current time for a specific node.

## Example Usage

```terraform
```hcl
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 @@ -11,7 +11,7 @@ Retrieves information about a specific user.

## Example Usage

```terraform
```hcl
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 @@ -11,7 +11,7 @@ Retrieves information about all the available users.

## Example Usage

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

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

## Example Usage

```terraform
```hcl
data "proxmox_virtual_environment_vm" "test_vm" {
node_name = "test"
vm_id = 100
Expand Down
2 changes: 1 addition & 1 deletion docs/data-sources/virtual_environment_vms.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Retrieves information about all VMs in the Proxmox cluster.

## Example Usage

```terraform
```hcl
data "proxmox_virtual_environment_vms" "ubuntu_vms" {
tags = ["ubuntu"]
}
Expand Down
38 changes: 19 additions & 19 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
```hcl
provider "proxmox" {
endpoint = "https://10.0.0.2:8006/"
# TODO: use terraform variable or remove the line, and use PROXMOX_VE_USERNAME environment variable
Expand Down Expand Up @@ -41,7 +41,7 @@ Static credentials can be provided to the `proxmox` block through either a `api_

Static credentials can be provided by adding a `username` and `password`, or `api_token` in-line in the Proxmox provider block:

```terraform
```hcl
provider "proxmox" {
endpoint = "https://10.0.0.2:8006/"
username = "username@realm"
Expand All @@ -51,7 +51,7 @@ provider "proxmox" {

A better approach is to extract these values into Terraform variables, and reference the variables instead:

```terraform
```hcl
provider "proxmox" {
endpoint = var.virtual_environment_endpoint
username = var.virtual_environment_username
Expand All @@ -67,7 +67,7 @@ See the [Terraform documentation](https://www.terraform.io/docs/configuration/va
Instead of using static arguments, credentials can be handled through the use of environment variables.
For example:

```terraform
```hcl
provider "proxmox" {
endpoint = "https://10.0.0.2:8006/"
}
Expand All @@ -91,7 +91,7 @@ For example, to import VM disks, or to uploading certain type of resources, such

The SSH connection configuration is provided via the optional `ssh` block in the `provider` block:

```terraform
```hcl
provider "proxmox" {
endpoint = "https://10.0.0.2:8006/"
username = "username@realm"
Expand Down Expand Up @@ -124,7 +124,7 @@ you can use the `private_key` argument in the `ssh` block (or alternatively `PRO
The private key mut not be encrypted, and must be in PEM format.

You can provide the private key from a file:
```terraform
```hcl
provider "proxmox" {
// ...
ssh {
Expand All @@ -135,20 +135,20 @@ provider "proxmox" {
```

Alternatively, although not recommended due to the increased risk of exposing an unprotected key, heredoc syntax can be used to supply the private key as a string.
Note that the content of the private key must not be indented:
```terraform
Note that the content of the private key is injected using `<<-` format to ignore indentation:
```hcl
provider "proxmox" {
// ...
ssh {
agent = false
private_key = <<EOF
-----BEGIN OPENSSH PRIVATE KEY-----
b3BlbnNzaC1rZXktdjEAAAAABG5vbmUAAAAEbm9uZQAAAAAAAAABAAAAMwAAAAtzc2gtZW
<SKIPPED>
DMUWUEaH7yMCKl7uCZ9xAAAAAAECAwQF
-----END OPENSSH PRIVATE KEY-----
EOF
private_key = <<-EOF
-----BEGIN OPENSSH PRIVATE KEY-----
b3BlbnNzaC1rZXktdjEAAAAABG5vbmUAAAAEbm9uZQAAAAAAAAABAAAAMwAAAAtzc2gtZW
<SKIPPED>
DMUWUEaH7yMCKl7uCZ9xAAAAAAECAwQF
-----END OPENSSH PRIVATE KEY-----
EOF
}
}
```
Expand All @@ -158,7 +158,7 @@ EOF
By default, the provider will use the same username for the SSH connection as the one used for the Proxmox API connection (when using PAM authentication).
This can be overridden by specifying the `username` argument in the `ssh` block (or alternatively a username in the `PROXMOX_VE_SSH_USERNAME` environment variable):

```terraform
```hcl
provider "proxmox" {
// ...
Expand Down Expand Up @@ -234,7 +234,7 @@ In some cases this may not be the desired behavior, for example, when the node h
To override the node IP address used for SSH connection, you can use the optional `node` blocks in the `ssh` block, and specify the desired IP address (or FQDN) for each node.
For example:
```terraform
```hcl
provider "proxmox" {
// ...
ssh {
Expand All @@ -257,7 +257,7 @@ The provider supports SSH connection to the target node via a SOCKS5 proxy.
To enable the SOCKS5 proxy, you need to configure the `ssh` block in the `provider` block, and specify the `socks5_server` argument:
```terraform
```hcl
provider "proxmox" {
// ...
ssh {
Expand Down Expand Up @@ -309,7 +309,7 @@ Refer to the upstream docs as needed for additional details concerning [PVE User
Generating the token will output a table containing the token's ID and secret which are meant to be concatenated into a single string for use with either the `api_token` field of the `provider` block (fine for testing but should be avoided) or sourced from the `PROXMOX_VE_API_TOKEN` environment variable.

```terraform
```hcl
provider "proxmox" {
endpoint = var.virtual_environment_endpoint
api_token = "terraform@pve!provider=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
Expand Down
2 changes: 1 addition & 1 deletion docs/resources/virtual_environment_certificate.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Manages the custom SSL/TLS certificate for a specific node.

## Example Usage

```terraform
```hcl
resource "proxmox_virtual_environment_certificate" "example" {
certificate = tls_self_signed_cert.proxmox_virtual_environment_certificate.cert_pem
node_name = "first-node"
Expand Down
2 changes: 1 addition & 1 deletion docs/resources/virtual_environment_cluster_firewall.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Manages firewall options on the cluster level.

## Example Usage

```terraform
```hcl
resource "proxmox_virtual_environment_cluster_firewall" "example" {
enabled = false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ with rules to open the http and https ports.

## Example Usage

```terraform
```hcl
resource "proxmox_virtual_environment_cluster_firewall_security_group" "webserver" {
name = "webserver"
comment = "Managed by Terraform"
Expand Down
2 changes: 1 addition & 1 deletion docs/resources/virtual_environment_container.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Manages a container.

## Example Usage

```terraform
```hcl
resource "proxmox_virtual_environment_container" "ubuntu_container" {
description = "Managed by Terraform"
Expand Down
2 changes: 1 addition & 1 deletion docs/resources/virtual_environment_dns.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Manages the DNS configuration for a specific node.

## Example Usage

```terraform
```hcl
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
Expand Down
8 changes: 4 additions & 4 deletions docs/resources/virtual_environment_file.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Manages a file.

-> The resource with this content type uses SSH access to the node. You might need to configure the [`ssh` option in the `provider` section](../index.md#node-ip-address-used-for-ssh-connection).

```terraform
```hcl
resource "proxmox_virtual_environment_file" "backup" {
content_type = "dump"
datastore_id = "local"
Expand All @@ -31,7 +31,7 @@ resource "proxmox_virtual_environment_file" "backup" {

-> Consider using `proxmox_virtual_environment_download_file` resource instead. Using this resource for images is less efficient (requires to transfer uploaded image to node) though still supported.

```terraform
```hcl
resource "proxmox_virtual_environment_file" "ubuntu_container_template" {
content_type = "iso"
datastore_id = "local"
Expand All @@ -49,7 +49,7 @@ resource "proxmox_virtual_environment_file" "ubuntu_container_template" {

-> The resource with this content type uses SSH access to the node. You might need to configure the [`ssh` option in the `provider` section](../index.md#node-ip-address-used-for-ssh-connection).

```terraform
```hcl
resource "proxmox_virtual_environment_file" "cloud_config" {
content_type = "snippets"
datastore_id = "local"
Expand Down Expand Up @@ -84,7 +84,7 @@ EOF

-> Consider using `proxmox_virtual_environment_download_file` resource instead. Using this resource for container images is less efficient (requires to transfer uploaded image to node) though still supported.

```terraform
```hcl
resource "proxmox_virtual_environment_file" "ubuntu_container_template" {
content_type = "vztmpl"
datastore_id = "local"
Expand Down
2 changes: 1 addition & 1 deletion docs/resources/virtual_environment_firewall_alias.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ created on the cluster level, on VM / Container level.

## Example Usage

```terraform
```hcl
resource "proxmox_virtual_environment_firewall_alias" "local_network" {
depends_on = [proxmox_virtual_environment_vm.example]
Expand Down
2 changes: 1 addition & 1 deletion docs/resources/virtual_environment_firewall_ipset.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ created on the cluster level, on VM / Container level.

## Example Usage

```terraform
```hcl
resource "proxmox_virtual_environment_firewall_ipset" "ipset" {
depends_on = [proxmox_virtual_environment_vm.example]
Expand Down
Loading

0 comments on commit b6af836

Please sign in to comment.