Skip to content

Commit

Permalink
fix(docs): document role privileges required by `proxmox_virtual_envi…
Browse files Browse the repository at this point in the history
…ronment_download_file` (#1442)

* document role privileges required by proxmox_virtual_environment_download_file resource

* move the new section to the download_file resource doc


---------

Signed-off-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
Co-authored-by: windowsrefund <mtf8>
Co-authored-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
  • Loading branch information
windowsrefund and bpg authored Jul 16, 2024
1 parent 69320cb commit 2475d99
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 1 deletion.
2 changes: 1 addition & 1 deletion docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ You can create an API Token for a user via the Proxmox UI, or via the command li
sudo pveum user add terraform@pve
```
- Create a role for the user (you can skip this step if you want to use the any of the existing roles):
- Create a role for the user (you can skip this step if you want to use any of the existing roles):
```sh
sudo pveum role add Terraform -privs "Datastore.Allocate Datastore.AllocateSpace Datastore.AllocateTemplate Datastore.Audit Pool.Allocate Sys.Audit Sys.Console Sys.Modify SDN.Use VM.Allocate VM.Audit VM.Clone VM.Config.CDROM VM.Config.Cloudinit VM.Config.CPU VM.Config.Disk VM.Config.HWType VM.Config.Memory VM.Config.Network VM.Config.Options VM.Migrate VM.Monitor VM.PowerMgmt User.Modify"
Expand Down
3 changes: 3 additions & 0 deletions docs/resources/virtual_environment_download_file.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ description: |-

Manages files upload using PVE download-url API. It can be fully compatible and faster replacement for image files created using `proxmox_virtual_environment_file`. Supports images for VMs (ISO images) and LXC (CT Templates).

~> Besides the `Datastore.AllocateTemplate` privilege, this resource requires both the `Sys.Audit` and `Sys.Modify` privileges.<br><br>
For more details, see the [`download-url`](https://pve.proxmox.com/pve-docs/api-viewer/index.html#/nodes/{node}/storage/{storage}/download-url) API documentation under the "Required permissions" section.

## Example Usage

```terraform
Expand Down
31 changes: 31 additions & 0 deletions templates/resources/virtual_environment_download_file.md.tmpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
---
layout: page
title: {{.Name}}
parent: Resources
subcategory: Virtual Environment
description: |-
{{ .Description | plainmarkdown | trimspace | prefixlines " " }}
---

# {{.Type}}: {{.Name}}

{{ .Description | trimspace }}

~> Besides the `Datastore.AllocateTemplate` privilege, this resource requires both the `Sys.Audit` and `Sys.Modify` privileges.<br><br>
For more details, see the [`download-url`](https://pve.proxmox.com/pve-docs/api-viewer/index.html#/nodes/{node}/storage/{storage}/download-url) API documentation under the "Required permissions" section.

{{ if .HasExample -}}
## Example Usage

{{ codefile "terraform" .ExampleFile }}
{{- end }}

{{ .SchemaMarkdown | trimspace }}
{{- if .HasImport }}

## Import

Import is supported using the following syntax:

{{ codefile "shell" .ImportFile }}
{{- end }}

0 comments on commit 2475d99

Please sign in to comment.