github.com/tilotech/tilores-cli@v0.28.0/internal/pkg/step/terraforminit.go (about)

     1  package step
     2  
     3  // TerraformInit creates a step that runs terraform init with the upgrade flag.
     4  func TerraformInit() error {
     5  	command := createCommand("terraform", "init", "-upgrade")
     6  	command.Env = append(command.Env, tfWorkspaceEnv("default"))
     7  	return runCommand("could not initialize terraform: %v", command)()
     8  }
     9  
    10  // TerraformInitFast creates a step that runs terraform init without the upgrade flag.
    11  func TerraformInitFast() error {
    12  	command := createCommand("terraform", "init")
    13  	command.Env = append(command.Env, tfWorkspaceEnv("default"))
    14  	return runCommand("could not initialize terraform: %v", command)()
    15  }