From 0e388db795edfa31724d7a4b3bd58988ed5be338 Mon Sep 17 00:00:00 2001 From: Wilken Rivera Date: Tue, 25 Aug 2020 17:01:05 -0400 Subject: [PATCH] provisioner/windows-restart: Add HCL2 example to documentation --- .../docs/provisioners/windows-restart.mdx | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/website/pages/docs/provisioners/windows-restart.mdx b/website/pages/docs/provisioners/windows-restart.mdx index be5961ac3..becff205a 100644 --- a/website/pages/docs/provisioners/windows-restart.mdx +++ b/website/pages/docs/provisioners/windows-restart.mdx @@ -26,12 +26,25 @@ so Windows must be completely booted in order to continue. The example below is fully functional. + + + ```json { "type": "windows-restart" } ``` + + + +```hcl +provisioner "windows-restart" {} +``` + + + + ## 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: + + + ```json { "type": "windows-restart", @@ -71,6 +87,18 @@ Optional parameters: } ``` + + + +```hcl +provisioner "windows-restart" { + restart_check_command = "powershell -command \"& {Write-Output 'restarted.'}\"" +} +``` + + + + - `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