Skip to content

Commit

Permalink
update deli-cli for instance user data
Browse files Browse the repository at this point in the history
  • Loading branch information
rmb938 committed Jan 27, 2018
1 parent 9f4992f commit 144b30c
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 12 deletions.
13 changes: 7 additions & 6 deletions glide.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion glide.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ import:
- package: github.com/mitchellh/multistep
version: 391576a156a54cfbb4cf5d5eda40cf6ffa3e3a4d
- package: github.com/sandwichcloud/deli-cli
version: 0.0.16
version: 0.0.23
6 changes: 1 addition & 5 deletions sandwich/step_run_instance.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,11 @@ func (s *StepRunInstance) Run(state multistep.StateBag) multistep.StepAction {
keyPairIDs = append(keyPairIDs, keyPairID.(string))
}

if s.UserData != "" {
s.Tags["user-data"] = s.UserData
}

if s.Tags == nil {
s.Tags = make(map[string]string)
}

instance, err := instanceClient.Create(s.Name, s.SourceImageID, config.RegionID, "", s.NetworkID, "", s.FlavorID, s.Disk, keyPairIDs, s.Tags)
instance, err := instanceClient.Create(s.Name, s.SourceImageID, config.RegionID, "", s.NetworkID, "", s.FlavorID, s.Disk, keyPairIDs, s.Tags, s.UserData)
if err != nil {
err := fmt.Errorf("Error creating source instance: %s", err)
state.Put("error", err)
Expand Down

0 comments on commit 144b30c

Please sign in to comment.