Skip to content

Commit

Permalink
🐛 : fix stack loading for terraform 0.12
Browse files Browse the repository at this point in the history
also corrects a bug when a stack has no state
  • Loading branch information
juwit committed Jun 17, 2019
1 parent b77c5e9 commit b13f4b5
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/main/resources/templates/stack.html
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,12 @@ <h2><span><i class="fas fa-history"></i> Job history</span></h2>
return $.get(`/api/state/${stackId}`)
.then(data => {
// finding stack output
stack.outputs = data.modules[0].outputs;
stack.outputs = data.outputs;
})
.catch(e => {
// a 404 means that the stack is new
stack.outputs = {};
return Promise.resolve();
});
}

Expand Down

0 comments on commit b13f4b5

Please sign in to comment.