Skip to content

Commit

Permalink
ami_name is not required with skip_register_ami
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremy-asher committed Oct 21, 2016
1 parent 6983402 commit fad363d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion builder/amazon/common/ami_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,12 @@ type AMIConfig struct {

func (c *AMIConfig) Prepare(ctx *interpolate.Context) []error {
var errs []error
if c.AMIName == "" {
if c.AMIName == "" && !c.AMISkipRegister {
errs = append(errs, fmt.Errorf("ami_name must be specified"))
}

// TODO: confirm that bypassed options aren't supplied with skip_register_ami

if len(c.AMIRegions) > 0 {
regionSet := make(map[string]struct{})
regions := make([]string, 0, len(c.AMIRegions))
Expand Down

0 comments on commit fad363d

Please sign in to comment.