func NewTerragruntOptions(terragruntConfigPath string) (*TerragruntOptions, error) {
	logger := util.CreateLogger("")
	workingDir, downloadDir, err := DefaultWorkingAndDownloadDirs(terragruntConfigPath)
	if err != nil {
		return nil, errors.WithStackTrace(err)
	}
	return &TerragruntOptions{
		TerragruntConfigPath:        terragruntConfigPath,
		TerraformPath:               TERRAFORM_DEFAULT_PATH,
		TerraformCommand:            "",
		AutoInit:                    true,
		NonInteractive:              false,
		TerraformCliArgs:            []string{},
		WorkingDir:                  workingDir,
		Logger:                      logger,
		Env:                         map[string]string{},
		Source:                      "",
		SourceUpdate:                false,
		DownloadDir:                 downloadDir,
		IgnoreDependencyErrors:      false,
		IgnoreDependencyOrder:       false,
		IgnoreExternalDependencies:  false,
		IncludeExternalDependencies: false,
		Writer:                      os.Stdout,
		ErrWriter:                   os.Stderr,
		MaxFoldersToCheck:           DEFAULT_MAX_FOLDERS_TO_CHECK,
		AutoRetry:                   true,
		MaxRetryAttempts:            DEFAULT_MAX_RETRY_ATTEMPTS,
		Sleep:                       DEFAULT_SLEEP,
		RetryableErrors:             util.CloneStringList(RETRYABLE_ERRORS),
		ExcludeDirs:                 []string{},
		IncludeDirs:                 []string{},
		Check:                       false,
		RunTerragrunt: func(terragruntOptions *TerragruntOptions) error {
			return errors.WithStackTrace(RunTerragruntCommandNotSet)
		},
	}, nil
}
Create a new TerragruntOptions object with reasonable defaults for real usage
package options
import (
	"fmt"
	"io"
	"log"
	"os"
	"path/filepath"
	"time"
	"github.com/gruntwork-io/terragrunt/errors"
	"github.com/gruntwork-io/terragrunt/util"
	"github.com/hashicorp/go-version"
)
var TERRAFORM_COMMANDS_WITH_SUBCOMMAND = []string{
	"debug",
	"force-unlock",
	"state",
}
const DEFAULT_MAX_FOLDERS_TO_CHECK = 100
const TERRAFORM_DEFAULT_PATH = "terraform"
const TerragruntCacheDir = ".terragrunt-cache"
type TerragruntOptions struct {
	TerragruntConfigPath string
	TerraformPath string
	TerraformCommand string
	TerraformVersion *version.Version
	NonInteractive bool
	AutoInit bool
	TerraformCliArgs []string
	WorkingDir string
	Logger *log.Logger
	Env map[string]string
	Source string
	SourceUpdate bool
	DownloadDir string
	IamRole string
	IgnoreDependencyErrors bool
	IgnoreDependencyOrder bool
	IgnoreExternalDependencies bool
	IncludeExternalDependencies bool
	Writer io.Writer
	ErrWriter io.Writer
	MaxFoldersToCheck int
	AutoRetry bool
	MaxRetryAttempts int
	Sleep time.Duration
	RetryableErrors []string
	ExcludeDirs []string
	IncludeDirs []string
	Check bool
	RunTerragrunt func(*TerragruntOptions) error
}