Merge pull request #8858 from hashicorp/fix_8791

update spot price docs
This commit is contained in:
Megan Marsh 2020-03-09 09:31:56 -07:00 committed by GitHub
commit 7873cabf63
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 30 additions and 14 deletions

View File

@ -265,13 +265,21 @@ type RunConfig struct {
// because a particular availability zone does not have capacity for the // because a particular availability zone does not have capacity for the
// specific instance_type requested in instance_type. // specific instance_type requested in instance_type.
SpotInstanceTypes []string `mapstructure:"spot_instance_types" required:"false"` SpotInstanceTypes []string `mapstructure:"spot_instance_types" required:"false"`
// The maximum hourly price to pay for a spot instance // With Spot Instances, you pay the Spot price that's in effect for the
// to create the AMI. Spot instances are a type of instance that EC2 starts // time period your instances are running. Spot Instance prices are set by
// when the current spot price is less than the maximum price you specify. // Amazon EC2 and adjust gradually based on long-term trends in supply and
// Spot price will be updated based on available spot instance capacity and // demand for Spot Instance capacity.
// 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 // When this field is set, it represents the maximum hourly price you are
// to "0" to use an on demand instance (default). // 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"` SpotPrice string `mapstructure:"spot_price" required:"false"`
// Required if spot_price is set to // Required if spot_price is set to
// auto. This tells Packer what sort of AMI you're launching to find the // auto. This tells Packer what sort of AMI you're launching to find the

View File

@ -175,13 +175,21 @@
because a particular availability zone does not have capacity for the because a particular availability zone does not have capacity for the
specific instance_type requested in instance_type. specific instance_type requested in instance_type.
- `spot_price` (string) - The maximum hourly price to pay for a spot instance - `spot_price` (string) - With Spot Instances, you pay the Spot price that's in effect for the
to create the AMI. Spot instances are a type of instance that EC2 starts time period your instances are running. Spot Instance prices are set by
when the current spot price is less than the maximum price you specify. Amazon EC2 and adjust gradually based on long-term trends in supply and
Spot price will be updated based on available spot instance capacity and demand for Spot Instance capacity.
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 When this field is set, it represents the maximum hourly price you are
to "0" to use an on demand instance (default). 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 - `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 auto. This tells Packer what sort of AMI you're launching to find the