mirror of
https://github.com/bpg/terraform-provider-proxmox.git
synced 2025-07-05 13:33:58 +00:00
fix(docs): add SSH info box to ressources needing it (#690)
* Update virtual_environment_file.md * Update proxmox_virtual_environment_file readme Signed-off-by: DanielHabenicht <daniel-habenicht@outlook.de> --------- Co-authored-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
This commit is contained in:
parent
817e43c912
commit
e45c1c8126
@ -13,18 +13,42 @@ Manages a file.
|
|||||||
|
|
||||||
## Example Usage
|
## Example Usage
|
||||||
|
|
||||||
|
### Backups
|
||||||
|
|
||||||
|
-> **Note:** 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
|
```terraform
|
||||||
resource "proxmox_virtual_environment_file" "ubuntu_container_template" {
|
resource "proxmox_virtual_environment_file" "backup" {
|
||||||
content_type = "vztmpl"
|
content_type = "backup"
|
||||||
datastore_id = "local"
|
datastore_id = "local"
|
||||||
node_name = "first-node"
|
node_name = "pve"
|
||||||
|
|
||||||
source_file {
|
source_file {
|
||||||
path = "https://download.proxmox.com/images/system/ubuntu-20.04-standard_20.04-1_amd64.tar.gz"
|
path = "vzdump-lxc-100-2023_11_08-23_10_05.tar"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Images
|
||||||
|
|
||||||
|
```terraform
|
||||||
|
resource "proxmox_virtual_environment_file" "ubuntu_container_template" {
|
||||||
|
content_type = "iso"
|
||||||
|
datastore_id = "local"
|
||||||
|
node_name = "pve"
|
||||||
|
|
||||||
|
source_file {
|
||||||
|
path = "https://cloud-images.ubuntu.com/jammy/20230929/jammy-server-cloudimg-amd64-disk-kvm.img"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Snippets
|
||||||
|
|
||||||
|
-> **Note:** Snippets are not enabled by default in new Proxmox installations. You need to enable them in the 'Datacenter>Storage' section of the proxmox interface before first using this resource.
|
||||||
|
|
||||||
|
-> **Note:** 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
|
```terraform
|
||||||
resource "proxmox_virtual_environment_file" "cloud_config" {
|
resource "proxmox_virtual_environment_file" "cloud_config" {
|
||||||
content_type = "snippets"
|
content_type = "snippets"
|
||||||
@ -56,6 +80,21 @@ EOF
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Container Template (`vztmpl`)
|
||||||
|
|
||||||
|
```terraform
|
||||||
|
resource "proxmox_virtual_environment_file" "ubuntu_container_template" {
|
||||||
|
content_type = "vztmpl"
|
||||||
|
datastore_id = "local"
|
||||||
|
node_name = "first-node"
|
||||||
|
|
||||||
|
source_file {
|
||||||
|
path = "https://download.proxmox.com/images/system/ubuntu-20.04-standard_20.04-1_amd64.tar.gz"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
## Argument Reference
|
## Argument Reference
|
||||||
|
|
||||||
- `content_type` - (Optional) The content type. If not specified, the content type will be inferred from the file
|
- `content_type` - (Optional) The content type. If not specified, the content type will be inferred from the file
|
||||||
@ -107,10 +146,6 @@ unconditionally replace it and take ownership of the resource. On destruction,
|
|||||||
the file will be deleted as if it did not exist before. If you want to prevent
|
the file will be deleted as if it did not exist before. If you want to prevent
|
||||||
the resource from replacing the file, set `overwrite` to `false`.
|
the resource from replacing the file, set `overwrite` to `false`.
|
||||||
|
|
||||||
Make sure the target datastore supports the content type you are uploading. For
|
|
||||||
example, the `snippets` content type can be disabled by default on the `local`
|
|
||||||
datastore.
|
|
||||||
|
|
||||||
## Import
|
## Import
|
||||||
|
|
||||||
Instances can be imported using the `node_name`, `datastore_id`, `content_type`
|
Instances can be imported using the `node_name`, `datastore_id`, `content_type`
|
||||||
|
@ -11,6 +11,8 @@ subcategory: Virtual Environment
|
|||||||
|
|
||||||
Manages a virtual machine.
|
Manages a virtual machine.
|
||||||
|
|
||||||
|
> This resource 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).
|
||||||
|
|
||||||
## Example Usage
|
## Example Usage
|
||||||
|
|
||||||
```terraform
|
```terraform
|
||||||
|
Loading…
Reference in New Issue
Block a user