From 4133acbdf38636a779ee6bf3139fe7516b2eac53 Mon Sep 17 00:00:00 2001 From: Megan Marsh Date: Mon, 9 Mar 2020 08:46:30 -0700 Subject: [PATCH] update spot price docs --- builder/amazon/common/run_config.go | 22 +++++++++++++------ .../common/_RunConfig-not-required.html.md | 22 +++++++++++++------ 2 files changed, 30 insertions(+), 14 deletions(-) diff --git a/builder/amazon/common/run_config.go b/builder/amazon/common/run_config.go index ec637ef4a..57c86a8c5 100644 --- a/builder/amazon/common/run_config.go +++ b/builder/amazon/common/run_config.go @@ -265,13 +265,21 @@ type RunConfig struct { // because a particular availability zone does not have capacity for the // specific instance_type requested in instance_type. SpotInstanceTypes []string `mapstructure:"spot_instance_types" required:"false"` - // The maximum hourly price to pay for a spot instance - // to create the AMI. Spot instances are a type of instance that EC2 starts - // when the current spot price is less than the maximum price you specify. - // Spot price will be updated based on available spot instance capacity and - // current spot instance requests. It may save you some costs. You can set - // this to auto for Packer to automatically discover the best spot price or - // to "0" to use an on demand instance (default). + // With Spot Instances, you pay the Spot price that's in effect for the + // time period your instances are running. Spot Instance prices are set by + // Amazon EC2 and adjust gradually based on long-term trends in supply and + // demand for Spot Instance capacity. + // + // When this field is set, it represents the maximum hourly price you are + // willing to pay for a spot instance. If you do not set this value, it + // defaults to a maximum price equal to the on demand price of the + // instance. In the situation where the current Amazon-set spot price + // exceeds the value set in this field, Packer will not launch an instance + // and the build will error. In the situation where the Amazon-set spot + // price is less than the value set in this field, Packer will launch and + // you will pay the Amazon-set spot price, not this maximum value. + // For more information, see the Amazon docs on + // [spot pricing](https://aws.amazon.com/ec2/spot/pricing/). SpotPrice string `mapstructure:"spot_price" required:"false"` // Required if spot_price is set to // auto. This tells Packer what sort of AMI you're launching to find the diff --git a/website/source/partials/builder/amazon/common/_RunConfig-not-required.html.md b/website/source/partials/builder/amazon/common/_RunConfig-not-required.html.md index b2f46681b..19e6f5ac2 100644 --- a/website/source/partials/builder/amazon/common/_RunConfig-not-required.html.md +++ b/website/source/partials/builder/amazon/common/_RunConfig-not-required.html.md @@ -175,13 +175,21 @@ because a particular availability zone does not have capacity for the specific instance_type requested in instance_type. -- `spot_price` (string) - The maximum hourly price to pay for a spot instance - to create the AMI. Spot instances are a type of instance that EC2 starts - when the current spot price is less than the maximum price you specify. - Spot price will be updated based on available spot instance capacity and - current spot instance requests. It may save you some costs. You can set - this to auto for Packer to automatically discover the best spot price or - to "0" to use an on demand instance (default). +- `spot_price` (string) - With Spot Instances, you pay the Spot price that's in effect for the + time period your instances are running. Spot Instance prices are set by + Amazon EC2 and adjust gradually based on long-term trends in supply and + demand for Spot Instance capacity. + + When this field is set, it represents the maximum hourly price you are + willing to pay for a spot instance. If you do not set this value, it + defaults to a maximum price equal to the on demand price of the + instance. In the situation where the current Amazon-set spot price + exceeds the value set in this field, Packer will not launch an instance + and the build will error. In the situation where the Amazon-set spot + price is less than the value set in this field, Packer will launch and + you will pay the Amazon-set spot price, not this maximum value. + For more information, see the Amazon docs on + [spot pricing](https://aws.amazon.com/ec2/spot/pricing/). - `spot_price_auto_product` (string) - Required if spot_price is set to auto. This tells Packer what sort of AMI you're launching to find the