ivkcs_compute_instance_reboot resource
The argument of the ivkcs_compute_instance_reboot resource is given in table 1.
Table 1 — Argument of the ivkcs_compute_instance_reboot resource
Name | Description | Format | Required | Resource recreation upon value change |
|---|---|---|---|---|
| ID of the host that will be rebooted. The ID is computed by the resource that creates the host (the | string |
If the reboot occurs immediately after creating a VM, use a pause between creation and reboot. The pause will ensure that all processes occurring during VM creation are completed.
Example of the `ivkcs_compute_instance_reboot` resource with a pause
# Creating a pauseresource "time_sleep" "before_reboot" {create_duration = "30s"depends_on = [# Dependency on VM creation and disk attachmentvkcs_compute_instance.compute,vkcs_compute_volume_attach.attached,]}# VM rebootresource "ivkcs_compute_instance_reboot" "reboot" {instance = vkcs_compute_instance.compute.iddepends_on = [# Dependency on the pausetime_sleep.before_reboot,]}# Running scriptsresource "ivkcs_agent_exec" "start" {…depends_on = [# Dependency on VM rebootivkcs_compute_instance_reboot.reboot,]…}
Was this article helpful?