Added aws shutdown_behavior to the changelog
This commit is contained in:
parent
f361e1d894
commit
ab9621ab7d
|
@ -15,6 +15,7 @@ IMPROVEMENTS:
|
|||
* builder/amazon: Added `disable_stop_instance` option to prevent automatic
|
||||
shutdown when the build is complete [GH-3352]
|
||||
* builder/amazon: Added `skip_region_validation` option to allow newer or custom AWS regions [GH-3598]
|
||||
* builder/amazon: Added `shutdown_behavior` option to support `stop` or `terminate` at the end of the build [GH-3556]
|
||||
* builder/azure: Now pre-validates `capture_container_name` and
|
||||
`capture_name_prefix` [GH-3537]
|
||||
* builder/azure: Support for custom images [GH-3575]
|
||||
|
|
|
@ -4,14 +4,16 @@ import (
|
|||
"errors"
|
||||
"fmt"
|
||||
"os"
|
||||
"time"
|
||||
"regexp"
|
||||
"time"
|
||||
|
||||
"github.com/mitchellh/packer/common/uuid"
|
||||
"github.com/mitchellh/packer/helper/communicator"
|
||||
"github.com/mitchellh/packer/template/interpolate"
|
||||
)
|
||||
|
||||
var reShutdownBehavior = regexp.MustCompile("^(stop|terminate)$")
|
||||
|
||||
// RunConfig contains configuration for running an instance from a source
|
||||
// AMI and details on how to access that launched image.
|
||||
type RunConfig struct {
|
||||
|
@ -86,7 +88,6 @@ func (c *RunConfig) Prepare(ctx *interpolate.Context) []error {
|
|||
}
|
||||
}
|
||||
|
||||
var reShutdownBehavior = regexp.MustCompile("(stop|terminate)")
|
||||
if c.InstanceInitiatedShutdownBehavior == "" {
|
||||
c.InstanceInitiatedShutdownBehavior = "stop"
|
||||
} else if !reShutdownBehavior.MatchString(c.InstanceInitiatedShutdownBehavior) {
|
||||
|
|
Loading…
Reference in New Issue