Skip to content

Commit

Permalink
Attempt at fixing bash command rendering
Browse files Browse the repository at this point in the history
  • Loading branch information
ddelnano committed Dec 28, 2023
1 parent 996d8f9 commit d434b1a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
3 changes: 2 additions & 1 deletion docs/resources/vm.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ resource "xenorchestra_vm" "bar" {
### Required

- `cpus` (Number) The number of CPUs the VM will have. Updates to this field will cause a stop and start of the VM if the new CPU value is greater than the max CPU value. This can be determined with the following command:
```
$ xo-cli xo.getAllObjects filter='json:{"id": "cf7b5d7d-3cd5-6b7c-5025-5c935c8cd0b8"}' | jq '.[].CPUs'
{
Expand All @@ -90,7 +91,7 @@ $ xo-cli xo.getAllObjects filter='json:{"id": "cf7b5d7d-3cd5-6b7c-5025-5c935c8cd
}
# Updating the VM to use 3 CPUs would happen without stopping/starting the VM
# Updating the VM to use 5 CPUs would stop/start the VM
# Updating the VM to use 5 CPUs would stop/start the VM```
- `disk` (Block List, Min: 1) The disk the VM will have access to. (see [below for nested schema](#nestedblock--disk))
- `memory_max` (Number) The amount of memory in bytes the VM will have. Updates to this field will case a stop and start of the VM if the new value is greater than the dynamic memory max. This can be determined with the following command:

Expand Down
5 changes: 4 additions & 1 deletion xoa/resource_xenorchestra_vm.go
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,8 @@ func resourceVmSchema() map[string]*schema.Schema {
Type: schema.TypeInt,
Required: true,
Description: `The number of CPUs the VM will have. Updates to this field will cause a stop and start of the VM if the new CPU value is greater than the max CPU value. This can be determined with the following command:
` + "```" +
`
$ xo-cli xo.getAllObjects filter='json:{"id": "cf7b5d7d-3cd5-6b7c-5025-5c935c8cd0b8"}' | jq '.[].CPUs'
{
Expand All @@ -173,7 +175,8 @@ $ xo-cli xo.getAllObjects filter='json:{"id": "cf7b5d7d-3cd5-6b7c-5025-5c935c8cd
}
# Updating the VM to use 3 CPUs would happen without stopping/starting the VM
# Updating the VM to use 5 CPUs would stop/start the VM`,
# Updating the VM to use 5 CPUs would stop/start the VM` + "```" + `
`,
},
"memory_max": &schema.Schema{
Type: schema.TypeInt,
Expand Down

0 comments on commit d434b1a

Please sign in to comment.