spot_price of "0" to mean on demand
this helps avoid duplicating packer templates just to select spot instances or not
This commit is contained in:
parent
2411c779d1
commit
da771c469e
|
@ -135,7 +135,7 @@ func (s *StepRunSourceInstance) Run(state multistep.StateBag) multistep.StepActi
|
|||
|
||||
var instanceId string
|
||||
|
||||
if spotPrice == "" {
|
||||
if spotPrice == "" || spotPrice == "0" {
|
||||
runOpts := &ec2.RunInstancesInput{
|
||||
KeyName: &keyName,
|
||||
ImageId: &s.SourceAMI,
|
||||
|
|
|
@ -150,7 +150,8 @@ builder.
|
|||
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.
|
||||
"auto" for Packer to automatically discover the best spot price or to "0"
|
||||
to use an on demand instance (default).
|
||||
|
||||
- `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
|
||||
|
|
|
@ -191,7 +191,8 @@ builder.
|
|||
maximum price that you specify exceeds the current spot price. 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.
|
||||
for Packer to automatically discover the best spot price or to "0" to use
|
||||
an on demand instance (default).
|
||||
|
||||
- `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
|
||||
|
|
Loading…
Reference in New Issue