upgrade pause_before (#10654)

This commit is contained in:
Sylvia Moss 2021-02-18 15:05:12 +01:00 committed by GitHub
parent ab89df9a88
commit 37d05c85ff
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 8 additions and 3 deletions

View File

@ -981,6 +981,9 @@ func writeProvisioner(typeName string, provisioner *template.Provisioner) []byte
if provisioner.Timeout > 0 {
cfg["timeout"] = provisioner.Timeout.String()
}
if provisioner.PauseBefore > 0 {
cfg["pause_before"] = provisioner.PauseBefore.String()
}
body.AppendNewline()
jsonBodyToHCL2Body(block.Body(), cfg)
return provisionerContent.Bytes()

View File

@ -243,6 +243,7 @@ build {
provisioner "shell-local" {
inline = ["sleep 100000"]
only = ["amazon-ebs"]
pause_before = "5s"
timeout = "5s"
}

View File

@ -189,6 +189,7 @@
"amazon-ebs"
],
"timeout": "5s",
"pause_before": "5s",
"inline": [
"sleep 100000"
]