Adding in droplet tags on creation
This commit is contained in:
parent
07cafb80ec
commit
7081fe990b
|
@ -35,6 +35,7 @@ type Config struct {
|
|||
DropletName string `mapstructure:"droplet_name"`
|
||||
UserData string `mapstructure:"user_data"`
|
||||
UserDataFile string `mapstructure:"user_data_file"`
|
||||
RunTags []string `mapstructure:"run_tags"`
|
||||
|
||||
ctx interpolate.Context
|
||||
}
|
||||
|
@ -121,6 +122,10 @@ func NewConfig(raws ...interface{}) (*Config, []string, error) {
|
|||
}
|
||||
}
|
||||
|
||||
if c.RunTags == nil {
|
||||
c.RunTags = make([]string, 0)
|
||||
}
|
||||
|
||||
if errs != nil && len(errs.Errors) > 0 {
|
||||
return nil, nil, errs
|
||||
}
|
||||
|
|
|
@ -49,6 +49,7 @@ func (s *stepCreateDroplet) Run(_ context.Context, state multistep.StateBag) mul
|
|||
Monitoring: c.Monitoring,
|
||||
IPv6: c.IPv6,
|
||||
UserData: userData,
|
||||
Tags: c.RunTags,
|
||||
})
|
||||
if err != nil {
|
||||
err := fmt.Errorf("Error creating droplet: %s", err)
|
||||
|
|
Loading…
Reference in New Issue