Merge pull request #9824 from hashicorp/d-windows-restart-hcl2-example
provisioner/windows-restart: Add HCL2 example to documentation
This commit is contained in:
commit
b90957d11c
|
@ -26,12 +26,25 @@ so Windows must be completely booted in order to continue.
|
||||||
|
|
||||||
The example below is fully functional.
|
The example below is fully functional.
|
||||||
|
|
||||||
|
<Tabs>
|
||||||
|
<Tab heading="JSON">
|
||||||
|
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
"type": "windows-restart"
|
"type": "windows-restart"
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
</Tab>
|
||||||
|
<Tab heading="HCL2">
|
||||||
|
|
||||||
|
```hcl
|
||||||
|
provisioner "windows-restart" {}
|
||||||
|
```
|
||||||
|
|
||||||
|
</Tab>
|
||||||
|
</Tabs>
|
||||||
|
|
||||||
## Configuration Reference
|
## Configuration Reference
|
||||||
|
|
||||||
The reference of available configuration options is listed below.
|
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_check_command` (string) - A command to execute to check if the
|
||||||
restart succeeded. This will be done in a loop. Example usage:
|
restart succeeded. This will be done in a loop. Example usage:
|
||||||
|
|
||||||
|
<Tabs>
|
||||||
|
<Tab heading="JSON">
|
||||||
|
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
"type": "windows-restart",
|
"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
|
- `restart_timeout` (string) - The timeout to wait for the restart. By
|
||||||
default this is 5 minutes. Example value: `5m`. If you are installing
|
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
|
updates or have a lot of startup services, you will probably need to
|
||||||
|
|
Loading…
Reference in New Issue