mirror of
https://github.com/bpg/terraform-provider-proxmox.git
synced 2025-07-01 11:02:59 +00:00
57 lines
1.4 KiB
Markdown
57 lines
1.4 KiB
Markdown
---
|
|
layout: page
|
|
title: proxmox_virtual_environment_haresource
|
|
parent: Resources
|
|
subcategory: Virtual Environment
|
|
description: |-
|
|
Manages Proxmox HA resources.
|
|
---
|
|
|
|
# Resource: proxmox_virtual_environment_haresource
|
|
|
|
Manages Proxmox HA resources.
|
|
|
|
## Example Usage
|
|
|
|
```terraform
|
|
resource "proxmox_virtual_environment_haresource" "example" {
|
|
depends_on = [
|
|
proxmox_virtual_environment_hagroup.example
|
|
]
|
|
resource_id = "vm:123"
|
|
state = "started"
|
|
group = "example"
|
|
comment = "Managed by Terraform"
|
|
}
|
|
```
|
|
|
|
<!-- schema generated by tfplugindocs -->
|
|
## Schema
|
|
|
|
### Required
|
|
|
|
- `resource_id` (String) The Proxmox HA resource identifier
|
|
|
|
### Optional
|
|
|
|
- `comment` (String) The comment associated with this resource.
|
|
- `group` (String) The identifier of the High Availability group this resource is a member of.
|
|
- `max_relocate` (Number) The maximal number of relocation attempts.
|
|
- `max_restart` (Number) The maximal number of restart attempts.
|
|
- `state` (String) The desired state of the resource.
|
|
- `type` (String) The type of HA resources to create. If unset, it will be deduced from the `resource_id`.
|
|
|
|
### Read-Only
|
|
|
|
- `id` (String) The unique identifier of this resource.
|
|
|
|
## Import
|
|
|
|
Import is supported using the following syntax:
|
|
|
|
```shell
|
|
#!/usr/bin/env sh
|
|
# HA resources can be imported using their identifiers, e.g.:
|
|
terraform import proxmox_virtual_environment_haresource.example vm:123
|
|
```
|