style and documentation changes per PR review comments

This commit is contained in:
Chris Chalfant 2016-03-15 08:01:20 -04:00
parent 8163e16e02
commit 601b833aaa
2 changed files with 17 additions and 2 deletions

View File

@ -26,7 +26,7 @@ func (s *stepStopInstance) Run(state multistep.StateBag) multistep.StepAction {
var err error
if s.DisableStopInstance == false {
if !s.DisableStopInstance {
// Stop the instance so we can create an AMI from it
ui.Say("Stopping the source instance...")
_, err = ec2conn.StopInstances(&ec2.StopInstancesInput{
@ -38,6 +38,8 @@ func (s *stepStopInstance) Run(state multistep.StateBag) multistep.StepAction {
ui.Error(err.Error())
return multistep.ActionHalt
}
} else {
ui.Say("Automatic instance stop disabled. Please stop instance manually.")
}
// Wait for the instance to actual stop

View File

@ -116,6 +116,19 @@ builder.
- `availability_zone` (string) - Destination availability zone to launch
instance in. Leave this empty to allow Amazon to auto-assign.
- `disable_stop_instance` (boolean) - Packer normally stops the build instance
after all provisioners have run. For Windows instances, it is sometimes
desirable to [run Sysprep](http://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/ami-create-standard.html)
which will stop the instance for you. If this is set to true, Packer *will not*
stop the instance and will wait for you to stop it manually. You can do this
with a [windows-shell provisioner](https://www.packer.io/docs/provisioners/windows-shell.html).
``` {.javascript}
{
"type": "windows-shell",
"inline": ["\"c:\\Program Files\\Amazon\\Ec2ConfigService\\ec2config.exe\" -sysprep"]
}```
- `ebs_optimized` (boolean) - Mark instance as [EBS
Optimized](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSOptimized.html).
Default `false`.