Skip to content

Commit

Permalink
Fix population of missing parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
aidansteele committed Dec 9, 2018
1 parent f8ed2f8 commit 8045e8e
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions pkg/stackit/up.go
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,14 @@ func (s *Stackit) Up(input StackitUpInput, events chan<- TailStackEvent) {
s.error(err, events)
}

if input.PopulateMissing && stack != nil {
err := s.populateMissing(&input)
if err != nil {
s.error(errors.Wrap(err, "populating missing parameters"), events)
return
}
}

token := generateToken()

createInput := &cloudformation.CreateChangeSetInput{
Expand All @@ -129,14 +137,6 @@ func (s *Stackit) Up(input StackitUpInput, events chan<- TailStackEvent) {

if stack != nil { // stack already exists
createInput.ChangeSetType = aws.String(cloudformation.ChangeSetTypeUpdate)

if input.PopulateMissing {
err := s.populateMissing(&input)
if err != nil {
s.error(errors.Wrap(err, "populating missing parameters"), events)
return
}
}
} else {
createInput.ChangeSetType = aws.String(cloudformation.ChangeSetTypeCreate)
}
Expand Down

0 comments on commit 8045e8e

Please sign in to comment.