|
|
|
|
@ -77,10 +77,6 @@ func (c *RunConfig) Prepare(ctx *interpolate.Context) []error {
|
|
|
|
|
c.RunTags = make(map[string]string)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if c.SpotTags == nil {
|
|
|
|
|
c.SpotTags = make(map[string]string)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Validation
|
|
|
|
|
errs := c.Comm.Prepare(ctx)
|
|
|
|
|
|
|
|
|
|
@ -123,6 +119,13 @@ func (c *RunConfig) Prepare(ctx *interpolate.Context) []error {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if c.SpotTags != nil {
|
|
|
|
|
if c.SpotPrice == "" || c.SpotPrice == "0" {
|
|
|
|
|
errs = append(errs, fmt.Errorf(
|
|
|
|
|
"spot_tags should not be set when not requesting a spot instance"))
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if c.UserData != "" && c.UserDataFile != "" {
|
|
|
|
|
errs = append(errs, fmt.Errorf("Only one of user_data or user_data_file can be specified."))
|
|
|
|
|
} else if c.UserDataFile != "" {
|
|
|
|
|
|