provisioner/windows-restart: Add HCL2 example to documentation

pull/9824/head
Wilken Rivera 6 years ago
parent 3506b8876f
commit 0e388db795

@ -26,12 +26,25 @@ so Windows must be completely booted in order to continue.
The example below is fully functional.
<Tabs>
<Tab heading="JSON">
```json
{
"type": "windows-restart"
}
```
</Tab>
<Tab heading="HCL2">
```hcl
provisioner "windows-restart" {}
```
</Tab>
</Tabs>
## Configuration Reference
The reference of available configuration options is listed below.
@ -64,6 +77,9 @@ Optional parameters:
- `restart_check_command` (string) - A command to execute to check if the
restart succeeded. This will be done in a loop. Example usage:
<Tabs>
<Tab heading="JSON">
```json
{
"type": "windows-restart",
@ -71,6 +87,18 @@ Optional parameters:
}
```
</Tab>
<Tab heading="HCL2">
```hcl
provisioner "windows-restart" {
restart_check_command = "powershell -command \"& {Write-Output 'restarted.'}\""
}
```
</Tab>
</Tabs>
- `restart_timeout` (string) - The timeout to wait for the restart. By
default this is 5 minutes. Example value: `5m`. If you are installing
updates or have a lot of startup services, you will probably need to

Loading…
Cancel
Save