Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Log when skipping instance stop for spot instances #514

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .web-docs/components/builder/ebs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -581,6 +581,10 @@ JSON example:
-> 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.

Note that when using a spot instance, Packer doesn't stop the instance,
regardless of the value of this setting. Instead, it relies on the CreateImage
call to stop and restart the instance.

- `ebs_optimized` (bool) - Mark instance as [EBS
Optimized](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSOptimized.html).
Expand Down
4 changes: 4 additions & 0 deletions .web-docs/components/builder/ebssurrogate/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -594,6 +594,10 @@ JSON example:
-> 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.

Note that when using a spot instance, Packer doesn't stop the instance,
regardless of the value of this setting. Instead, it relies on the CreateImage
call to stop and restart the instance.

- `ebs_optimized` (bool) - Mark instance as [EBS
Optimized](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSOptimized.html).
Expand Down
4 changes: 4 additions & 0 deletions .web-docs/components/builder/ebsvolume/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -546,6 +546,10 @@ https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/block-device-mapping-concept
-> 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.

Note that when using a spot instance, Packer doesn't stop the instance,
regardless of the value of this setting. Instead, it relies on the CreateImage
call to stop and restart the instance.

- `ebs_optimized` (bool) - Mark instance as [EBS
Optimized](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSOptimized.html).
Expand Down
4 changes: 4 additions & 0 deletions .web-docs/components/builder/instance/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -579,6 +579,10 @@ JSON example:
-> 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.

Note that when using a spot instance, Packer doesn't stop the instance,
regardless of the value of this setting. Instead, it relies on the CreateImage
call to stop and restart the instance.

- `ebs_optimized` (bool) - Mark instance as [EBS
Optimized](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSOptimized.html).
Expand Down
4 changes: 4 additions & 0 deletions builder/common/run_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,10 @@ type RunConfig struct {
// -> 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.
//
// Note that when using a spot instance, Packer doesn't stop the instance,
// regardless of the value of this setting. Instead, it relies on the CreateImage
// call to stop and restart the instance.
DisableStopInstance bool `mapstructure:"disable_stop_instance" required:"false"`
// Mark instance as [EBS
// Optimized](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSOptimized.html).
Expand Down
1 change: 1 addition & 0 deletions builder/common/step_stop_ebs_instance.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ func (s *StepStopEBSBackedInstance) Run(ctx context.Context, state multistep.Sta

// Skip when it is a spot instance
if s.Skip {
ui.Say("Skipping instance stop, since this is a spot instance.")
return multistep.ActionContinue
}

Expand Down
4 changes: 4 additions & 0 deletions docs-partials/builder/common/RunConfig-not-required.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,10 @@
-> 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.

Note that when using a spot instance, Packer doesn't stop the instance,
regardless of the value of this setting. Instead, it relies on the CreateImage
call to stop and restart the instance.

- `ebs_optimized` (bool) - Mark instance as [EBS
Optimized](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSOptimized.html).
Expand Down