Skip to content

Commit

Permalink
Uncomment init
Browse files Browse the repository at this point in the history
  • Loading branch information
bmonkman committed Dec 6, 2019
1 parent d3ba846 commit 9b04662
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions internal/generate/terraform/generate.go
Expand Up @@ -58,7 +58,6 @@ func GetOutputs(cfg *config.Commit0Config, pathPrefix string, outputs []string)

// Init sets up anything required by Execute
func Init(cfg *config.Commit0Config, pathPrefix string) {
// @TODO : Change this check. Most likely we should discover the accountid
if cfg.Infrastructure.AWS.AccountId != "" {
log.Println("Preparing aws environment...")

Expand All @@ -67,9 +66,9 @@ func Init(cfg *config.Commit0Config, pathPrefix string) {
pathPrefix = filepath.Join(pathPrefix, "terraform")

// @TODO : A check here would be nice to see if this stuff exists first, mostly for testing
// log.Println(aurora.Cyan(emoji.Sprintf(":alarm_clock: Initializing remote backend...")))
// util.ExecuteCommand(exec.Command("terraform", "init"), filepath.Join(pathPrefix, "bootstrap/remote-state"), envars)
// util.ExecuteCommand(exec.Command("terraform", "apply", "-auto-approve"), filepath.Join(pathPrefix, "bootstrap/remote-state"), envars)
log.Println(aurora.Cyan(emoji.Sprintf(":alarm_clock: Initializing remote backend...")))
util.ExecuteCommand(exec.Command("terraform", "init"), filepath.Join(pathPrefix, "bootstrap/remote-state"), envars)
util.ExecuteCommand(exec.Command("terraform", "apply", "-auto-approve"), filepath.Join(pathPrefix, "bootstrap/remote-state"), envars)

log.Println("Creating users...")
util.ExecuteCommand(exec.Command("terraform", "init"), filepath.Join(pathPrefix, "bootstrap/create-users"), envars)
Expand All @@ -80,7 +79,6 @@ func Init(cfg *config.Commit0Config, pathPrefix string) {

// Execute terrafrom init & plan. May modify the config passed in
func Execute(cfg *config.Commit0Config, pathPrefix string) {
// @TODO : Change this check. Most likely we should discover the accountid
if cfg.Infrastructure.AWS.AccountId != "" {
log.Println("Preparing aws environment...")

Expand Down

0 comments on commit 9b04662

Please sign in to comment.