0
0
mirror of https://github.com/bpg/terraform-provider-proxmox.git synced 2025-07-01 02:52:58 +00:00
terraform-provider-proxmox/docs/resources
Sven Greb 76c1c2282b
feat(cluster): Implement initial support for "hardware mappings" (#1213)
* feat(cluster): Implement initial support for "hardware mappings"

Right now it is alredy possible to use a mapped resource [1], but there
is no dedicated `proxmox_virtual_environment_cluster_hardware_mapping`
resource but this step must still be done manually (or automated through
other ways that interact with the Proxmox API).

This commit implements support for "hardware mapping" resources and data
sources for the, currently, available bus types PCI and USB, based on
the Proxmox VE API documentations [2].

There are some "specialities" in these resources and data sources:

1. The Proxmox VE API attribute, but this implementations names it
   "comment" since this naming is generally across the Proxmox VE web UI
   and API documentations. This still follows the Terraform
   "best practices" [3] as it improves the user experience by matching
   the field name to the naming used in the human-facing interfaces.

2. Like in point 1, the name of the attribute of "node checks
   diagnostics" for USB hardware mappings is "errors" in the Proxmox VE
   API while it is "checks" for hardware mappings of type PCI.
   The second naming pattern is also generally used across the
   Proxmox VE web UI and API documentations, including the "check_node"
   attribute that is also implemented in the
   "proxmox_virtual_environment_hardware_mappings" data source.
   Therefore, this implementation named both attributes "checks" which
   still follows the Terraform "best practices" [3] as it improves the
   user experience by matching the field name to the naming used in the
   human-facing interfaces.
3. This implmenetation comes with the "unique" feature of allowing
   comments (named "descriptions" by the Proxmox VE API) for an entry in
   a device map which is not possible through the web UI at all but only
   adding a comment for the whole mapping entry instead.

Note that this implementation also adds another point in the
"Known Issues" documentation since it is only possible to map a
PCI/USB device using the `root` PAM account, but this is still better
than having to manually configure it through the web UI or by
interacting with the Proxmox VE API on other ways.

[1]: https://github.com/bpg/terraform-provider-proxmox/pull/500
[2]: https://pve.proxmox.com/pve-docs/api-viewer/#/cluster/mapping/pci
[3]: https://developer.hashicorp.com/terraform/plugin/best-practices/hashicorp-provider-design-principles#resource-and-attribute-schema-should-closely-match-the-underlying-api

Signed-off-by: Sven Greb <development@svengreb.de>

* fix linter

Signed-off-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>

---------

Signed-off-by: Sven Greb <development@svengreb.de>
Signed-off-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
Co-authored-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
2024-04-18 16:00:51 -04:00
..
virtual_environment_certificate.md chore(docs): remove static website generator with ruby dependencies (#929) 2024-01-18 03:21:50 +00:00
virtual_environment_cluster_firewall_security_group.md fix(docs): Inconsistent indentations in docs (#961) 2024-01-26 20:25:51 -05:00
virtual_environment_cluster_firewall.md fix(docs): Inconsistent indentations in docs (#961) 2024-01-26 20:25:51 -05:00
virtual_environment_cluster_options.md fix(cluster): inconsistencies in applying cluster options (#573) 2023-09-23 08:04:52 -04:00
virtual_environment_container.md fix(lxc): improve configurable timeouts for containers operations (#1161) 2024-03-24 21:15:40 -04:00
virtual_environment_dns.md chore(docs): remove static website generator with ruby dependencies (#929) 2024-01-18 03:21:50 +00:00
virtual_environment_download_file.md feat(file): add overwrite_unmanaged attribute to virtual_environment_download_file resource (#1064) 2024-02-25 21:33:17 -05:00
virtual_environment_file.md chore(docs): minor documentation updates (#1200) 2024-04-10 02:07:22 +00:00
virtual_environment_firewall_alias.md chore(docs): remove static website generator with ruby dependencies (#929) 2024-01-18 03:21:50 +00:00
virtual_environment_firewall_ipset.md fix(docs): Inconsistent indentations in docs (#961) 2024-01-26 20:25:51 -05:00
virtual_environment_firewall_options.md fix(docs): Inconsistent indentations in docs (#961) 2024-01-26 20:25:51 -05:00
virtual_environment_firewall_rules.md fix(docs): Inconsistent indentations in docs (#961) 2024-01-26 20:25:51 -05:00
virtual_environment_group.md fix(docs): Inconsistent indentations in docs (#961) 2024-01-26 20:25:51 -05:00
virtual_environment_hagroup.md feat(cluster): add cluster options resource (#548) 2023-09-12 07:49:03 -04:00
virtual_environment_hardware_mapping_pci.md feat(cluster): Implement initial support for "hardware mappings" (#1213) 2024-04-18 16:00:51 -04:00
virtual_environment_hardware_mapping_usb.md feat(cluster): Implement initial support for "hardware mappings" (#1213) 2024-04-18 16:00:51 -04:00
virtual_environment_haresource.md feat(cluster): add cluster options resource (#548) 2023-09-12 07:49:03 -04:00
virtual_environment_hosts.md fix(docs): Inconsistent indentations in docs (#961) 2024-01-26 20:25:51 -05:00
virtual_environment_network_linux_bridge.md feat(docs): add initial mini-howtos for VM (#730) 2023-11-28 12:38:47 -05:00
virtual_environment_network_linux_vlan.md feat(docs): add initial mini-howtos for VM (#730) 2023-11-28 12:38:47 -05:00
virtual_environment_pool.md fix(docs): Inconsistent indentations in docs (#961) 2024-01-26 20:25:51 -05:00
virtual_environment_role.md chore(docs): remove static website generator with ruby dependencies (#929) 2024-01-18 03:21:50 +00:00
virtual_environment_time.md chore(docs): remove static website generator with ruby dependencies (#929) 2024-01-18 03:21:50 +00:00
virtual_environment_user.md fix(docs): Inconsistent indentations in docs (#961) 2024-01-26 20:25:51 -05:00
virtual_environment_vm.md feat(vm): add support for initialization.upgrade attribute (#1203) 2024-04-10 23:43:39 +00:00