|
|
|
|
@ -89,34 +89,23 @@ type RunConfig struct {
|
|
|
|
|
// which will stop the instance for you. If this is set to `true`, Packer
|
|
|
|
|
// *will not* stop the instance but will assume that you will send the stop
|
|
|
|
|
// signal yourself through your final provisioner. You can do this with a
|
|
|
|
|
// [windows-shell
|
|
|
|
|
// provisioner](/docs/provisioners/windows-shell).
|
|
|
|
|
// Note that Packer will still wait for the instance to be stopped, and
|
|
|
|
|
// failing to send the stop signal yourself, when you have set this flag to
|
|
|
|
|
// `true`, will cause a timeout.
|
|
|
|
|
// Example of a valid shutdown command:
|
|
|
|
|
//
|
|
|
|
|
// <Tabs>
|
|
|
|
|
// <Tab heading="JSON">
|
|
|
|
|
//
|
|
|
|
|
// ```json
|
|
|
|
|
// "provisioners: [{
|
|
|
|
|
// "type": "windows-shell",
|
|
|
|
|
// "inline": ["\"c:\\Program Files\\Amazon\\Ec2ConfigService\\ec2config.exe\" -sysprep"]
|
|
|
|
|
// }]
|
|
|
|
|
// [windows-shell provisioner](/docs/provisioners/windows-shell). Note that
|
|
|
|
|
// Packer will still wait for the instance to be stopped, and failing to
|
|
|
|
|
// send the stop signal yourself, when you have set this flag to `true`,
|
|
|
|
|
// will cause a timeout.
|
|
|
|
|
//
|
|
|
|
|
// An example of a valid windows shutdown command in a `windows-shell`
|
|
|
|
|
// provisioner is :
|
|
|
|
|
// ```shell-session
|
|
|
|
|
// ec2config.exe -sysprep
|
|
|
|
|
// ```
|
|
|
|
|
//
|
|
|
|
|
// </Tab>
|
|
|
|
|
// <Tab heading="HCL2">
|
|
|
|
|
//
|
|
|
|
|
// ```hcl
|
|
|
|
|
// provisioner "windows-shell"{
|
|
|
|
|
// inline = ["\"c:\\Program Files\\Amazon\\Ec2ConfigService\\ec2config.exe\" -sysprep"]
|
|
|
|
|
// }
|
|
|
|
|
// or
|
|
|
|
|
// ```sell-session
|
|
|
|
|
// "%programfiles%\amazon\ec2configservice\"ec2config.exe -sysprep""
|
|
|
|
|
// ```
|
|
|
|
|
//
|
|
|
|
|
// </Tab>
|
|
|
|
|
// </Tabs>
|
|
|
|
|
// -> Note: The double quotation marks in the command are not required if
|
|
|
|
|
// your CMD shell is already in the
|
|
|
|
|
// `C:\Program Files\Amazon\EC2ConfigService\` directory.
|
|
|
|
|
DisableStopInstance bool `mapstructure:"disable_stop_instance" required:"false"`
|
|
|
|
|
// Mark instance as [EBS
|
|
|
|
|
// Optimized](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSOptimized.html).
|
|
|
|
|
|