 
       reactor.dispatch actions.CREATE_STACK_TEMPLATE_SUCCESS, { stackTemplate }
       resolve { stackTemplate }
+
+
+createStackTemplateWithDefaults = (overrides = {}) ->
+
+  if overrides.template
+    template = overrides.template
+    rawContent = jsonToYaml(template).content
+  else
+    { template, rawContent } = stackDefaults
+
+  requiredProviders = providersParser template
+
+  if overrides.selectedProvider is 'vagrant'
+    requiredProviders.push 'vagrant'
+
+  requiredData = requirementsParser template
+
+  options = _.assign {}, stackDefaults,
+    template: template
+    rawContent: rawContent
+    config: { requiredData, requiredProviders }
+
+  return createStackTemplate(options)
 
 
 updateStackTemplate = (stackTemplate, options) ->

whoami                  = require 'app/util/whoami'
environmentDataProvider = require 'app/userenvironmentdataprovider'


_eventsCache =
  machine    : {}

  setMachineAlwaysOn
  setMachinePowerStatus
  createStackTemplate
  createStackTemplateWithDefaults
  updateStackTemplate
  generateStack
  deleteStack
