Skip to content

Implement hypercore_vm_replication resource #19

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Apr 2, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
63 changes: 63 additions & 0 deletions docs/resources/vm_replication.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "hypercore_vm_replication Resource - hypercore"
subcategory: ""
description: |-
Hypercore VM replication resource to manage VM boot devices' order
---

# hypercore_vm_replication (Resource)

Hypercore VM replication resource to manage VM boot devices' order

## Example Usage

```terraform
locals {
vm_name = "example-vm"
another_vm_name = "example-vm-two"
}

data "hypercore_vm" "example-vm" {
name = local.vm_name
}

data "hypercore_vm" "example-vm-two" {
name = local.another_vm_name
}

resource "hypercore_vm_replication" "example-replication" {
vm_uuid = data.hypercore_vm.vm-repl.vms.0.uuid
label = "my-example-replication"

connection_uuid = "6ab8c456-85af-4c97-8cb7-76246552b1e6" # remote connection UUID
enable = false
}

resource "hypercore_vm_replication" "example-replication-imported" {
vm_uuid = data.hypercore_vm.example-vm-two.vms.0.uuid
}

import {
to = hypercore_vm_replication.example-replication-imported
id = "7eb23160-2c80-4519-b23d-b43fb3ca9da4"
}
```

<!-- schema generated by tfplugindocs -->
## Schema

### Required

- `vm_uuid` (String) VM UUID of which we want to make a replication

### Optional

- `connection_uuid` (String) Remote connection UUID
- `enable` (Boolean) Enable or disable replication
- `label` (String) Human-readable label describing the replication purpose

### Read-Only

- `id` (String) Replication identifier
- `target_vm_uuid` (String) Remote target VM UUID
29 changes: 29 additions & 0 deletions examples/resources/hypercore_vm_replication/resource.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
locals {
vm_name = "example-vm"
another_vm_name = "example-vm-two"
}

data "hypercore_vm" "example-vm" {
name = local.vm_name
}

data "hypercore_vm" "example-vm-two" {
name = local.another_vm_name
}

resource "hypercore_vm_replication" "example-replication" {
vm_uuid = data.hypercore_vm.vm-repl.vms.0.uuid
label = "my-example-replication"

connection_uuid = "6ab8c456-85af-4c97-8cb7-76246552b1e6" # remote connection UUID
enable = false
}

resource "hypercore_vm_replication" "example-replication-imported" {
vm_uuid = data.hypercore_vm.example-vm-two.vms.0.uuid
}

import {
to = hypercore_vm_replication.example-replication-imported
id = "7eb23160-2c80-4519-b23d-b43fb3ca9da4"
}
Loading
Loading