Repository: gruntwork-io/terragrunt

Issue:
Support OpenTofu file extensions for some cli options
## Describe the enhancement

Currently only *.tf and *.tf.json extensions are supported for cli options like validate. This doesn't account for OpenTofu extensions *.tofu and *.tofu.json and will error saying no *.tf files were found. 

## Additional context

The reason is CheckFolderContainsTerraformCode in cli/commands/run/run.go isn't globbing *.tofu and *.tofu.json. 

## RFC Not Needed

- [X] I have evaluated the complexity of this enhancement, and I believe it does not require an RFC.



Hints from issue comments:
@yhakbar: This was resolved in #4062 

Solution patch:
diff --git a/.golangci.yml b/.golangci.yml
index 940178ee..ecf8bee4 100644
--- a/.golangci.yml
+++ b/.golangci.yml
@@ -30,10 +30,6 @@ linters-settings:
   goconst:
     min-len: 3
     min-occurrences: 5
-  revive:
-    min-confidence: 0.8
-  unused:
-    check-exported: false
   unparam:
     check-exported: false
   nakedret:
@@ -48,6 +44,9 @@ linters-settings:
       - performance
     disabled-tags:
       - experimental
+  govet:
+    enable:
+      - fieldalignment
 
 linters:
   enable:
@@ -82,8 +81,6 @@ linters:
     - recvcheck # In the latest version of golangci-lint this https://github.com/raeperd/recvcheck/issues/7 issue is not fixed yet.
 
   fast: false
-  mnd:
-    ignored-functions: strconv.Format*,os.*,strconv.Parse*,strings.SplitN,bytes.SplitN
   presets:
     - bugs
     - performance
@@ -93,6 +90,7 @@ linters:
     # - style
     # - complexity
 
+
 issues:
   exclude-dirs:
     - docs
diff --git a/.strict.golangci.yml b/.strict.golangci.yml
index b4ab1e72..137f2959 100644
--- a/.strict.golangci.yml
+++ b/.strict.golangci.yml
@@ -53,6 +53,9 @@ linters-settings:
       - performance
     disabled-tags:
       - experimental
+  govet:
+    enable:
+      - fieldalignment
 
 linters:
   enable:
diff --git a/awshelper/config.go b/awshelper/config.go
index ae7f91b2..44e83bb5 100644
--- a/awshelper/config.go
+++ b/awshelper/config.go
@@ -24,17 +24,17 @@ import (
 
 // AwsSessionConfig is a representation of the configuration options for an AWS Session
 type AwsSessionConfig struct {
+	Tags                    map[string]string
 	Region                  string
 	CustomS3Endpoint        string
 	CustomDynamoDBEndpoint  string
 	Profile                 string
 	RoleArn                 string
 	CredsFilename           string
-	S3ForcePathStyle        bool
-	DisableComputeChecksums bool
 	ExternalID              string
 	SessionName             string
-	Tags                    map[string]string
+	S3ForcePathStyle        bool
+	DisableComputeChecksums bool
 }
 
 // addUserAgent - Add terragrunt version to the user agent for AWS API calls.
diff --git a/awshelper/policy.go b/awshelper/policy.go
index 2f133552..a11ca606 100644
--- a/awshelper/policy.go
+++ b/awshelper/policy.go
@@ -13,13 +13,13 @@ type Policy struct {
 // https://docs.aws.amazon.com/IAM//latest/UserGuide/reference_policies_elements_action.html
 // https://docs.aws.amazon.com/IAM//latest/UserGuide/reference_policies_elements_resource.html
 type Statement struct {
-	Sid          string          `json:"Sid"`
-	Effect       string          `json:"Effect"`
 	Principal    any             `json:"Principal,omitempty"`
 	NotPrincipal any             `json:"NotPrincipal,omitempty"`
 	Action       any             `json:"Action"`
 	Resource     any             `json:"Resource"`
 	Condition    *map[string]any `json:"Condition,omitempty"`
+	Sid          string          `json:"Sid"`
+	Effect       string          `json:"Effect"`
 }
 
 func UnmarshalPolicy(policy string) (Policy, error) {
diff --git a/cli/commands/aws-provider-patch/errors.go b/cli/commands/aws-provider-patch/errors.go
index 8204c001..ffcdbe4f 100644
--- a/cli/commands/aws-provider-patch/errors.go
+++ b/cli/commands/aws-provider-patch/errors.go
@@ -9,8 +9,8 @@ func (flagName MissingOverrideAttrError) Error() string {
 }
 
 type TypeInferenceError struct {
-	value         string
 	underlyingErr error
+	value         string
 }
 
 func (err TypeInferenceError) Error() string {
@@ -19,8 +19,8 @@ func (err TypeInferenceError) Error() string {
 }
 
 type MalformedJSONValError struct {
-	value         string
 	underlyingErr error
+	value         string
 }
 
 func (err MalformedJSONValError) Error() string {
diff --git a/cli/commands/catalog/module/doc.go b/cli/commands/catalog/module/doc.go
index 5e1ec4ee..37a4f67c 100644
--- a/cli/commands/catalog/module/doc.go
+++ b/cli/commands/catalog/module/doc.go
@@ -45,15 +45,13 @@ func (regs DocRegs) Replace(str string) string {
 }
 
 type Doc struct {
-	rawContent string
-	fileExt    string
-
-	tagCache     map[docDataKey]string
-	tagRegs      map[docTagName]*regexp.Regexp
-	tagStripRegs DocRegs
-
+	tagCache         map[docDataKey]string
+	tagRegs          map[docTagName]*regexp.Regexp
 	frontmatterCache map[docDataKey]string
 	frontmatterReg   *regexp.Regexp
+	rawContent       string
+	fileExt          string
+	tagStripRegs     DocRegs
 }
 
 func NewDoc(rawContent, fileExt string) *Doc {
diff --git a/cli/commands/catalog/module/repo.go b/cli/commands/catalog/module/repo.go
index c3b5e4f9..b40b245f 100644
--- a/cli/commands/catalog/module/repo.go
+++ b/cli/commands/catalog/module/repo.go
@@ -170,10 +170,10 @@ func (repo *Repo) ModuleURL(moduleDir string) (string, error) {
 }
 
 type CloneOptions struct {
-	SourceURL  string
-	TargetPath string
 	Context    context.Context
 	Logger     log.Logger
+	SourceURL  string
+	TargetPath string
 }
 
 func (repo *Repo) clone(ctx context.Context, l log.Logger) error {
diff --git a/cli/commands/catalog/tui/components/buttonbar/buttonbar.go b/cli/commands/catalog/tui/components/buttonbar/buttonbar.go
index 90389166..fb1d4415 100644
--- a/cli/commands/catalog/tui/components/buttonbar/buttonbar.go
+++ b/cli/commands/catalog/tui/components/buttonbar/buttonbar.go
@@ -27,12 +27,12 @@ var (
 
 // ButtonBar is bubbletea component that displays an inline list of buttons.
 type ButtonBar struct {
-	buttons        []string
-	activeButton   int
-	nameFmt        string
 	SeparatorStyle lipgloss.Style
 	FocusedStyle   lipgloss.Style
 	BlurredStyle   lipgloss.Style
+	nameFmt        string
+	buttons        []string
+	activeButton   int
 }
 
 // New creates a new ButtonBar component.
diff --git a/cli/commands/catalog/tui/model.go b/cli/commands/catalog/tui/model.go
index c03830a4..a88ea655 100644
--- a/cli/commands/catalog/tui/model.go
+++ b/cli/commands/catalog/tui/model.go
@@ -44,26 +44,20 @@ func (b button) String() string {
 }
 
 type model struct {
-	// globals
-	state  sessionState
-	width  int
-	height int
-
-	// list view
-	list         list.Model
-	listKeys     list.KeyMap
-	delegateKeys *delegateKeyMap
-
-	// pager view
-	ready           bool
-	viewport        viewport.Model
-	buttonBar       *buttonbar.ButtonBar
-	activeButton    button
-	releaseNotesURL string
-	pagerKeys       pagerKeyMap
-	selectedModule  *module.Module
-
+	list              list.Model
 	terragruntOptions *options.TerragruntOptions
+	selectedModule    *module.Module
+	delegateKeys      *delegateKeyMap
+	buttonBar         *buttonbar.ButtonBar
+	releaseNotesURL   string
+	pagerKeys         pagerKeyMap
+	viewport          viewport.Model
+	listKeys          list.KeyMap
+	activeButton      button
+	state             sessionState
+	height            int
+	width             int
+	ready             bool
 }
 
 func newModel(modules module.Modules, opts *options.TerragruntOptions) model {
diff --git a/cli/commands/find/options.go b/cli/commands/find/options.go
index f7e7038a..02f935bc 100644
--- a/cli/commands/find/options.go
+++ b/cli/commands/find/options.go
@@ -31,24 +31,23 @@ type Options struct {
 	// Format determines the format of the output.
 	Format string
 
-	// JSON determines whether to output in JSON format.
+	// Mode determines the mode of the find command.
+	Mode string
+
+	// JSON determines if the output should be in JSON format.
 	// Alias for --format=json.
 	JSON bool
 
-	// DAG determines whether to sort output in DAG order.
-	// Alias for --sort=dag.
+	// DAG determines if the output should be in DAG mode.
 	DAG bool
 
-	// Mode determines the mode of the find command.
-	Mode string
-
-	// Hidden determines whether to detect hidden directories.
+	// Hidden determines if hidden configurations should be included in the output.
 	Hidden bool
 
-	// Dependencies determines whether to include dependencies in the output.
+	// Dependencies determines if dependencies should be included in the output.
 	Dependencies bool
 
-	// External determines whether to include external dependencies in the output.
+	// External determines if external dependencies should be included in the output.
 	External bool
 }
 
diff --git a/cli/commands/list/list.go b/cli/commands/list/list.go
index 67c75ff5..b99c3bbc 100644
--- a/cli/commands/list/list.go
+++ b/cli/commands/list/list.go
@@ -394,10 +394,10 @@ func outputTree(opts *Options, configs ListedConfigs, sort string) error {
 }
 
 type TreeStyler struct {
-	shouldColor bool
 	entryStyle  lipgloss.Style
 	rootStyle   lipgloss.Style
 	colorizer   *Colorizer
+	shouldColor bool
 }
 
 func NewTreeStyler(shouldColor bool) *TreeStyler {
diff --git a/cli/commands/run/creds/providers/externalcmd/provider.go b/cli/commands/run/creds/providers/externalcmd/provider.go
index 45fd12c8..5c0b63e2 100644
--- a/cli/commands/run/creds/providers/externalcmd/provider.go
+++ b/cli/commands/run/creds/providers/externalcmd/provider.go
@@ -102,8 +102,8 @@ type AWSCredentials struct {
 type AWSRole struct {
 	RoleARN          string `json:"roleARN"`
 	RoleSessionName  string `json:"roleSessionName"`
-	Duration         int64  `json:"duration"`
 	WebIdentityToken string `json:"webIdentityToken"`
+	Duration         int64  `json:"duration"`
 }
 
 func (role *AWSRole) Envs(ctx context.Context, opts *options.TerragruntOptions) map[string]string {
diff --git a/cli/commands/run/creds/providers/provider.go b/cli/commands/run/creds/providers/provider.go
index a9ad7f97..ddbc78a6 100644
--- a/cli/commands/run/creds/providers/provider.go
+++ b/cli/commands/run/creds/providers/provider.go
@@ -12,8 +12,8 @@ const (
 type CredentialsName string
 
 type Credentials struct {
-	Name CredentialsName
 	Envs map[string]string
+	Name CredentialsName
 }
 
 type Provider interface {
diff --git a/cli/commands/run/errors.go b/cli/commands/run/errors.go
index 5b39adba..ef0a5ee0 100644
--- a/cli/commands/run/errors.go
+++ b/cli/commands/run/errors.go
@@ -39,7 +39,7 @@ func (err BackendNotDefined) Error() string {
 type NoTerraformFilesFound string
 
 func (path NoTerraformFilesFound) Error() string {
-	return "Did not find any Terraform files (*.tf) in " + string(path)
+	return "Did not find any Terraform files (*.tf) or OpenTofu files (*.tofu) in " + string(path)
 }
 
 type ModuleIsProtected struct {
diff --git a/cli/commands/run/file_copy_getter.go b/cli/commands/run/file_copy_getter.go
index 458d34d5..7d1e1e4b 100644
--- a/cli/commands/run/file_copy_getter.go
+++ b/cli/commands/run/file_copy_getter.go
@@ -17,14 +17,13 @@ const SourceManifestName = ".terragrunt-source-manifest"
 // faster and use less disk space, but they cause issues in Windows and with infinite loops, so we copy files/folders
 // instead.
 type FileCopyGetter struct {
+	Logger log.Logger
 	getter.FileGetter
 
 	// List of glob paths that should be included in the copy. This can be used to override the default behavior of
 	// Terragrunt, which will skip hidden folders.
 	IncludeInCopy   []string
 	ExcludeFromCopy []string
-
-	Logger log.Logger
 }
 
 // Get replaces the original FileGetter
diff --git a/cli/commands/run/run.go b/cli/commands/run/run.go
index 48d99dde..8b02288b 100644
--- a/cli/commands/run/run.go
+++ b/cli/commands/run/run.go
@@ -540,6 +540,13 @@ func CheckFolderContainsTerraformCode(terragruntOptions *options.TerragruntOptio
 
 	files = append(files, hclFiles...)
 
+	tofuHclFiles, err := zglob.Glob(terragruntOptions.WorkingDir + "/**/*.tofu")
+	if err != nil {
+		return errors.New(err)
+	}
+
+	files = append(files, tofuHclFiles...)
+
 	jsonFiles, err := zglob.Glob(terragruntOptions.WorkingDir + "/**/*.tf.json")
 	if err != nil {
 		return errors.New(err)
@@ -547,6 +554,13 @@ func CheckFolderContainsTerraformCode(terragruntOptions *options.TerragruntOptio
 
 	files = append(files, jsonFiles...)
 
+	tofuJSONFiles, err := zglob.Glob(terragruntOptions.WorkingDir + "/**/*.tofu.json")
+	if err != nil {
+		return errors.New(err)
+	}
+
+	files = append(files, tofuJSONFiles...)
+
 	if len(files) == 0 {
 		return errors.New(NoTerraformFilesFound(terragruntOptions.WorkingDir))
 	}
diff --git a/cli/commands/run/target.go b/cli/commands/run/target.go
index edcbe972..6d006d63 100644
--- a/cli/commands/run/target.go
+++ b/cli/commands/run/target.go
@@ -58,9 +58,9 @@ type TargetErrorCallbackType func(opts *options.TerragruntOptions, config *confi
 */
 
 type Target struct {
-	point             TargetPointType
 	callbackFunc      TargetCallbackType
 	errorCallbackFunc TargetErrorCallbackType
+	point             TargetPointType
 }
 
 func NewTarget(point TargetPointType, callbackFunc TargetCallbackType) *Target {
diff --git a/cli/commands/run/test-fixtures/dir-with-terraform-and-tofu-json/main.tf.json b/cli/commands/run/test-fixtures/dir-with-terraform-and-tofu-json/main.tf.json
new file mode 100644
index 00000000..e69de29b
diff --git a/cli/commands/run/test-fixtures/dir-with-terraform-and-tofu-json/main.tofu.json b/cli/commands/run/test-fixtures/dir-with-terraform-and-tofu-json/main.tofu.json
new file mode 100644
index 00000000..e69de29b
diff --git a/cli/commands/run/test-fixtures/dir-with-terraform-and-tofu/main.tf b/cli/commands/run/test-fixtures/dir-with-terraform-and-tofu/main.tf
new file mode 100644
index 00000000..e69de29b
diff --git a/cli/commands/run/test-fixtures/dir-with-terraform-and-tofu/main.tofu b/cli/commands/run/test-fixtures/dir-with-terraform-and-tofu/main.tofu
new file mode 100644
index 00000000..e69de29b
diff --git a/cli/commands/run/test-fixtures/dir-with-tofu-json/main.tofu.json b/cli/commands/run/test-fixtures/dir-with-tofu-json/main.tofu.json
new file mode 100644
index 00000000..e69de29b
diff --git a/cli/commands/run/test-fixtures/dir-with-tofu/main.tofu b/cli/commands/run/test-fixtures/dir-with-tofu/main.tofu
new file mode 100644
index 00000000..e69de29b
diff --git a/cli/flags/deprecated_flag.go b/cli/flags/deprecated_flag.go
index e58486da..7a1d4dac 100644
--- a/cli/flags/deprecated_flag.go
+++ b/cli/flags/deprecated_flag.go
@@ -17,12 +17,11 @@ type DeprecatedFlags []*DeprecatedFlag
 // DeprecatedFlag represents a deprecated flag that is not shown in the CLI help, but its names, envVars, are registered.
 type DeprecatedFlag struct {
 	cli.Flag
-	controls strict.Controls
-
-	allowedSubcommandScope bool
+	newValueFn             NewValueFunc
+	controls               strict.Controls
 	names                  []string
 	envVars                []string
-	newValueFn             NewValueFunc
+	allowedSubcommandScope bool
 }
 
 // GetHidden implements `cli.Flag` interface.
diff --git a/codegen/generate.go b/codegen/generate.go
index 36780a46..947520cd 100644
--- a/codegen/generate.go
+++ b/codegen/generate.go
@@ -77,16 +77,16 @@ const (
 
 // GenerateConfig is configuration for generating code
 type GenerateConfig struct {
+	HclFmt           *bool  `cty:"hcl_fmt"`
 	Path             string `cty:"path"`
-	IfExists         GenerateConfigExists
 	IfExistsStr      string `cty:"if_exists"`
-	IfDisabled       GenerateConfigDisabled
 	IfDisabledStr    string `cty:"if_disabled"`
 	CommentPrefix    string `cty:"comment_prefix"`
 	Contents         string `cty:"contents"`
-	DisableSignature bool   `cty:"disable_signature"`
-	Disable          bool   `cty:"disable"`
-	HclFmt           *bool  `cty:"hcl_fmt"`
+	IfExists         GenerateConfigExists
+	IfDisabled       GenerateConfigDisabled
+	DisableSignature bool `cty:"disable_signature"`
+	Disable          bool `cty:"disable"`
 }
 
 // WriteToFile will generate a new file at the given target path with the given contents. If a file already exists at
diff --git a/config/config.go b/config/config.go
index 7096c295..30f5fa44 100644
--- a/config/config.go
+++ b/config/config.go
@@ -115,44 +115,44 @@ type DecodedBaseBlocks struct {
 // TerragruntConfig represents a parsed and expanded configuration
 // NOTE: if any attributes are added, make sure to update terragruntConfigAsCty in config_as_cty.go
 type TerragruntConfig struct {
-	Catalog                     *CatalogConfig
-	Terraform                   *TerraformConfig
-	TerraformBinary             string
-	TerraformVersionConstraint  string
-	TerragruntVersionConstraint string
+	Engine           *EngineConfig
+	RetryMaxAttempts *int
+
+	// Map to store fields metadata
+	FieldsMetadata map[string]map[string]any
+
+	// Map of processed includes
+	ProcessedIncludes           IncludeConfigsMap
+	Errors                      *ErrorsConfig
 	RemoteState                 *remote.RemoteState
 	Dependencies                *ModuleDependencies
-	DownloadDir                 string
+	Exclude                     *ExcludeConfig
 	PreventDestroy              *bool
 	Skip                        *bool
-	IamRole                     string
+	Catalog                     *CatalogConfig
 	IamAssumeRoleDuration       *int64
-	IamAssumeRoleSessionName    string
-	IamWebIdentityToken         string
-	Inputs                      map[string]any
+	RetrySleepIntervalSec       *int
 	Locals                      map[string]any
-	TerragruntDependencies      Dependencies
+	Terraform                   *TerraformConfig
 	GenerateConfigs             map[string]codegen.GenerateConfig
+	Inputs                      map[string]any
+	IamWebIdentityToken         string
+	IamAssumeRoleSessionName    string
+	IamRole                     string
+	DownloadDir                 string
+	TerragruntVersionConstraint string
+	TerraformVersionConstraint  string
+	TerraformBinary             string
+	TerragruntDependencies      Dependencies
 	RetryableErrors             []string
-	RetryMaxAttempts            *int
-	RetrySleepIntervalSec       *int
-	Engine                      *EngineConfig
 	FeatureFlags                FeatureFlags
-	Exclude                     *ExcludeConfig
-	Errors                      *ErrorsConfig
+
+	// List of dependent modules
+	DependentModulesPath []*string
 
 	// Fields used for internal tracking
 	// Indicates whether this is the result of a partial evaluation
 	IsPartial bool
-
-	// Map of processed includes
-	ProcessedIncludes IncludeConfigsMap
-
-	// Map to store fields metadata
-	FieldsMetadata map[string]map[string]any
-
-	// List of dependent modules
-	DependentModulesPath []*string
 }
 
 func (cfg *TerragruntConfig) String() string {
@@ -252,18 +252,18 @@ type terragruntLocal struct {
 }
 
 type terragruntIncludeIgnore struct {
-	Name   string   `hcl:"name,label"`
 	Remain hcl.Body `hcl:",remain"`
+	Name   string   `hcl:"name,label"`
 }
 
 // Configuration for Terraform remote state as parsed from a terragrunt.hcl config file
 type remoteStateConfigFile struct {
-	Backend                       string                     `hcl:"backend,attr"`
+	Config                        cty.Value                  `hcl:"config,attr"`
 	DisableInit                   *bool                      `hcl:"disable_init,attr"`
 	DisableDependencyOptimization *bool                      `hcl:"disable_dependency_optimization,attr"`
 	Generate                      *remoteStateConfigGenerate `hcl:"generate,attr"`
-	Config                        cty.Value                  `hcl:"config,attr"`
 	Encryption                    *cty.Value                 `hcl:"encryption,attr"`
+	Backend                       string                     `hcl:"backend,attr"`
 }
 
 func (remoteState *remoteStateConfigFile) String() string {
@@ -327,14 +327,14 @@ type remoteStateConfigGenerate struct {
 // Struct used to parse generate blocks. This will later be converted to GenerateConfig structs so that we can go
 // through the codegen routine.
 type terragruntGenerateBlock struct {
-	Name             string  `hcl:",label" mapstructure:",omitempty"`
-	Path             string  `hcl:"path,attr" mapstructure:"path"`
-	IfExists         string  `hcl:"if_exists,attr" mapstructure:"if_exists"`
 	IfDisabled       *string `hcl:"if_disabled,attr" mapstructure:"if_disabled"`
 	CommentPrefix    *string `hcl:"comment_prefix,attr" mapstructure:"comment_prefix"`
-	Contents         string  `hcl:"contents,attr" mapstructure:"contents"`
 	DisableSignature *bool   `hcl:"disable_signature,attr" mapstructure:"disable_signature"`
 	Disable          *bool   `hcl:"disable,attr" mapstructure:"disable"`
+	Name             string  `hcl:",label" mapstructure:",omitempty"`
+	Path             string  `hcl:"path,attr" mapstructure:"path"`
+	IfExists         string  `hcl:"if_exists,attr" mapstructure:"if_exists"`
+	Contents         string  `hcl:"contents,attr" mapstructure:"contents"`
 }
 
 type IncludeConfigsMap map[string]IncludeConfig
@@ -355,10 +355,10 @@ type IncludeConfigs []IncludeConfig
 // IncludeConfig represents the configuration settings for a parent Terragrunt configuration file that you can
 // include into a child Terragrunt configuration file. You can have more than one include config.
 type IncludeConfig struct {
-	Name          string  `hcl:"name,label"`
-	Path          string  `hcl:"path,attr"`
 	Expose        *bool   `hcl:"expose,attr"`
 	MergeStrategy *string `hcl:"merge_strategy,attr"`
+	Name          string  `hcl:"name,label"`
+	Path          string  `hcl:"path,attr"`
 }
 
 func (include *IncludeConfig) String() string {
@@ -441,22 +441,22 @@ func (deps *ModuleDependencies) String() string {
 
 // Hook specifies terraform commands (apply/plan) and array of os commands to execute
 type Hook struct {
-	Name           string   `hcl:"name,label" cty:"name"`
 	If             *bool    `hcl:"if,attr" cty:"if"`
-	Commands       []string `hcl:"commands,attr" cty:"commands"`
-	Execute        []string `hcl:"execute,attr" cty:"execute"`
 	RunOnError     *bool    `hcl:"run_on_error,attr" cty:"run_on_error"`
 	SuppressStdout *bool    `hcl:"suppress_stdout,attr" cty:"suppress_stdout"`
 	WorkingDir     *string  `hcl:"working_dir,attr" cty:"working_dir"`
+	Name           string   `hcl:"name,label" cty:"name"`
+	Commands       []string `hcl:"commands,attr" cty:"commands"`
+	Execute        []string `hcl:"execute,attr" cty:"execute"`
 }
 
 type ErrorHook struct {
+	SuppressStdout *bool    `hcl:"suppress_stdout,attr" cty:"suppress_stdout"`
+	WorkingDir     *string  `hcl:"working_dir,attr" cty:"working_dir"`
 	Name           string   `hcl:"name,label" cty:"name"`
 	Commands       []string `hcl:"commands,attr" cty:"commands"`
 	Execute        []string `hcl:"execute,attr" cty:"execute"`
 	OnErrors       []string `hcl:"on_errors,attr" cty:"on_errors"`
-	SuppressStdout *bool    `hcl:"suppress_stdout,attr" cty:"suppress_stdout"`
-	WorkingDir     *string  `hcl:"working_dir,attr" cty:"working_dir"`
 }
 
 func (conf *Hook) String() string {
@@ -471,18 +471,18 @@ func (conf *ErrorHook) String() string {
 // NOTE: If any attributes or blocks are added here, be sure to add it to ctyTerraformConfig in config_as_cty.go as
 // well.
 type TerraformConfig struct {
-	ExtraArgs   []TerraformExtraArguments `hcl:"extra_arguments,block"`
-	Source      *string                   `hcl:"source,attr"`
-	BeforeHooks []Hook                    `hcl:"before_hook,block"`
-	AfterHooks  []Hook                    `hcl:"after_hook,block"`
-	ErrorHooks  []ErrorHook               `hcl:"error_hook,block"`
+	Source *string `hcl:"source,attr"`
 
 	// Ideally we can avoid the pointer to list slice, but if it is not a pointer, Terraform requires the attribute to
 	// be defined and we want to make this optional.
 	IncludeInCopy   *[]string `hcl:"include_in_copy,attr"`
 	ExcludeFromCopy *[]string `hcl:"exclude_from_copy,attr"`
 
-	CopyTerraformLockFile *bool `hcl:"copy_terraform_lock_file,attr"`
+	CopyTerraformLockFile *bool                     `hcl:"copy_terraform_lock_file,attr"`
+	ExtraArgs             []TerraformExtraArguments `hcl:"extra_arguments,block"`
+	BeforeHooks           []Hook                    `hcl:"before_hook,block"`
+	AfterHooks            []Hook                    `hcl:"after_hook,block"`
+	ErrorHooks            []ErrorHook               `hcl:"error_hook,block"`
 }
 
 func (cfg *TerraformConfig) String() string {
@@ -533,12 +533,12 @@ func (cfg *TerraformConfig) ValidateHooks() error {
 
 // TerraformExtraArguments sets a list of arguments to pass to Terraform if command fits any in the `Commands` list
 type TerraformExtraArguments struct {
-	Name             string             `hcl:"name,label" cty:"name"`
 	Arguments        *[]string          `hcl:"arguments,attr" cty:"arguments"`
 	RequiredVarFiles *[]string          `hcl:"required_var_files,attr" cty:"required_var_files"`
 	OptionalVarFiles *[]string          `hcl:"optional_var_files,attr" cty:"optional_var_files"`
-	Commands         []string           `hcl:"commands,attr" cty:"commands"`
 	EnvVars          *map[string]string `hcl:"env_vars,attr" cty:"env_vars"`
+	Name             string             `hcl:"name,label" cty:"name"`
+	Commands         []string           `hcl:"commands,attr" cty:"commands"`
 }
 
 func (args *TerraformExtraArguments) String() string {
diff --git a/config/config_as_cty.go b/config/config_as_cty.go
index 7927ce60..3d09414b 100644
--- a/config/config_as_cty.go
+++ b/config/config_as_cty.go
@@ -473,16 +473,16 @@ type ctyCatalogConfig struct {
 // ctyEngineConfig is an alternate representation of EngineConfig that converts internal blocks into a map that
 // maps the name to the underlying struct, as opposed to a list representation.
 type ctyEngineConfig struct {
+	Meta    cty.Value `cty:"meta"`
 	Source  string    `cty:"source"`
 	Version string    `cty:"version"`
 	Type    string    `cty:"type"`
-	Meta    cty.Value `cty:"meta"`
 }
 
 // ctyExclude exclude representation for cty.
 type ctyExclude struct {
-	If                  bool     `cty:"if"`
 	Actions             []string `cty:"actions"`
+	If                  bool     `cty:"if"`
 	ExcludeDependencies bool     `cty:"exclude_dependencies"`
 }
 
diff --git a/config/config_helpers.go b/config/config_helpers.go
index b2609e98..34cab150 100644
--- a/config/config_helpers.go
+++ b/config/config_helpers.go
@@ -127,17 +127,15 @@ type EnvVar struct {
 // TrackInclude is used to differentiate between an included config in the current parsing ctx, and an included
 // config that was passed through from a previous parsing ctx.
 type TrackInclude struct {
-	// CurrentList is used to track the list of configs that should be imported and merged before the final
-	// TerragruntConfig is returned. This preserves the order of the blocks as they appear in the config, so that we can
-	// merge the included config in the right order.
-	CurrentList IncludeConfigs
-
 	// CurrentMap is the map version of CurrentList that maps the block labels to the included config.
 	CurrentMap map[string]IncludeConfig
-
 	// Original is used to track the original included config, and is used for resolving the include related
 	// functions.
 	Original *IncludeConfig
+	// CurrentList is used to track the list of configs that should be imported and merged before the final
+	// TerragruntConfig is returned. This preserves the order of the blocks as they appear in the config, so that we can
+	// merge the included config in the right order.
+	CurrentList IncludeConfigs
 }
 
 // Create an EvalContext for the HCL2 parser. We can define functions and variables in this ctx that the HCL2 parser
diff --git a/config/config_partial.go b/config/config_partial.go
index ce747d30..bd977b93 100644
--- a/config/config_partial.go
+++ b/config/config_partial.go
@@ -42,8 +42,8 @@ const (
 
 // terragruntIncludeMultiple is a struct that can be used to only decode the include block with labels.
 type terragruntIncludeMultiple struct {
-	Include IncludeConfigs `hcl:"include,block"`
 	Remain  hcl.Body       `hcl:",remain"`
+	Include IncludeConfigs `hcl:"include,block"`
 }
 
 // terragruntDependencies is a struct that can be used to only decode the dependencies block.
@@ -54,8 +54,8 @@ type terragruntDependencies struct {
 
 // terragruntFeatureFlags is a struct that can be used to store decoded feature flags.
 type terragruntFeatureFlags struct {
-	FeatureFlags FeatureFlags `hcl:"feature,block"`
 	Remain       hcl.Body     `hcl:",remain"`
+	FeatureFlags FeatureFlags `hcl:"feature,block"`
 }
 
 // terragruntErrors struct to decode errors block
@@ -103,8 +103,8 @@ type terragruntVersionConstraints struct {
 
 // TerragruntDependency is a struct that can be used to only decode the dependency blocks in the terragrunt config
 type TerragruntDependency struct {
-	Dependencies Dependencies `hcl:"dependency,block"`
 	Remain       hcl.Body     `hcl:",remain"`
+	Dependencies Dependencies `hcl:"dependency,block"`
 }
 
 // terragruntRemoteState is a struct that can be used to only decode the remote_state blocks in the terragrunt config
diff --git a/config/dependency.go b/config/dependency.go
index 69bb20ed..33c37dcd 100644
--- a/config/dependency.go
+++ b/config/dependency.go
@@ -47,20 +47,22 @@ type dependencyOutputCache struct {
 }
 
 type Dependency struct {
-	Name                                string     `hcl:",label" cty:"name"`
-	Enabled                             *bool      `hcl:"enabled,attr" cty:"enabled"`
 	ConfigPath                          cty.Value  `hcl:"config_path,attr" cty:"config_path"`
+	Enabled                             *bool      `hcl:"enabled,attr" cty:"enabled"`
 	SkipOutputs                         *bool      `hcl:"skip_outputs,attr" cty:"skip"`
 	MockOutputs                         *cty.Value `hcl:"mock_outputs,attr" cty:"mock_outputs"`
 	MockOutputsAllowedTerraformCommands *[]string  `hcl:"mock_outputs_allowed_terraform_commands,attr" cty:"mock_outputs_allowed_terraform_commands"`
 
 	// MockOutputsMergeWithState is deprecated. Use MockOutputsMergeStrategyWithState
-	MockOutputsMergeWithState         *bool              `hcl:"mock_outputs_merge_with_state,attr" cty:"mock_outputs_merge_with_state"`
+	MockOutputsMergeWithState *bool `hcl:"mock_outputs_merge_with_state,attr" cty:"mock_outputs_merge_with_state"`
+
 	MockOutputsMergeStrategyWithState *MergeStrategyType `hcl:"mock_outputs_merge_strategy_with_state" cty:"mock_outputs_merge_strategy_with_state"`
 
 	// Used to store the rendered outputs for use when the config is imported or read with `read_terragrunt_config`
 	RenderedOutputs *cty.Value `cty:"outputs"`
-	Inputs          *cty.Value `cty:"inputs"`
+
+	Inputs *cty.Value `cty:"inputs"`
+	Name   string     `hcl:",label" cty:"name"`
 }
 
 // DeepMerge will deep merge two Dependency configs, updating the target. Deep merge for Dependency configs is defined
@@ -1099,9 +1101,9 @@ func TerraformOutputJSONToCtyValueMap(targetConfigPath string, jsonBytes []byte)
 	// can't quite return the data directly. Instead, we will need further processing to get the output we want.
 	// To do so, we first Unmarshal the json into a simple go map to a OutputMeta struct.
 	type OutputMeta struct {
-		Sensitive bool            `json:"sensitive"`
 		Type      json.RawMessage `json:"type"`
 		Value     json.RawMessage `json:"value"`
+		Sensitive bool            `json:"sensitive"`
 	}
 
 	var outputs map[string]OutputMeta
diff --git a/config/engine.go b/config/engine.go
index a6de4040..ade74eb6 100644
--- a/config/engine.go
+++ b/config/engine.go
@@ -6,10 +6,10 @@ import (
 
 // EngineConfig represents the structure of the HCL data
 type EngineConfig struct {
-	Source  string     `hcl:"source,attr" cty:"source"`
 	Version *string    `hcl:"version,attr" cty:"version"`
 	Type    *string    `hcl:"type,attr" cty:"type"`
 	Meta    *cty.Value `hcl:"meta,attr" cty:"meta"`
+	Source  string     `hcl:"source,attr" cty:"source"`
 }
 
 // Clone returns a copy of the EngineConfig used in deep copy
diff --git a/config/errors.go b/config/errors.go
index 28cf30f4..3c5f8c84 100644
--- a/config/errors.go
+++ b/config/errors.go
@@ -107,8 +107,8 @@ func (err ParentFileNotFoundError) Error() string {
 }
 
 type InvalidGetEnvParamsError struct {
-	ActualNumParams int
 	Example         string
+	ActualNumParams int
 }
 
 func (err InvalidGetEnvParamsError) Error() string {
@@ -199,8 +199,8 @@ func (err DependencyConfigNotFound) Error() string {
 }
 
 type TerragruntOutputParsingError struct {
-	Path string
 	Err  error
+	Path string
 }
 
 func (err TerragruntOutputParsingError) Error() string {
@@ -208,8 +208,8 @@ func (err TerragruntOutputParsingError) Error() string {
 }
 
 type TerragruntOutputEncodingError struct {
-	Path string
 	Err  error
+	Path string
 }
 
 func (err TerragruntOutputEncodingError) Error() string {
@@ -217,8 +217,8 @@ func (err TerragruntOutputEncodingError) Error() string {
 }
 
 type TerragruntOutputListEncodingError struct {
-	Paths []string
 	Err   error
+	Paths []string
 }
 
 func (err TerragruntOutputListEncodingError) Error() string {
diff --git a/config/errors_block.go b/config/errors_block.go
index b8570ed5..69f3c8b4 100644
--- a/config/errors_block.go
+++ b/config/errors_block.go
@@ -23,10 +23,10 @@ type RetryBlock struct {
 
 // IgnoreBlock represents a labeled ignore block
 type IgnoreBlock struct {
+	Signals         map[string]cty.Value `cty:"signals" hcl:"signals,optional"`
 	Label           string               `cty:"name" hcl:"name,label"`
-	IgnorableErrors []string             `cty:"ignorable_errors" hcl:"ignorable_errors"`
 	Message         string               `cty:"message" hcl:"message,optional"`
-	Signals         map[string]cty.Value `cty:"signals" hcl:"signals,optional"`
+	IgnorableErrors []string             `cty:"ignorable_errors" hcl:"ignorable_errors"`
 }
 
 // Clone creates a deep copy of ErrorsConfig
diff --git a/config/exclude.go b/config/exclude.go
index 63097b58..ae1aedff 100644
--- a/config/exclude.go
+++ b/config/exclude.go
@@ -20,9 +20,9 @@ var boolFlagValues = []string{"if", "exclude_dependencies"}
 
 // ExcludeConfig configurations for hcl files.
 type ExcludeConfig struct {
-	If                  bool     `cty:"if" hcl:"if,attr" json:"if"`
-	Actions             []string `cty:"actions" hcl:"actions,attr" json:"actions"`
 	ExcludeDependencies *bool    `cty:"exclude_dependencies" hcl:"exclude_dependencies,attr" json:"exclude_dependencies"`
+	Actions             []string `cty:"actions" hcl:"actions,attr" json:"actions"`
+	If                  bool     `cty:"if" hcl:"if,attr" json:"if"`
 }
 
 // IsActionListed checks if the action is listed in the exclude block.
diff --git a/config/feature_flag.go b/config/feature_flag.go
index fe6faf40..3f57916c 100644
--- a/config/feature_flag.go
+++ b/config/feature_flag.go
@@ -13,14 +13,14 @@ type FeatureFlags []*FeatureFlag
 
 // FeatureFlag feature flags struct.
 type FeatureFlag struct {
-	Name    string     `cty:"name"    hcl:",label"`
 	Default *cty.Value `cty:"default" hcl:"default,attr"`
+	Name    string     `cty:"name"    hcl:",label"`
 }
 
 // ctyFeatureFlag struct used to pass FeatureFlag to cty.Value.
 type ctyFeatureFlag struct {
-	Name  string    `cty:"name"`
 	Value cty.Value `cty:"value"`
+	Name  string    `cty:"name"`
 }
 
 // DeepMerge merges the source FeatureFlag into the target FeatureFlag.
diff --git a/config/hclparse/errors.go b/config/hclparse/errors.go
index 376bf902..7745da71 100644
--- a/config/hclparse/errors.go
+++ b/config/hclparse/errors.go
@@ -6,8 +6,8 @@ import (
 )
 
 type PanicWhileParsingConfigError struct {
-	ConfigFile     string
 	RecoveredValue any
+	ConfigFile     string
 }
 
 func (err PanicWhileParsingConfigError) Error() string {
diff --git a/config/parsing_context.go b/config/parsing_context.go
index fc3006b6..b46f5c13 100644
--- a/config/parsing_context.go
+++ b/config/parsing_context.go
@@ -27,7 +27,7 @@ type ParsingContext struct {
 	// Features are the feature flags that are enabled for the current terragrunt config.
 	Features *cty.Value
 
-	// Values of the unit
+	// Values of the unit.
 	Values *cty.Value
 
 	// DecodedDependencies are references of other terragrunt config. This contains the following attributes that map to
@@ -35,20 +35,20 @@ type ParsingContext struct {
 	// - outputs: The map of outputs from the terraform state obtained by running `terragrunt output` on that target config.
 	DecodedDependencies *cty.Value
 
+	// These functions have the highest priority and will overwrite any others with the same name
+	PredefinedFunctions map[string]function.Function
+
+	// Set a custom converter to TerragruntConfig.
+	// Used to read a "catalog" configuration where only certain blocks (`catalog`, `locals`) do not need to be converted, avoiding errors if any of the remaining blocks were not evaluated correctly.
+	ConvertToTerragruntConfigFunc func(ctx *ParsingContext, configPath string, terragruntConfigFromFile *terragruntConfigFile) (cfg *TerragruntConfig, err error)
+
 	// PartialParseDecodeList is the list of sections that are being decoded in the current config. This can be used to
 	// indicate/detect that the current parsing ctx is partial, meaning that not all configuration values are
 	// expected to be available.
 	PartialParseDecodeList []PartialDecodeSectionType
 
-	// These functions have the highest priority and will overwrite any others with the same name
-	PredefinedFunctions map[string]function.Function
-
 	// `ParserOptions` is used to configure hcl Parser.
 	ParserOptions []hclparse.Option
-
-	// Set a custom converter to TerragruntConfig.
-	// Used to read a "catalog" configuration where only certain blocks (`catalog`, `locals`) do not need to be converted, avoiding errors if any of the remaining blocks were not evaluated correctly.
-	ConvertToTerragruntConfigFunc func(ctx *ParsingContext, configPath string, terragruntConfigFromFile *terragruntConfigFile) (cfg *TerragruntConfig, err error)
 }
 
 func NewParsingContext(ctx context.Context, opts *options.TerragruntOptions) *ParsingContext {
diff --git a/config/stack.go b/config/stack.go
index 3344bbc0..dea48620 100644
--- a/config/stack.go
+++ b/config/stack.go
@@ -41,20 +41,20 @@ type StackConfigFile struct {
 
 // Unit represent unit from stack file.
 type Unit struct {
+	NoStack *bool      `hcl:"no_dot_terragrunt_stack,attr"`
+	Values  *cty.Value `hcl:"values,attr"`
 	Name    string     `hcl:",label"`
 	Source  string     `hcl:"source,attr"`
 	Path    string     `hcl:"path,attr"`
-	NoStack *bool      `hcl:"no_dot_terragrunt_stack,attr"`
-	Values  *cty.Value `hcl:"values,attr"`
 }
 
 // Stack represents the stack block in the configuration.
 type Stack struct {
+	NoStack *bool      `hcl:"no_dot_terragrunt_stack,attr"`
+	Values  *cty.Value `hcl:"values,attr"`
 	Name    string     `hcl:",label"`
 	Source  string     `hcl:"source,attr"`
 	Path    string     `hcl:"path,attr"`
-	NoStack *bool      `hcl:"no_dot_terragrunt_stack,attr"`
-	Values  *cty.Value `hcl:"values,attr"`
 }
 
 // GenerateStacks generates the stack files.
@@ -254,13 +254,13 @@ func generateStacks(ctx context.Context, opts *options.TerragruntOptions, pool *
 // It contains information about the source and target directories, the name and path of the item, the source URL or path,
 // and any associated values that need to be processed.
 type componentToProcess struct {
+	values    *cty.Value
 	sourceDir string
 	targetDir string
 	name      string
 	path      string
 	source    string
 	noStack   bool
-	values    *cty.Value
 }
 
 // processComponent copies files from the source directory to the target destination and generates a corresponding values file.
@@ -273,10 +273,29 @@ func processComponent(ctx context.Context, opts *options.TerragruntOptions, cmp
 		return errors.Errorf("failed to adjust source %s: %v", cmp.source, err)
 	}
 
-	dest := cmp.path
-	// if destination is not an absolute path, join with target directory
-	if !filepath.IsAbs(cmp.path) {
-		dest = filepath.Join(cmp.targetDir, cmp.path)
+	if filepath.IsAbs(cmp.path) {
+		return errors.Errorf("path %s must be relative", cmp.path)
+	}
+
+	// building destination path based on target directory
+	dest := filepath.Join(cmp.targetDir, cmp.path)
+
+	// validate destination path is within the stack directory
+	// get the absolute path of the destination directory
+	absDest, err := filepath.Abs(dest)
+	if err != nil {
+		return errors.Errorf("failed to get absolute path for destination '%s': %v", cmp.name, err)
+	}
+
+	// get the absolute path of the stack directory
+	absStackDir, err := filepath.Abs(cmp.targetDir)
+	if err != nil {
+		return errors.Errorf("failed to get absolute path for stack directory '%s': %v", cmp.name, err)
+	}
+
+	// validate that the destination path is within the stack directory
+	if !strings.HasPrefix(absDest, absStackDir) {
+		return errors.Errorf("destination path '%s' is outside of the stack directory '%s'", absDest, absStackDir)
 	}
 
 	if cmp.noStack {
diff --git a/configstack/errors.go b/configstack/errors.go
index 03825821..caf39db6 100644
--- a/configstack/errors.go
+++ b/configstack/errors.go
@@ -35,8 +35,8 @@ func (err ProcessingModuleError) Unwrap() error {
 }
 
 type InfiniteRecursionError struct {
-	RecursionLevel int
 	Modules        map[string]*TerraformModule
+	RecursionLevel int
 }
 
 func (err InfiniteRecursionError) Error() string {
diff --git a/configstack/log.go b/configstack/log.go
index db3e1ca0..cb65ddea 100644
--- a/configstack/log.go
+++ b/configstack/log.go
@@ -7,8 +7,8 @@ import (
 
 // ForceLogLevelHook is a log hook which can change log level for messages which contains specific substrings
 type ForceLogLevelHook struct {
-	forcedLevel   logrus.Level
 	triggerLevels []logrus.Level
+	forcedLevel   logrus.Level
 }
 
 // NewForceLogLevelHook creates default log reduction hook
diff --git a/configstack/module.go b/configstack/module.go
index af171b9a..f2ab8848 100644
--- a/configstack/module.go
+++ b/configstack/module.go
@@ -32,10 +32,10 @@ const existingModulesCacheName = "existingModules"
 // module and the list of other modules that this module depends on
 type TerraformModule struct {
 	*Stack
+	TerragruntOptions    *options.TerragruntOptions
 	Path                 string
 	Dependencies         TerraformModules
 	Config               config.TerragruntConfig
-	TerragruntOptions    *options.TerragruntOptions
 	AssumeAlreadyApplied bool
 	FlagExcluded         bool
 }
diff --git a/configstack/running_module.go b/configstack/running_module.go
index 3aec05b4..e3d59c58 100644
--- a/configstack/running_module.go
+++ b/configstack/running_module.go
@@ -37,12 +37,12 @@ type DependencyOrder int
 // RunningModule represents a module we are trying to "run" (i.e. apply or destroy)
 // as part of the apply-all or destroy-all command.
 type RunningModule struct {
-	Module         *TerraformModule
-	Status         ModuleStatus
 	Err            error
+	Module         *TerraformModule
 	DependencyDone chan *RunningModule
 	Dependencies   map[string]*RunningModule
 	NotifyWhenDone []*RunningModule
+	Status         ModuleStatus
 	FlagExcluded   bool
 }
 
diff --git a/docs-starlight/src/data/commands/stack/generate.mdx b/docs-starlight/src/data/commands/stack/generate.mdx
index 8595acf7..78d1cf71 100644
--- a/docs-starlight/src/data/commands/stack/generate.mdx
+++ b/docs-starlight/src/data/commands/stack/generate.mdx
@@ -76,4 +76,9 @@ terragrunt stack generate --parallelism 4
 ```
 
 Automatic Discovery: The command automatically discovers all `terragrunt.stack.hcl` files within the directory structure and generates them in parallel.
+
+</Aside>
+
+<Aside type="caution">
+Path Restrictions: If an absolute path is provided as an argument, `generate` will throw an error. Only relative paths within the working directory are supported.
 </Aside>
diff --git a/docs/_docs/04_reference/02-cli-options.md b/docs/_docs/04_reference/02-cli-options.md
index 6909b082..0c6f0655 100644
--- a/docs/_docs/04_reference/02-cli-options.md
+++ b/docs/_docs/04_reference/02-cli-options.md
@@ -343,11 +343,13 @@ Will create the following directory structure:
 - Parallel Execution: Stack generation runs concurrently to improve performance. The number of parallel tasks is determined by the `GOMAXPROCS` environment variable and can be explicitly controlled using the `--parallelism` flag:
 
 ```bash
-  terragrunt stack generate --parallelism 4
+terragrunt stack generate --parallelism 4
 ```
 
 - Automatic Discovery: The command automatically discovers all `terragrunt.stack.hcl` files within the directory structure and generates them in parallel.
 
+- Path Restrictions: If an absolute path is provided as an argument, the command will throw an error. Only relative paths within the working directory are supported.
+
 #### stack run
 
 The `stack run *` command allows users to execute IaC commands across all units defined in a `terragrunt.stack.hcl` file.
diff --git a/dynamodb/dynamo_lock_table.go b/dynamodb/dynamo_lock_table.go
index 3cebdeba..eddc14ca 100644
--- a/dynamodb/dynamo_lock_table.go
+++ b/dynamodb/dynamo_lock_table.go
@@ -312,8 +312,8 @@ func (err TableActiveRetriesExceeded) Error() string {
 }
 
 type TableDoesNotExist struct {
-	TableName  string
 	Underlying error
+	TableName  string
 }
 
 func (err TableDoesNotExist) Error() string {
diff --git a/engine/engine.go b/engine/engine.go
index 23c00061..4778ae51 100644
--- a/engine/engine.go
+++ b/engine/engine.go
@@ -58,14 +58,14 @@ type engineClientsKey byte
 type engineLocksKey byte
 
 type ExecutionOptions struct {
-	TerragruntOptions *options.TerragruntOptions
 	CmdStdout         io.Writer
 	CmdStderr         io.Writer
+	TerragruntOptions *options.TerragruntOptions
 	WorkingDir        string
-	SuppressStdout    bool
-	AllocatePseudoTty bool
 	Command           string
 	Args              []string
+	SuppressStdout    bool
+	AllocatePseudoTty bool
 }
 
 type engineInstance struct {
diff --git a/go.mod b/go.mod
index 9be2924f..000f2239 100644
--- a/go.mod
+++ b/go.mod
@@ -83,7 +83,10 @@ require (
 	gopkg.in/ini.v1 v1.67.0
 )
 
-require github.com/aws/aws-sdk-go-v2/service/s3 v1.78.2
+require (
+	github.com/aws/aws-sdk-go-v2/service/s3 v1.78.2
+	github.com/charmbracelet/x/term v0.2.1
+)
 
 require (
 	atomicgo.dev/cursor v0.2.0 // indirect
@@ -163,7 +166,6 @@ require (
 	github.com/cenkalti/backoff/v4 v4.3.0 // indirect
 	github.com/cespare/xxhash/v2 v2.3.0 // indirect
 	github.com/charmbracelet/x/ansi v0.8.0 // indirect
-	github.com/charmbracelet/x/term v0.2.1 // indirect
 	github.com/cloudflare/circl v1.6.0 // indirect
 	github.com/cncf/xds/go v0.0.0-20250121191232-2f005788dc42 // indirect
 	github.com/containerd/console v1.0.4 // indirect
@@ -183,7 +185,7 @@ require (
 	github.com/go-logr/stdr v1.2.2 // indirect
 	github.com/go-ozzo/ozzo-validation v3.6.0+incompatible // indirect
 	github.com/go-sql-driver/mysql v1.8.1 // indirect
-	github.com/golang-jwt/jwt/v5 v5.2.1 // indirect
+	github.com/golang-jwt/jwt/v5 v5.2.2 // indirect
 	github.com/golang/protobuf v1.5.4 // indirect
 	github.com/google/go-cmp v0.7.0 // indirect
 	github.com/google/go-github/v53 v53.2.0 // indirect
diff --git a/go.sum b/go.sum
index 80c82f13..1cb47132 100644
--- a/go.sum
+++ b/go.sum
@@ -2,8 +2,6 @@ atomicgo.dev/assert v0.0.2 h1:FiKeMiZSgRrZsPo9qn/7vmr7mCsh5SZyXY4YGYiYwrg=
 atomicgo.dev/assert v0.0.2/go.mod h1:ut4NcI3QDdJtlmAxQULOmA13Gz6e2DWbSAS8RUOmNYQ=
 c2sp.org/CCTV/age v0.0.0-20240306222714-3ec4d716e805 h1:u2qwJeEvnypw+OCPUHmoZE3IqwfuN5kgDfo5MLzpNM0=
 c2sp.org/CCTV/age v0.0.0-20240306222714-3ec4d716e805/go.mod h1:FomMrUJ2Lxt5jCLmZkG3FHa72zUprnhd3v/Z18Snm4w=
-cel.dev/expr v0.19.1 h1:NciYrtDRIR0lNCnH1LFJegdjspNx9fI59O7TWcua/W4=
-cel.dev/expr v0.19.1/go.mod h1:MrpN08Q+lEBs+bGYdLxxHkZoUSsCp0nSKTs0nTymJgw=
 cel.dev/expr v0.22.0 h1:+hFFhLPmquBImfs1BiN2PZmkr5ASse2ZOuaxIs9e4R8=
 cel.dev/expr v0.22.0/go.mod h1:MrpN08Q+lEBs+bGYdLxxHkZoUSsCp0nSKTs0nTymJgw=
 cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
@@ -44,8 +42,6 @@ cloud.google.com/go v0.104.0/go.mod h1:OO6xxXdJyvuJPcEPBLN9BJPD+jep5G1+2U5B5gkRY
 cloud.google.com/go v0.105.0/go.mod h1:PrLgOJNe5nfE9UMxKxgXj4mD3voiP+YQ6gdt6KMFOKM=
 cloud.google.com/go v0.107.0/go.mod h1:wpc2eNrD7hXUTy8EKS10jkxpZBjASrORK7goS+3YX2I=
 cloud.google.com/go v0.110.0/go.mod h1:SJnCLqQ0FCFGSZMUNUf84MV3Aia54kn7pi8st7tMzaY=
-cloud.google.com/go v0.118.2 h1:bKXO7RXMFDkniAAvvuMrAPtQ/VHrs9e7J5UT3yrGdTY=
-cloud.google.com/go v0.118.2/go.mod h1:CFO4UPEPi8oV21xoezZCrd3d81K4fFkDTEJu4R8K+9M=
 cloud.google.com/go v0.120.0 h1:wc6bgG9DHyKqF5/vQvX1CiZrtHnxJjBlKUyF9nP6meA=
 cloud.google.com/go v0.120.0/go.mod h1:/beW32s8/pGRuj4IILWQNd4uuebeT4dkOhKmkfit64Q=
 cloud.google.com/go/accessapproval v1.4.0/go.mod h1:zybIuC3KpDOvotz59lFe5qxRZx6C75OtwbisN56xYB4=
@@ -111,8 +107,6 @@ cloud.google.com/go/assuredworkloads v1.9.0/go.mod h1:kFuI1P78bplYtT77Tb1hi0FMxM
 cloud.google.com/go/assuredworkloads v1.10.0/go.mod h1:kwdUQuXcedVdsIaKgKTp9t0UJkE5+PAVNhdQm4ZVq2E=
 cloud.google.com/go/auth v0.15.0 h1:Ly0u4aA5vG/fsSsxu98qCQBemXtAtJf+95z9HK+cxps=
 cloud.google.com/go/auth v0.15.0/go.mod h1:WJDGqZ1o9E9wKIL+IwStfyn/+s59zl4Bi+1KQNVXLZ8=
-cloud.google.com/go/auth/oauth2adapt v0.2.7 h1:/Lc7xODdqcEw8IrZ9SvwnlLX6j9FHQM74z6cBk9Rw6M=
-cloud.google.com/go/auth/oauth2adapt v0.2.7/go.mod h1:NTbTTzfvPl1Y3V1nPpOgl2w6d/FjO7NNUQaWSox6ZMc=
 cloud.google.com/go/auth/oauth2adapt v0.2.8 h1:keo8NaayQZ6wimpNSmW5OPc283g65QNIiLpZnkHRbnc=
 cloud.google.com/go/auth/oauth2adapt v0.2.8/go.mod h1:XQ9y31RkqZCcwJWNSx2Xvric3RrU88hAYYbjDWYDL+c=
 cloud.google.com/go/automl v1.5.0/go.mod h1:34EjfoFGMZ5sgJ9EoLsRtdPSNZLcfflJR39VbVNS2M0=
@@ -329,8 +323,6 @@ cloud.google.com/go/iam v0.8.0/go.mod h1:lga0/y3iH6CX7sYqypWJ33hf7kkfXJag67naqGE
 cloud.google.com/go/iam v0.11.0/go.mod h1:9PiLDanza5D+oWFZiH1uG+RnRCfEGKoyl6yo4cgWZGY=
 cloud.google.com/go/iam v0.12.0/go.mod h1:knyHGviacl11zrtZUoDuYpDgLjvr28sLQaG0YB2GYAY=
 cloud.google.com/go/iam v0.13.0/go.mod h1:ljOg+rcNfzZ5d6f1nAUJ8ZIxOaZUVoS14bKCtaLZ/D0=
-cloud.google.com/go/iam v1.3.1 h1:KFf8SaT71yYq+sQtRISn90Gyhyf4X8RGgeAVC8XGf3E=
-cloud.google.com/go/iam v1.3.1/go.mod h1:3wMtuyT4NcbnYNPLMBzYRFiEfjKfJlLVLrisE7bwm34=
 cloud.google.com/go/iam v1.4.2 h1:4AckGYAYsowXeHzsn/LCKWIwSWLkdb0eGjH8wWkd27Q=
 cloud.google.com/go/iam v1.4.2/go.mod h1:REGlrt8vSlh4dfCJfSEcNjLGq75wW75c5aU3FLOYq34=
 cloud.google.com/go/iap v1.4.0/go.mod h1:RGFwRJdihTINIe4wZ2iCP0zF/qu18ZwyKxrhMhygBEc=
@@ -352,8 +344,6 @@ cloud.google.com/go/kms v1.8.0/go.mod h1:4xFEhYFqvW+4VMELtZyxomGSYtSQKzM178ylFW4
 cloud.google.com/go/kms v1.9.0/go.mod h1:qb1tPTgfF9RQP8e1wq4cLFErVuTJv7UsSC915J8dh3w=
 cloud.google.com/go/kms v1.10.0/go.mod h1:ng3KTUtQQU9bPX3+QGLsflZIHlkbn8amFAMY63m8d24=
 cloud.google.com/go/kms v1.10.1/go.mod h1:rIWk/TryCkR59GMC3YtHtXeLzd634lBbKenvyySAyYI=
-cloud.google.com/go/kms v1.20.5 h1:aQQ8esAIVZ1atdJRxihhdxGQ64/zEbJoJnCz/ydSmKg=
-cloud.google.com/go/kms v1.20.5/go.mod h1:C5A8M1sv2YWYy1AE6iSrnddSG9lRGdJq5XEdBy28Lmw=
 cloud.google.com/go/kms v1.21.0 h1:x3EeWKuYwdlo2HLse/876ZrKjk2L5r7Uexfm8+p6mSI=
 cloud.google.com/go/kms v1.21.0/go.mod h1:zoFXMhVVK7lQ3JC9xmhHMoQhnjEDZFoLAr5YMwzBLtk=
 cloud.google.com/go/language v1.4.0/go.mod h1:F9dRpNFQmJbkaop6g0JhSBXCNlO90e1KWx5iDdxbWic=
@@ -371,8 +361,6 @@ cloud.google.com/go/logging v1.13.0/go.mod h1:36CoKh6KA/M0PbhPKMq6/qety2DCAErbhX
 cloud.google.com/go/longrunning v0.1.1/go.mod h1:UUFxuDWkv22EuY93jjmDMFT5GPQKeFVJBIF6QlTqdsE=
 cloud.google.com/go/longrunning v0.3.0/go.mod h1:qth9Y41RRSUE69rDcOn6DdK3HfQfsUI0YSmW3iIlLJc=
 cloud.google.com/go/longrunning v0.4.1/go.mod h1:4iWDqhBZ70CvZ6BfETbvam3T8FMvLK+eFj0E6AaRQTo=
-cloud.google.com/go/longrunning v0.6.4 h1:3tyw9rO3E2XVXzSApn1gyEEnH2K9SynNQjMlBi3uHLg=
-cloud.google.com/go/longrunning v0.6.4/go.mod h1:ttZpLCe6e7EXvn9OxpBRx7kZEB0efv8yBO6YnVMfhJs=
 cloud.google.com/go/longrunning v0.6.5 h1:sD+t8DO8j4HKW4QfouCklg7ZC1qC4uzVZt8iz3uTW+Q=
 cloud.google.com/go/longrunning v0.6.5/go.mod h1:Et04XK+0TTLKa5IPYryKf5DkpwImy6TluQ1QTLwlKmY=
 cloud.google.com/go/managedidentities v1.3.0/go.mod h1:UzlW3cBOiPrzucO5qWkNkh0w33KFtBJU281hacNvsdE=
@@ -398,8 +386,6 @@ cloud.google.com/go/monitoring v1.7.0/go.mod h1:HpYse6kkGo//7p6sT0wsIC6IBDET0RhI
 cloud.google.com/go/monitoring v1.8.0/go.mod h1:E7PtoMJ1kQXWxPjB6mv2fhC5/15jInuulFdYYtlcvT4=
 cloud.google.com/go/monitoring v1.12.0/go.mod h1:yx8Jj2fZNEkL/GYZyTLS4ZtZEZN8WtDEiEqG4kLK50w=
 cloud.google.com/go/monitoring v1.13.0/go.mod h1:k2yMBAB1H9JT/QETjNkgdCGD9bPF712XiLTVr+cBrpw=
-cloud.google.com/go/monitoring v1.23.0 h1:M3nXww2gn9oZ/qWN2bZ35CjolnVHM3qnSbu6srCPgjk=
-cloud.google.com/go/monitoring v1.23.0/go.mod h1:034NnlQPDzrQ64G2Gavhl0LUHZs9H3rRmhtnp7jiJgg=
 cloud.google.com/go/monitoring v1.24.1 h1:vKiypZVFD/5a3BbQMvI4gZdl8445ITzXFh257XBgrS0=
 cloud.google.com/go/monitoring v1.24.1/go.mod h1:Z05d1/vn9NaujqY2voG6pVQXoJGbp+r3laV+LySt9K0=
 cloud.google.com/go/networkconnectivity v1.4.0/go.mod h1:nOl7YL8odKyAOtzNX73/M5/mGZgqqMeryi6UPZTk/rA=
@@ -565,8 +551,6 @@ cloud.google.com/go/storage v1.23.0/go.mod h1:vOEEDNFnciUMhBeT6hsJIn3ieU5cFRmzeL
 cloud.google.com/go/storage v1.27.0/go.mod h1:x9DOL8TK/ygDUMieqwfhdpQryTeEkhGKMi80i/iqR2s=
 cloud.google.com/go/storage v1.28.1/go.mod h1:Qnisd4CqDdo6BGs2AD5LLnEsmSQ80wQ5ogcBBKhU86Y=
 cloud.google.com/go/storage v1.29.0/go.mod h1:4puEjyTKnku6gfKoTfNOU/W+a9JyuVNxjpS5GBrB8h4=
-cloud.google.com/go/storage v1.50.0 h1:3TbVkzTooBvnZsk7WaAQfOsNrdoM8QHusXA1cpk6QJs=
-cloud.google.com/go/storage v1.50.0/go.mod h1:l7XeiD//vx5lfqE3RavfmU9yvk5Pp0Zhcv482poyafY=
 cloud.google.com/go/storage v1.51.0 h1:ZVZ11zCiD7b3k+cH5lQs/qcNaoSz3U9I0jgwVzqDlCw=
 cloud.google.com/go/storage v1.51.0/go.mod h1:YEJfu/Ki3i5oHC/7jyTgsGZwdQ8P9hqMqvpi5kRKGgc=
 cloud.google.com/go/storagetransfer v1.5.0/go.mod h1:dxNzUopWy7RQevYFHewchb29POFv3/AaBgnhqzqiK0w=
@@ -695,19 +679,12 @@ github.com/BurntSushi/toml v1.4.0/go.mod h1:ukJfTF/6rtPPRCnwkur4qwRxa8vTRFBF0uk2
 github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo=
 github.com/ChrisTrenkamp/goxpath v0.0.0-20170922090931-c385f95c6022/go.mod h1:nuWgzSkT5PnyOd+272uUmV0dnAnAn42Mk7PiQC5VzN4=
 github.com/ChrisTrenkamp/goxpath v0.0.0-20190607011252-c5096ec8773d/go.mod h1:nuWgzSkT5PnyOd+272uUmV0dnAnAn42Mk7PiQC5VzN4=
-github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp v1.25.0 h1:3c8yed4lgqTt+oTQ+JNMDo+F4xprBf+O/il4ZC0nRLw=
-github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp v1.25.0/go.mod h1:obipzmGjfSjam60XLwGfqUkJsfiheAl+TUjG+4yzyPM=
 github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp v1.27.0 h1:ErKg/3iS1AKcTkf3yixlZ54f9U1rljCkQyEXWUnIUxc=
 github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp v1.27.0/go.mod h1:yAZHSGnqScoU556rBOVkwLze6WP5N+U11RHuWaGVxwY=
-github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/metric v0.49.0 h1:o90wcURuxekmXrtxmYWTyNla0+ZEHhud6DI1ZTxd1vI=
-github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/metric v0.49.0/go.mod h1:6fTWu4m3jocfUZLYF5KsZC1TUfRvEjs7lM4crme/irw=
 github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/metric v0.51.0 h1:fYE9p3esPxA/C0rQ0AHhP0drtPXDRhaWiwg1DPqO7IU=
 github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/metric v0.51.0/go.mod h1:BnBReJLvVYx2CS/UHOgVz2BXKXD9wsQPxZug20nZhd0=
-github.com/GoogleCloudPlatform/opentelemetry-operations-go/internal/cloudmock v0.49.0 h1:jJKWl98inONJAr/IZrdFQUWcwUO95DLY1XMD1ZIut+g=
-github.com/GoogleCloudPlatform/opentelemetry-operations-go/internal/cloudmock v0.49.0/go.mod h1:l2fIqmwB+FKSfvn3bAD/0i+AXAxhIZjTK2svT/mgUXs=
 github.com/GoogleCloudPlatform/opentelemetry-operations-go/internal/cloudmock v0.51.0 h1:OqVGm6Ei3x5+yZmSJG1Mh2NwHvpVmZ08CB5qJhT9Nuk=
-github.com/GoogleCloudPlatform/opentelemetry-operations-go/internal/resourcemapping v0.49.0 h1:GYUJLfvd++4DMuMhCFLgLXvFwofIxh/qOwoGuS/LTew=
-github.com/GoogleCloudPlatform/opentelemetry-operations-go/internal/resourcemapping v0.49.0/go.mod h1:wRbFgBQUVm1YXrvWKofAEmq9HNJTDphbAaJSSX01KUI=
+github.com/GoogleCloudPlatform/opentelemetry-operations-go/internal/cloudmock v0.51.0/go.mod h1:SZiPHWGOOk3bl8tkevxkoiwPgsIl6CwrWcbwjfHZpdM=
 github.com/GoogleCloudPlatform/opentelemetry-operations-go/internal/resourcemapping v0.51.0 h1:6/0iUd0xrnX7qt+mLNRwg5c0PGv8wpE8K90ryANQwMI=
 github.com/GoogleCloudPlatform/opentelemetry-operations-go/internal/resourcemapping v0.51.0/go.mod h1:otE2jQekW/PqXk1Awf5lmfokJx4uwuqcj1ab5SpGeW0=
 github.com/JohnCGriffin/overflow v0.0.0-20211019200055-46fa312c352c/go.mod h1:X0CRv0ky0k6m906ixxpzmDRLvX58TFUKS2eePweuyxk=
@@ -906,7 +883,6 @@ github.com/cenkalti/backoff/v4 v4.3.0/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyY
 github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU=
 github.com/census-instrumentation/opencensus-proto v0.3.0/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU=
 github.com/census-instrumentation/opencensus-proto v0.4.1/go.mod h1:4T9NM4+4Vw91VeyqjLS6ao50K5bOcLKN6Q42XnYaRYw=
-github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko=
 github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc=
 github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
 github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
@@ -1092,8 +1068,8 @@ github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7a
 github.com/gogo/protobuf v1.2.2-0.20190723190241-65acae22fc9d/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o=
 github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q=
 github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q=
-github.com/golang-jwt/jwt/v5 v5.2.1 h1:OuVbFODueb089Lh128TAcimifWaLhJwVflnrgM17wHk=
-github.com/golang-jwt/jwt/v5 v5.2.1/go.mod h1:pqrtFR0X4osieyHYxtmOUWsAWrfe1Q5UVIyoH402zdk=
+github.com/golang-jwt/jwt/v5 v5.2.2 h1:Rl4B7itRWVtYIHFrSNd7vhTiz9UpLdi6gZhZ3wEeDy8=
+github.com/golang-jwt/jwt/v5 v5.2.2/go.mod h1:pqrtFR0X4osieyHYxtmOUWsAWrfe1Q5UVIyoH402zdk=
 github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0/go.mod h1:E/TSTwGwJL78qG/PmXZO1EjYhfJinVAhrmmHX6Z8B9k=
 github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q=
 github.com/golang/glog v1.0.0/go.mod h1:EWib/APOK0SL3dFbYqvxE3UYd8E6s1ouQ7iEp/0LWV4=
@@ -1207,8 +1183,6 @@ github.com/googleapis/enterprise-certificate-proxy v0.1.0/go.mod h1:17drOmN3MwGY
 github.com/googleapis/enterprise-certificate-proxy v0.2.0/go.mod h1:8C0jb7/mgJe/9KK8Lm7X9ctZC2t60YyIpYEI16jx0Qg=
 github.com/googleapis/enterprise-certificate-proxy v0.2.1/go.mod h1:AwSRAtLfXpU5Nm3pW+v7rGDHp09LsPtGY9MduiEsR9k=
 github.com/googleapis/enterprise-certificate-proxy v0.2.3/go.mod h1:AwSRAtLfXpU5Nm3pW+v7rGDHp09LsPtGY9MduiEsR9k=
-github.com/googleapis/enterprise-certificate-proxy v0.3.4 h1:XYIDZApgAnrN1c855gTgghdIA6Stxb52D5RnLI1SLyw=
-github.com/googleapis/enterprise-certificate-proxy v0.3.4/go.mod h1:YKe7cfqYXjKGpGvmSg28/fFvhNzinZQm8DGnaburhGA=
 github.com/googleapis/enterprise-certificate-proxy v0.3.6 h1:GW/XbdyBFQ8Qe+YAmFU9uHLo7OnF5tL52HFAgMmyrf4=
 github.com/googleapis/enterprise-certificate-proxy v0.3.6/go.mod h1:MkHOF77EYAE7qfSuSS9PU6g4Nt4e11cnsDUowfwewLA=
 github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg=
@@ -1246,7 +1220,6 @@ github.com/goware/prefixer v0.0.0-20160118172347-395022866408/go.mod h1:PE1ycukg
 github.com/grpc-ecosystem/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs=
 github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk=
 github.com/grpc-ecosystem/grpc-gateway v1.8.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY=
-github.com/grpc-ecosystem/grpc-gateway v1.16.0 h1:gmcG1KaJ57LophUzW0Hy8NmPhnMZb4M0+kPpLofRdBo=
 github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw=
 github.com/grpc-ecosystem/grpc-gateway/v2 v2.7.0/go.mod h1:hgWBS7lorOAVIJEQMi4ZsPv9hVvWI6+ch50m39Pf2Ks=
 github.com/grpc-ecosystem/grpc-gateway/v2 v2.11.3/go.mod h1:o//XUCC/F+yRGJoPO/VU0GSB0f8Nhgmxx0VIRUvaC0w=
@@ -1579,8 +1552,6 @@ github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
 github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
 github.com/pkg/sftp v1.10.1/go.mod h1:lYOWFsE0bwd1+KfKJaKeuokY15vzFx25BLbzYYoAxZI=
 github.com/pkg/sftp v1.13.1/go.mod h1:3HaPG6Dq1ILlpPZRO0HVMrsydcdLt6HRDccSgb87qRg=
-github.com/planetscale/vtprotobuf v0.6.1-0.20241121165744-79df5c4772f2 h1:1sLMdKq4gNANTj0dUibycTLzpIEKVnLnbaEkxws78nw=
-github.com/planetscale/vtprotobuf v0.6.1-0.20241121165744-79df5c4772f2/go.mod h1:t/avpk3KcrXxUnYOhZhMXJlSEyie6gQbtLq5NM3loB8=
 github.com/planetscale/vtprotobuf v0.6.1-0.20250313105119-ba97887b0a25 h1:S1hI5JiKP7883xBzZAr1ydcxrKNSVNm7+3+JwjxZEsg=
 github.com/planetscale/vtprotobuf v0.6.1-0.20250313105119-ba97887b0a25/go.mod h1:ZQntvDG8TkPgljxtA0R9frDoND4QORU1VXz015N5Ks4=
 github.com/pmezard/go-difflib v0.0.0-20151028094244-d8ed2627bdf0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
@@ -1772,36 +1743,24 @@ go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E=
 go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo=
 go.opentelemetry.io/auto/sdk v1.1.0 h1:cH53jehLUN6UFLY71z+NDOiNJqDdPRaXzTel0sJySYA=
 go.opentelemetry.io/auto/sdk v1.1.0/go.mod h1:3wSPjt5PWp2RhlCcmmOial7AvC4DQqZb7a7wCow3W8A=
-go.opentelemetry.io/contrib/detectors/gcp v1.34.0 h1:JRxssobiPg23otYU5SbWtQC//snGVIM3Tx6QRzlQBao=
-go.opentelemetry.io/contrib/detectors/gcp v1.34.0/go.mod h1:cV4BMFcscUR/ckqLkbfQmF0PRsq8w/lMGzdbCSveBHo=
 go.opentelemetry.io/contrib/detectors/gcp v1.35.0 h1:bGvFt68+KTiAKFlacHW6AhA56GF2rS0bdD3aJYEnmzA=
 go.opentelemetry.io/contrib/detectors/gcp v1.35.0/go.mod h1:qGWP8/+ILwMRIUf9uIVLloR1uo5ZYAslM4O6OqUi1DA=
-go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.59.0 h1:rgMkmiGfix9vFJDcDi1PK8WEQP4FLQwLDfhp5ZLpFeE=
-go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.59.0/go.mod h1:ijPqXp5P6IRRByFVVg9DY8P5HkxkHE5ARIa+86aXPf4=
 go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.60.0 h1:x7wzEgXfnzJcHDwStJT+mxOz4etr2EcexjqhBvmoakw=
 go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.60.0/go.mod h1:rg+RlpR5dKwaS95IyyZqj5Wd4E13lk/msnTS0Xl9lJM=
-go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.59.0 h1:CV7UdSGJt/Ao6Gp4CXckLxVRRsRgDHoI8XjbL3PDl8s=
-go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.59.0/go.mod h1:FRmFuRJfag1IZ2dPkHnEoSFVgTVPUd2qf5Vi69hLb8I=
 go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.60.0 h1:sbiXRNDSWJOTobXh5HyQKjq6wUC5tNybqjIqDpAY4CU=
 go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.60.0/go.mod h1:69uWxva0WgAA/4bu2Yy70SLDBwZXuQ6PbBpbsa5iZrQ=
 go.opentelemetry.io/otel v1.35.0 h1:xKWKPxrxB6OtMCbmMY021CqC45J+3Onta9MqjhnusiQ=
 go.opentelemetry.io/otel v1.35.0/go.mod h1:UEqy8Zp11hpkUrL73gSlELM0DupHoiq72dR+Zqel/+Y=
 go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.35.0 h1:QcFwRrZLc82r8wODjvyCbP7Ifp3UANaBSmhDSFjnqSc=
 go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.35.0/go.mod h1:CXIWhUomyWBG/oY2/r/kLp6K/cmx9e/7DLpBuuGdLCA=
-go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.34.0 h1:opwv08VbCZ8iecIWs+McMdHRcAXzjAeda3uG2kI/hcA=
-go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.34.0/go.mod h1:oOP3ABpW7vFHulLpE8aYtNBodrHhMTrvfxUXGvqm7Ac=
 go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.35.0 h1:0NIXxOCFx+SKbhCVxwl3ETG8ClLPAa0KuKV6p3yhxP8=
 go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.35.0/go.mod h1:ChZSJbbfbl/DcRZNc9Gqh6DYGlfjw4PvO1pEOZH1ZsE=
 go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.35.0 h1:1fTNlAIJZGWLP5FVu0fikVry1IsiUnXjf7QFvoNN3Xw=
 go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.35.0/go.mod h1:zjPK58DtkqQFn+YUMbx0M2XV3QgKU0gS9LeGohREyK4=
 go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.35.0 h1:m639+BofXTvcY1q8CGs4ItwQarYtJPOWmVobfM1HpVI=
 go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.35.0/go.mod h1:LjReUci/F4BUyv+y4dwnq3h/26iNOeC3wAIqgvTIZVo=
-go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.34.0 h1:BEj3SPM81McUZHYjRS5pEgNgnmzGJ5tRpU5krWnV8Bs=
-go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.34.0/go.mod h1:9cKLGBDzI/F3NoHLQGm4ZrYdIHsvGt6ej6hUowxY0J4=
 go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.35.0 h1:xJ2qHD0C1BeYVTLLR9sX12+Qb95kfeD/byKj6Ky1pXg=
 go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.35.0/go.mod h1:u5BF1xyjstDowA1R5QAO9JHzqK+ublenEW/dyqTjBVk=
-go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.34.0 h1:czJDQwFrMbOr9Kk+BPo1y8WZIIFIK58SA1kykuVeiOU=
-go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.34.0/go.mod h1:lT7bmsxOe58Tq+JIOkTQMCGXdu47oA+VJKLZHbaBKbs=
 go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.35.0 h1:PB3Zrjs1sG1GBX51SXyTSoOTqcDglmsk7nT6tkKPb/k=
 go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.35.0/go.mod h1:U2R3XyVPzn0WX7wOIypPuptulsMcPDPs/oiSVOMVnHY=
 go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.34.0 h1:jBpDk4HAUsrnVO1FsfCfCOTEc/MkInJmvfCHYLFiT80=
@@ -2017,8 +1976,6 @@ golang.org/x/oauth2 v0.4.0/go.mod h1:RznEsdpjGAINPTOF0UH/t+xJ75L18YO3Ho6Pyn+uRec
 golang.org/x/oauth2 v0.5.0/go.mod h1:9/XBHVqLaWO3/BRHs5jbpYCnOZVjj5V0ndyaAM7KB4I=
 golang.org/x/oauth2 v0.6.0/go.mod h1:ycmewcwgD4Rpr3eZJLSB4Kyyljb3qDh40vJ8STE5HKw=
 golang.org/x/oauth2 v0.7.0/go.mod h1:hPLQkd9LyjfXTiRohC/41GhcFqxisoUQ99sCUOHO9x4=
-golang.org/x/oauth2 v0.27.0 h1:da9Vo7/tDv5RH/7nZDz1eMGS/q1Vv1N/7FCrBhI9I3M=
-golang.org/x/oauth2 v0.27.0/go.mod h1:onh5ek6nERTohokkhCD/y2cV4Do3fxFHFuAejCkRWT8=
 golang.org/x/oauth2 v0.28.0 h1:CrgCKl8PPAVtLnU3c+EDw6x11699EWlsDeWNWKdIOkc=
 golang.org/x/oauth2 v0.28.0/go.mod h1:onh5ek6nERTohokkhCD/y2cV4Do3fxFHFuAejCkRWT8=
 golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
@@ -2197,8 +2154,6 @@ golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxb
 golang.org/x/time v0.0.0-20220922220347-f3bd1da661af/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
 golang.org/x/time v0.1.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
 golang.org/x/time v0.3.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
-golang.org/x/time v0.10.0 h1:3usCWA8tQn0L8+hFJQNgzpWbd89begxN66o1Ojdn5L4=
-golang.org/x/time v0.10.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM=
 golang.org/x/time v0.11.0 h1:/bpjEDfN9tkoN/ryeYHnv5hcMlc8ncjMcM4XBk5NWV0=
 golang.org/x/time v0.11.0/go.mod h1:CDIdPxbZBQxdj6cxyCIdrNogrJKMJ7pr37NYpMcMDSg=
 golang.org/x/tools v0.0.0-20180525024113-a5b4c53f6e8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
@@ -2344,8 +2299,6 @@ google.golang.org/api v0.108.0/go.mod h1:2Ts0XTHNVWxypznxWOYUeI4g3WdP9Pk2Qk58+a/
 google.golang.org/api v0.110.0/go.mod h1:7FC4Vvx1Mooxh8C5HWjzZHcavuS2f6pmJpZx60ca7iI=
 google.golang.org/api v0.111.0/go.mod h1:qtFHvU9mhgTJegR31csQ+rwxyUTHOKFqCKWp1J0fdw0=
 google.golang.org/api v0.114.0/go.mod h1:ifYI2ZsFK6/uGddGfAD5BMxlnkBqCmqHSDUVi45N5Yg=
-google.golang.org/api v0.223.0 h1:JUTaWEriXmEy5AhvdMgksGGPEFsYfUKaPEYXd4c3Wvc=
-google.golang.org/api v0.223.0/go.mod h1:C+RS7Z+dDwds2b+zoAk5hN/eSfsiCn0UDrYof/M4d2M=
 google.golang.org/api v0.227.0 h1:QvIHF9IuyG6d6ReE+BNd11kIB8hZvjN8Z5xY5t21zYc=
 google.golang.org/api v0.227.0/go.mod h1:EIpaG6MbTgQarWF5xJvX0eOJPK9n/5D4Bynb9j2HXvQ=
 google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM=
@@ -2488,8 +2441,6 @@ google.golang.org/genproto v0.0.0-20230323212658-478b75c54725/go.mod h1:UUQDJDOl
 google.golang.org/genproto v0.0.0-20230330154414-c0448cd141ea/go.mod h1:UUQDJDOlWu4KYeJZffbWgBkS1YFobzKbLVfK69pe0Ak=
 google.golang.org/genproto v0.0.0-20230331144136-dcfb400f0633/go.mod h1:UUQDJDOlWu4KYeJZffbWgBkS1YFobzKbLVfK69pe0Ak=
 google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1/go.mod h1:nKE/iIaLqn2bQwXBg8f1g2Ylh6r5MN5CmZvuzZCgsCU=
-google.golang.org/genproto v0.0.0-20250204164813-702378808489 h1:nQcbCCOg2h2CQ0yA8SY3AHqriNKDvsetuq9mE/HFjtc=
-google.golang.org/genproto v0.0.0-20250204164813-702378808489/go.mod h1:wkQ2Aj/xvshAUDtO/JHvu9y+AaN9cqs28QuSVSHtZSY=
 google.golang.org/genproto v0.0.0-20250313205543-e70fdf4c4cb4 h1:kCjWYliqPA8g5z87mbjnf/cdgQqMzBfp9xYre5qKu2A=
 google.golang.org/genproto v0.0.0-20250313205543-e70fdf4c4cb4/go.mod h1:SqIx1NV9hcvqdLHo7uNZDS5lrUJybQ3evo3+z/WBfA0=
 google.golang.org/genproto/googleapis/api v0.0.0-20250313205543-e70fdf4c4cb4 h1:IFnXJq3UPB3oBREOodn1v1aGQeZYQclEmvWRMN0PSsY=
@@ -2541,7 +2492,6 @@ google.golang.org/grpc v1.56.3/go.mod h1:I9bI3vqKfayGqPUAwGdOSu7kt6oIJLixfffKrpX
 google.golang.org/grpc v1.71.0 h1:kF77BGdPTQ4/JZWMlb9VpJ5pa25aqvVqogsxNHHdeBg=
 google.golang.org/grpc v1.71.0/go.mod h1:H0GRtasmQOh9LkFoCPDu3ZrwUtD1YGE+b2vYBYd/8Ec=
 google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw=
-google.golang.org/grpc/stats/opentelemetry v0.0.0-20241014145745-ad81c20503be h1:2V/TCnE7eaRGA5ZsbhWPzzzcrUNfy3OC9YuUjc4MYII=
 google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8=
 google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0=
 google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM=
diff --git a/internal/cache/cache.go b/internal/cache/cache.go
index 7c422ee8..38eea718 100644
--- a/internal/cache/cache.go
+++ b/internal/cache/cache.go
@@ -15,9 +15,9 @@ import (
 
 // Cache - generic cache implementation
 type Cache[V any] struct {
-	Name  string
 	Cache map[string]V
 	Mutex *sync.RWMutex
+	Name  string
 }
 
 // NewCache - create new cache with generic type V
@@ -68,9 +68,9 @@ type ExpiringItem[V any] struct {
 
 // ExpiringCache - cache with items with expiration time
 type ExpiringCache[V any] struct {
-	Name  string
 	Cache map[string]ExpiringItem[V]
 	Mutex *sync.RWMutex
+	Name  string
 }
 
 // NewExpiringCache - create new cache with generic type V
diff --git a/internal/cas/cas.go b/internal/cas/cas.go
index 64bc3866..b4a3d95a 100644
--- a/internal/cas/cas.go
+++ b/internal/cas/cas.go
@@ -44,10 +44,10 @@ type CloneOptions struct {
 
 // CAS clones a git repository using content-addressable storage.
 type CAS struct {
+	cloneStart time.Time
 	store      *Store
 	git        *GitRunner
 	opts       Options
-	cloneStart time.Time
 }
 
 // New creates a new CAS instance with the given options
diff --git a/internal/cas/getter.go b/internal/cas/getter.go
index 765057fa..4e8ee902 100644
--- a/internal/cas/getter.go
+++ b/internal/cas/getter.go
@@ -15,10 +15,10 @@ var _ getter.Getter = &CASGetter{}
 
 // CASGetter is a go-getter Getter implementation.
 type CASGetter struct {
-	Detectors []getter.Detector
 	CAS       *CAS
 	Logger    *log.Logger
 	Opts      *CloneOptions
+	Detectors []getter.Detector
 }
 
 func NewCASGetter(l *log.Logger, cas *CAS, opts *CloneOptions) *CASGetter {
diff --git a/internal/cas/store.go b/internal/cas/store.go
index 544877fb..571d4521 100644
--- a/internal/cas/store.go
+++ b/internal/cas/store.go
@@ -9,8 +9,8 @@ import (
 
 // Store manages the store directory and locks to prevent concurrent writes
 type Store struct {
-	path    string
 	locks   map[string]*sync.Mutex
+	path    string
 	mapLock sync.Mutex
 }
 
diff --git a/internal/cli/app.go b/internal/cli/app.go
index ce151346..55e776b4 100644
--- a/internal/cli/app.go
+++ b/internal/cli/app.go
@@ -21,58 +21,60 @@ import (
 // `--terragrunt-non-interactive`, and define args `apply --auto-approve` which can be obtained from the App context,
 // ctx.Args().Slice()
 type App struct {
+	// AutocompleteInstaller supports autocompletion via the github.com/posener/complete
+	// library. This library supports bash, zsh and fish. To add support
+	// for other shells, please see that library.
+	AutocompleteInstaller AutocompleteInstaller
+
+	// FlagErrHandler processes any error encountered while parsing flags.
+	FlagErrHandler FlagErrHandlerFunc
+
+	// ExitErrHandler processes any error encountered while running an App before
+	// it is returned to the caller. If no function is provided, HandleExitCoder
+	// is used as the default behavior.
+	ExitErrHandler ExitErrHandlerFunc
+
 	*cli.App
-	// Examples is list of examples of using the App in the help.
-	Examples []string
-	// List of commands to execute
-	Commands Commands
-	// List of flags to parse
-	Flags Flags
-	// CustomAppVersionTemplate text template for app version topic.
-	CustomAppVersionTemplate string
-	// Contributor
-	Author string
-	// The function to call when checking for command completions
-	Complete CompleteFunc
-	// An action to execute before any subcommands are run, but after the context is ready
-	// If a non-nil error is returned, no subcommands are run
+
+	// Before is an action to execute before any subcommands are run, but after the context is ready.
 	Before ActionFunc
-	// An action to execute after any subcommands are run, but after the subcommand has finished
+
+	// After is an action to execute after
+	// any subcommands are run, but after the subcommand has finished.
 	After ActionFunc
-	// The action to execute when no subcommands are specified
+
+	// Complete is the function to call when checking for command completions.
+	Complete CompleteFunc
+
+	// Action is the action to execute when no subcommands are specified.
 	Action ActionFunc
+
 	// OsExiter is the function used when the app exits. If not set defaults to os.Exit.
 	OsExiter func(code int)
 
-	// ExitErrHandler processes any error encountered while running an App before
-	// it is returned to the caller. If no function is provided, HandleExitCoder
-	// is used as the default behavior.
-	ExitErrHandler ExitErrHandlerFunc
+	// Author is the author of the app.
+	Author string
 
-	// FlagErrHandler processes any error encountered while parsing flags.
-	FlagErrHandler FlagErrHandlerFunc
+	// CustomAppVersionTemplate is a text template for app version topic.
+	CustomAppVersionTemplate string
 
-	// Autocomplete enables or disables subcommand auto-completion support.
-	// This is enabled by default when NewApp is called. Otherwise, this
-	// must enabled explicitly.
-	//
-	// Autocomplete requires the "Name" option to be set on CLI. This name
-	// should be set exactly to the binary name that is autocompleted.
-	Autocomplete bool
+	// AutocompleteInstallFlag is the global flag name for installing the autocompletion handlers for the user's shell.
+	AutocompleteInstallFlag string
 
-	// AutocompleteInstallFlag and AutocompleteUninstallFlag are the global flag
-	// names for installing and uninstalling the autocompletion handlers
-	// for the user's shell. The flag should omit the hyphen(s) in front of
-	// the value. Both single and double hyphens will automatically be supported
-	// for the flag name. These default to `autocomplete-install` and
-	// `autocomplete-uninstall` respectively.
-	AutocompleteInstallFlag   string
+	// AutocompleteUninstallFlag is the global flag name for uninstalling the autocompletion handlers for the user's shell.
 	AutocompleteUninstallFlag string
 
-	// Autocompletion is supported via the github.com/posener/complete
-	// library. This library supports bash, zsh and fish. To add support
-	// for other shells, please see that library.
-	AutocompleteInstaller AutocompleteInstaller
+	// Commands is a list of commands to execute.
+	Commands Commands
+
+	// Flags is a list of flags to parse.
+	Flags Flags
+
+	// Examples is a list of examples of using the App in the help.
+	Examples []string
+
+	// Autocomplete enables or disables subcommand auto-completion support.
+	Autocomplete bool
 }
 
 // NewApp returns app new App instance.
diff --git a/internal/cli/bool_flag.go b/internal/cli/bool_flag.go
index 388f0f06..f91dcda9 100644
--- a/internal/cli/bool_flag.go
+++ b/internal/cli/bool_flag.go
@@ -13,28 +13,38 @@ var _ Flag = new(BoolFlag)
 type BoolFlag struct {
 	flag
 
-	// The name of the flag.
-	Name string
-	// The default value of the flag to display in the help, if it is empty, the value is taken from `Destination`.
-	DefaultText string
-	// A short usage description to display in help.
-	Usage string
-	// Aliases are usually used for the short flag name, like `-h`.
-	Aliases []string
-	// The names of the env variables that are parsed and assigned to `Destination` before the flag value.
-	EnvVars []string
 	// Action is a function that is called when the flag is specified. It is executed only after all command flags have been parsed.
 	Action FlagActionFunc[bool]
-	// FlagSetterFunc represents function type that is called when the flag is specified.
+
+	// Setter represents the function that is called when the flag is specified.
 	// Executed during value parsing, in case of an error the returned error is wrapped with the flag or environment variable name.
 	Setter FlagSetterFunc[bool]
+
 	// Destination ia a pointer to which the value of the flag or env var is assigned.
 	// It also uses as the default value displayed in the help.
 	Destination *bool
+
+	// Name is the name of the flag.
+	Name string
+
+	// DefaultText is the default value of the flag to display in the help, if it is empty, the value is taken from `Destination`.
+	DefaultText string
+
+	// Usage is a short usage description to display in help.
+	Usage string
+
+	// Aliases are usually used for the short flag name, like `-h`.
+	Aliases []string
+
+	// EnvVars are the names of the env variables that are parsed and assigned to `Destination` before the flag value.
+	EnvVars []string
+
+	// Negative inverts the value of the flag.
 	// If set to true, then the assigned flag value will be inverted.
 	// Example: With `Negative: true`, `--boolean-flag` sets the value to `false`, and `--boolean-flag=false` sets the value to `true`.
 	Negative bool
-	// Hidden hides the flag from the help, if set to true.
+
+	// Hidden hides the flag from the help.
 	Hidden bool
 }
 
diff --git a/internal/cli/command.go b/internal/cli/command.go
index 911b78b9..6671f11a 100644
--- a/internal/cli/command.go
+++ b/internal/cli/command.go
@@ -7,51 +7,73 @@ import (
 )
 
 type Command struct {
-	// Name is the command name.
-	Name string
-	// Aliases is a list of aliases for the command.
-	Aliases []string
-	// Usage is a short description of the usage of the command.
-	Usage string
-	// UsageText is custom text to show on the `Usage` section of help.
-	UsageText string
-	// Description is a longer explanation of how the command works.
-	Description string
-	// Examples is list of examples of using the command in the help.
-	Examples []string
 	// Category is the category the command belongs to.
 	Category *Category
-	// Flags is list of flags to parse.
-	Flags Flags
-	// ErrorOnUndefinedFlag causes the application to exit and return an error on any undefined flag.
-	ErrorOnUndefinedFlag bool
-	// Full name of cmd for help, defaults to full cmd name, including parent commands.
+
+	// Before is an action to execute before the command is invoked.
+	// If a non-nil error is returned, no further processing is done.
+	Before ActionFunc
+
+	// CustomHelp is a custom function to display help text.
+	CustomHelp HelpFunc
+
+	// After is the function to call after the command is invoked.
+	After ActionFunc
+
+	// Complete is the function to call for shell completion.
+	Complete CompleteFunc
+
+	// Action is the function to execute when the command is invoked.
+	// Runs after subcommands are finished.
+	Action ActionFunc
+
+	// Description is a longer explanation of how the command works.
+	Description string
+
+	// HelpName is the full name of the command for help.
+	// Defaults to the full command name, including parent commands.
 	HelpName string
-	// if this is a root "special" cmd
-	IsRoot bool
-	// Boolean to hide this cmd from help
-	Hidden bool
-	// CustomHelpTemplate the text template for the cmd help topic.
-	// cli.go uses text/template to render templates. You can
-	// render custom help text by setting this variable.
+
+	// Name is the command name.
+	Name string
+
+	// UsageText is custom text to show on the `Usage` section of the help.
+	UsageText string
+
+	// CustomHelpTemplate is a custom text template for the help topic.
 	CustomHelpTemplate string
-	// CustomHelp is a func that is executed when help for a command needs to be displayed.
-	CustomHelp HelpFunc
-	// List of child commands
+
+	// Usage is a short description of the usage for the command.
+	Usage string
+
+	// Flags is a list of flags to parse.
+	Flags Flags
+
+	// Examples is a list of examples for using the command in help.
+	Examples []string
+
+	// Subcommands is a list of subcommands.
 	Subcommands Commands
-	// Treat all flags as normal arguments if true
-	SkipFlagParsing bool
-	// Boolean to disable the parsing command, but it will still be shown in the help.
+
+	// Aliases is a list of aliases for the command.
+	Aliases []string
+
+	// IsRoot is true if this is a root "special" command.
+	// NOTE: The author of this comment doesn't know what this means.
+	IsRoot bool
+
+	// SkipRunning disables the parsing command, but it will
+	// still be shown in help.
 	SkipRunning bool
-	// The function to call when checking for command completions
-	Complete CompleteFunc
-	// An action to execute before any subcommands are run, but after the context is ready
-	// If a non-nil error is returned, no subcommands are run
-	Before ActionFunc
-	// An action to execute after any subcommands are run, but after the subcommand has finished
-	After ActionFunc
-	// The action to execute when no subcommands are specified
-	Action ActionFunc
+
+	// SkipFlagParsing treats all flags as normal arguments.
+	SkipFlagParsing bool
+
+	// Hidden hides the command from help.
+	Hidden bool
+
+	// ErrorOnUndefinedFlag causes the application to exit and return an error on any undefined flag.
+	ErrorOnUndefinedFlag bool
 }
 
 // Names returns the names including short names and aliases.
diff --git a/internal/cli/errors.go b/internal/cli/errors.go
index 7217f142..6fd26d45 100644
--- a/internal/cli/errors.go
+++ b/internal/cli/errors.go
@@ -27,8 +27,8 @@ func (err InvalidKeyValueError) Error() string {
 }
 
 type exitError struct {
-	exitCode ExitCode
 	err      error
+	exitCode ExitCode
 }
 
 func (ee *exitError) Unwrap() error {
diff --git a/internal/cli/flag.go b/internal/cli/flag.go
index 50d9109d..984dd29e 100644
--- a/internal/cli/flag.go
+++ b/internal/cli/flag.go
@@ -143,11 +143,11 @@ type Value interface {
 // flag is a common flag related to parsing flags in cli.
 type flagValue struct {
 	value            Value
-	multipleSet      bool
 	name             string
+	initialTextValue string
+	multipleSet      bool
 	hasBeenSet       bool
 	envHasBeenSet    bool
-	initialTextValue string
 	negative         bool
 }
 
diff --git a/internal/cli/generic_flag.go b/internal/cli/generic_flag.go
index dc11c816..6c42a372 100644
--- a/internal/cli/generic_flag.go
+++ b/internal/cli/generic_flag.go
@@ -19,24 +19,31 @@ type GenericType interface {
 type GenericFlag[T GenericType] struct {
 	flag
 
-	// The name of the flag.
-	Name string
-	// The default value of the flag to display in the help, if it is empty, the value is taken from `Destination`.
-	DefaultText string
-	// A short usage description to display in help.
-	Usage string
-	// Aliases are usually used for the short flag name, like `-h`.
-	Aliases []string
-	// The names of the env variables that are parsed and assigned to `Destination` before the flag value.
-	EnvVars []string
 	// Action is a function that is called when the flag is specified. It is executed only after all command flags have been parsed.
 	Action FlagActionFunc[T]
+
 	// Setter allows to set a value to any type by calling its `func(bool) error` function.
 	Setter FlagSetterFunc[T]
+
 	// Destination is a pointer to which the value of the flag or env var is assigned.
-	// It also uses as the default value displayed in the help.
 	Destination *T
-	// Hidden hides the flag from the help, if set to true.
+
+	// Name is the name of the flag.
+	Name string
+
+	// DefaultText is the default value of the flag to display in the help, if it is empty, the value is taken from `Destination`.
+	DefaultText string
+
+	// Usage is a short usage description to display in help.
+	Usage string
+
+	// Aliases are usually used for the short flag name, like `-h`.
+	Aliases []string
+
+	// EnvVars are the names of the env variables that are parsed and assigned to `Destination` before the flag value.
+	EnvVars []string
+
+	// Hidden hides the flag from the help.
 	Hidden bool
 }
 
diff --git a/internal/cli/map_flag.go b/internal/cli/map_flag.go
index ce3a1def..410e93b9 100644
--- a/internal/cli/map_flag.go
+++ b/internal/cli/map_flag.go
@@ -33,31 +33,40 @@ type MapFlagValueType interface {
 type MapFlag[K MapFlagKeyType, V MapFlagValueType] struct {
 	flag
 
-	// The name of the flag.
-	Name string
-	// The default value of the flag to display in the help, if it is empty, the value is taken from `Destination`.
-	DefaultText string
-	// A short usage description to display in help.
-	Usage string
-	// Aliases are usually used for the short flag name, like `-h`.
-	Aliases []string
+	// Splitter is a function that is called when the flag is specified. It is executed only after all command flags have been parsed.
+	Splitter SplitterFunc
+
 	// Action is a function that is called when the flag is specified. It is executed only after all command flags have been parsed.
 	Action FlagActionFunc[map[K]V]
-	// FlagSetterFunc represents function type that is called when the flag is specified.
-	// Executed during value parsing, in case of an error the returned error is wrapped with the flag or environment variable name.
+
+	// Setter represents the function that is called when the flag is specified.
 	Setter MapFlagSetterFunc[K, V]
-	// The names of the env variables that are parsed and assigned to `Destination` before the flag value.
-	EnvVars []string
+
 	// Destination is a pointer to which the value of the flag or env var is assigned.
-	// It also uses as the default value displayed in the help.
 	Destination *map[K]V
-	// The func used to split the EvnVar, by default `strings.Split`
-	Splitter SplitterFunc
-	// The EnvVarSep value is passed to the Splitter function as an argument to split the args.
+
+	// DefaultText is the default value of the flag to display in the help, if it is empty, the value is taken from `Destination`.
+	DefaultText string
+
+	// Usage is a short usage description to display in help.
+	Usage string
+
+	// Name is the name of the flag.
+	Name string
+
+	// EnvVarSep is the separator used to split the env var value.
 	EnvVarSep string
-	// The KeyValSep value is passed to the Splitter function as an argument to split `key` and `val` of the arg.
+
+	// KeyValSep is the separator used to split the key and value of the flag.
 	KeyValSep string
-	// Hidden hides the flag from the help, if set to true.
+
+	// Aliases are usually used for the short flag name, like `-h`.
+	Aliases []string
+
+	// EnvVars are the names of the env variables that are parsed and assigned to `Destination` before the flag value.
+	EnvVars []string
+
+	// Hidden hides the flag from the help.
 	Hidden bool
 }
 
@@ -154,12 +163,13 @@ func (flag *MapFlag[K, V]) RunAction(ctx *Context) error {
 var _ = Value(new(mapValue[string, string]))
 
 type mapValue[K, V comparable] struct {
-	values         *map[K]V
-	setter         MapFlagSetterFunc[K, V]
-	keyType        FlagVariable[K]
-	valType        FlagVariable[V]
-	argSep, valSep string
-	splitter       SplitterFunc
+	keyType  FlagVariable[K]
+	valType  FlagVariable[V]
+	values   *map[K]V
+	setter   MapFlagSetterFunc[K, V]
+	splitter SplitterFunc
+	argSep   string
+	valSep   string
 }
 
 func newMapValue[K, V comparable](keyType FlagVariable[K], valType FlagVariable[V], argSep, valSep string, splitter SplitterFunc, dest *map[K]V, setter MapFlagSetterFunc[K, V]) *mapValue[K, V] {
diff --git a/internal/cli/slice_flag.go b/internal/cli/slice_flag.go
index 6b85095e..abfdd8a3 100644
--- a/internal/cli/slice_flag.go
+++ b/internal/cli/slice_flag.go
@@ -23,29 +23,37 @@ type SliceFlagType interface {
 type SliceFlag[T SliceFlagType] struct {
 	flag
 
-	// The name of the flag.
-	Name string
-	// The default value of the flag to display in the help, if it is empty, the value is taken from `Destination`.
-	DefaultText string
-	// A short usage description to display in help.
-	Usage string
-	// Aliases are usually used for the short flag name, like `-h`.
-	Aliases []string
-	// The names of the env variables that are parsed and assigned to `Destination` before the flag value.
-	EnvVars []string
 	// Action is a function that is called when the flag is specified. It is executed only after all command flags have been parsed.
 	Action FlagActionFunc[[]T]
-	// FlagSetterFunc represents function type that is called when the flag is specified.
-	// Executed during value parsing, in case of an error the returned error is wrapped with the flag or environment variable name.
+
+	// Setter represents the function that is called when the flag is specified.
 	Setter FlagSetterFunc[T]
+
 	// Destination is a pointer to which the value of the flag or env var is assigned.
-	// It also uses as the default value displayed in the help.
 	Destination *[]T
-	// The func used to split the EvnVar, by default `strings.Split`
+
+	// Splitter represents the function that is called when the flag is specified.
 	Splitter SplitterFunc
-	// The EnvVarSep value is passed to the Splitter function as an argument.
+
+	// Name is the name of the flag.
+	Name string
+
+	// DefaultText is the default value of the flag to display in the help, if it is empty, the value is taken from `Destination`.
+	DefaultText string
+
+	// Usage is a short usage description to display in help.
+	Usage string
+
+	// EnvVarSep is the separator used to split the env var value.
 	EnvVarSep string
-	// Hidden hides the flag from the help, if set to true.
+
+	// Aliases are usually used for the short flag name, like `-h`.
+	Aliases []string
+
+	// EnvVars are the names of the env variables that are parsed and assigned to `Destination` before the flag value.
+	EnvVars []string
+
+	// Hidden hides the flag from the help.
 	Hidden bool
 }
 
diff --git a/internal/discovery/discovery.go b/internal/discovery/discovery.go
index 850e89ae..4692f163 100644
--- a/internal/discovery/discovery.go
+++ b/internal/discovery/discovery.go
@@ -53,23 +53,23 @@ type Discovery struct {
 	// workingDir is the directory to search for Terragrunt configurations.
 	workingDir string
 
-	// hidden determines whether to detect configurations in hidden directories.
-	hidden bool
-
 	// sort determines the sort order of the discovered configurations.
 	sort Sort
 
+	// hiddenDirMemo is a memoization of hidden directories.
+	hiddenDirMemo []string
+
+	// maxDependencyDepth is the maximum depth of the dependency tree to discover.
+	maxDependencyDepth int
+
+	// hidden determines whether to detect configurations in hidden directories.
+	hidden bool
+
 	// discoverDependencies determines whether to discover dependencies.
 	discoverDependencies bool
 
 	// discoverExternalDependencies determines whether to discover external dependencies.
 	discoverExternalDependencies bool
-
-	// maxDependencyDepth is the maximum depth of the dependency tree to discover.
-	maxDependencyDepth int
-
-	// hiddenDirMemo is a memoization of hidden directories.
-	hiddenDirMemo []string
 }
 
 // DiscoveryOption is a function that modifies a Discovery.
diff --git a/internal/os/exec/cmd.go b/internal/os/exec/cmd.go
index 1523e873..6ff7d6e9 100644
--- a/internal/os/exec/cmd.go
+++ b/internal/os/exec/cmd.go
@@ -18,15 +18,12 @@ import (
 
 // Cmd is a command type.
 type Cmd struct {
+	logger          log.Logger
+	interruptSignal os.Signal
 	*exec.Cmd
-
-	filename string
-
-	logger log.Logger
-	usePTY bool
-
+	filename           string
 	forwardSignalDelay time.Duration
-	interruptSignal    os.Signal
+	usePTY             bool
 }
 
 // Command returns the `Cmd` struct to execute the named program with
diff --git a/internal/strict/controls/control.go b/internal/strict/controls/control.go
index fb482ace..42f98f15 100644
--- a/internal/strict/controls/control.go
+++ b/internal/strict/controls/control.go
@@ -13,35 +13,33 @@ var _ = strict.Control(new(Control))
 
 // Control is the simplest implementation of the `strict.Control` interface.
 type Control struct {
+	// Error is the Error that will be returned when the Control is Enabled.
+	Error error
+
+	// Category is the category of the control.
+	Category *strict.Category
+
 	// Name is the name of the control.
 	Name string
 
 	// Description is the description of the control.
 	Description string
 
-	// Status of the strict Control.
-	Status strict.Status
-
-	// Enabled indicates whether the control is enabled.
-	Enabled bool
-
-	// Category is the category of the control.
-	// It is used to group controls by some name, like the command name
-	Category *strict.Category
+	// Warning is a Warning that will be logged when the Control is not Enabled.
+	Warning string
 
 	// Subcontrols are child controls.
-	// Child elements inherit parent behavior such as status and enabled state
 	Subcontrols strict.Controls
 
-	// Error is the Error that will be returned when the Control is Enabled.
-	Error error
-
-	// Warning is a Warning that will be logged when the Control is not Enabled.
-	Warning string
-
 	// OnceWarn is used to prevent the warning message from being displayed multiple times.
 	OnceWarn sync.Once
 
+	// Status of the strict Control.
+	Status strict.Status
+
+	// Enabled indicates whether the control is enabled.
+	Enabled bool
+
 	// Suppress suppresses the warning message from being displayed.
 	Suppress bool
 }
diff --git a/internal/strict/controls/deprecated_env_var.go b/internal/strict/controls/deprecated_env_var.go
index b1465041..4f8a786d 100644
--- a/internal/strict/controls/deprecated_env_var.go
+++ b/internal/strict/controls/deprecated_env_var.go
@@ -21,12 +21,11 @@ var _ = strict.Control(new(DeprecatedEnvVar))
 
 // DeprecatedEnvVar is strict control for deprecated environment variables.
 type DeprecatedEnvVar struct {
+	deprecatedFlag cli.Flag
+	newFlag        cli.Flag
 	*Control
 	ErrorFmt   string
 	WarningFmt string
-
-	deprecatedFlag cli.Flag
-	newFlag        cli.Flag
 }
 
 // NewDeprecatedEnvVar returns a new `DeprecatedEnvVar` instance.
diff --git a/internal/strict/controls/deprecated_flag_name.go b/internal/strict/controls/deprecated_flag_name.go
index 2f1361e8..72802d7a 100644
--- a/internal/strict/controls/deprecated_flag_name.go
+++ b/internal/strict/controls/deprecated_flag_name.go
@@ -21,12 +21,11 @@ var _ = strict.Control(new(DeprecatedFlagName))
 
 // DeprecatedFlagName is strict control for deprecated flag names.
 type DeprecatedFlagName struct {
+	deprecatedFlag cli.Flag
+	newFlag        cli.Flag
 	*Control
 	ErrorFmt   string
 	WarningFmt string
-
-	deprecatedFlag cli.Flag
-	newFlag        cli.Flag
 }
 
 func NewDeprecatedMovedFlagName(deprecatedFlag, newFlag cli.Flag, commandName string) *DeprecatedFlagName {
diff --git a/internal/view/diagnostic/diagnostic.go b/internal/view/diagnostic/diagnostic.go
index 6c521541..c8c92b5b 100644
--- a/internal/view/diagnostic/diagnostic.go
+++ b/internal/view/diagnostic/diagnostic.go
@@ -19,11 +19,11 @@ func (diags *Diagnostics) Contains(find *Diagnostic) bool {
 }
 
 type Diagnostic struct {
-	Severity DiagnosticSeverity `json:"severity"`
-	Summary  string             `json:"summary"`
-	Detail   string             `json:"detail"`
 	Range    *Range             `json:"range,omitempty"`
 	Snippet  *Snippet           `json:"snippet,omitempty"`
+	Summary  string             `json:"summary"`
+	Detail   string             `json:"detail"`
+	Severity DiagnosticSeverity `json:"severity"`
 }
 
 func NewDiagnostic(file *hcl.File, hclDiag *hcl.Diagnostic) *Diagnostic {
diff --git a/internal/view/diagnostic/function.go b/internal/view/diagnostic/function.go
index 0e8fa7db..d8a7ff90 100644
--- a/internal/view/diagnostic/function.go
+++ b/internal/view/diagnostic/function.go
@@ -15,11 +15,11 @@ type FunctionParam struct {
 	// Name is a name for the function which is used primarily for documentation purposes.
 	Name string `json:"name"`
 
-	// Type is a type constraint which is a static approximation of the possibly-dynamic type of the parameter
-	Type json.RawMessage `json:"type"`
-
 	Description     string `json:"description,omitempty"`
 	DescriptionKind string `json:"description_kind,omitempty"`
+
+	// Type is a type constraint which is a static approximation of the possibly-dynamic type of the parameter
+	Type json.RawMessage `json:"type"`
 }
 
 func DescribeFunctionParam(p *function.Parameter) FunctionParam {
@@ -39,17 +39,17 @@ func DescribeFunctionParam(p *function.Parameter) FunctionParam {
 
 // Function is a description of the JSON representation of the signature of a function callable from the Terraform language.
 type Function struct {
+	VariadicParam *FunctionParam `json:"variadic_param,omitempty"`
+
 	// Name is the leaf name of the function, without any namespace prefix.
 	Name string `json:"name"`
 
-	Params        []FunctionParam `json:"params"`
-	VariadicParam *FunctionParam  `json:"variadic_param,omitempty"`
+	Description     string          `json:"description,omitempty"`
+	DescriptionKind string          `json:"description_kind,omitempty"`
+	Params          []FunctionParam `json:"params"`
 
 	// ReturnType is type constraint which is a static approximation of the possibly-dynamic return type of the function.
 	ReturnType json.RawMessage `json:"return_type"`
-
-	Description     string `json:"description,omitempty"`
-	DescriptionKind string `json:"description_kind,omitempty"`
 }
 
 // DescribeFunction returns a description of the signature of the given cty function, as a pointer to this package's serializable type Function.
@@ -91,11 +91,11 @@ func DescribeFunction(name string, f function.Function) *Function {
 
 // FunctionCall represents a function call whose information is being included as part of a diagnostic snippet.
 type FunctionCall struct {
+	// Signature is a description of the signature of the function that was/ called, if any.:
+	Signature *Function `json:"signature,omitempty"`
+
 	// CalledAs is the full name that was used to call this function, potentially including namespace prefixes if the function does not belong to the default function namespace.
 	CalledAs string `json:"called_as"`
-
-	// Signature is a description of the signature of the function that was/ called, if any.
-	Signature *Function `json:"signature,omitempty"`
 }
 
 func DescribeFunctionCall(hclDiag *hcl.Diagnostic) *FunctionCall {
diff --git a/internal/view/diagnostic/snippet.go b/internal/view/diagnostic/snippet.go
index a527e2d7..45c10acd 100644
--- a/internal/view/diagnostic/snippet.go
+++ b/internal/view/diagnostic/snippet.go
@@ -10,12 +10,18 @@ import (
 
 // Snippet represents source code information about the diagnostic.
 type Snippet struct {
+	// FunctionCall is information about a function call whose failure is being reported by this diagnostic, if any.
+	FunctionCall *FunctionCall `json:"function_call,omitempty"`
+
 	// Context is derived from HCL's hcled.ContextString output. This gives a high-level summary of the root context of the diagnostic.
 	Context string `json:"context"`
 
-	// Code is a possibly-multi-line string of Terraform configuration, which includes both the diagnostic source and any relevant context as defined by the diagnostic.
+	// Code is a possibly-multi-line string of OpenTofu/Terraform configuration, which includes both the diagnostic source and any relevant context as defined by the diagnostic.
 	Code string `json:"code"`
 
+	// Values is a sorted slice of expression values which may be useful in understanding the source of an error in a complex expression.
+	Values []ExpressionValue `json:"values"`
+
 	// StartLine is the line number in the source file for the first line of the snippet code block.
 	StartLine int `json:"start_line"`
 
@@ -24,12 +30,6 @@ type Snippet struct {
 
 	// HighlightEndOffset is the character offset into Code at which the diagnostic source range ends.
 	HighlightEndOffset int `json:"highlight_end_offset"`
-
-	// Values is a sorted slice of expression values which may be useful in understanding the source of an error in a complex expression.
-	Values []ExpressionValue `json:"values"`
-
-	// FunctionCall is information about a function call whose failure is being reported by this diagnostic, if any.
-	FunctionCall *FunctionCall `json:"function_call,omitempty"`
 }
 
 func NewSnippet(file *hcl.File, hclDiag *hcl.Diagnostic, highlightRange hcl.Range) *Snippet {
diff --git a/options/options.go b/options/options.go
index 66b44133..d0d69e42 100644
--- a/options/options.go
+++ b/options/options.go
@@ -89,325 +89,197 @@ const (
 
 // TerragruntOptions represents options that configure the behavior of the Terragrunt program
 type TerragruntOptions struct {
-	// Location of the Terragrunt config file
-	TerragruntConfigPath string
-
-	TerragruntStackConfigPath string
-
-	// Location of the original Terragrunt config file. This is primarily useful when one Terragrunt config is being
-	// read from another: e.g., if /terraform-code/terragrunt.hcl calls read_terragrunt_config("/foo/bar.hcl"),
-	// and within bar.hcl, you call get_original_terragrunt_dir(), you'll get back /terraform-code.
-	OriginalTerragruntConfigPath string
-
+	// Logger is an interface for logging events.
+	Logger log.Logger `clone:"shadowcopy"`
+	// If you want stdout to go somewhere other than os.stdout
+	Writer io.Writer
+	// If you want stderr to go somewhere other than os.stderr
+	ErrWriter io.Writer
 	// Version of terragrunt
 	TerragruntVersion *version.Version `clone:"shadowcopy"`
-
-	// Location of the terraform binary
-	TerraformPath string
-
-	// Current Terraform command being executed by Terragrunt
-	TerraformCommand string
-
-	// Original Terraform command being executed by Terragrunt. Used to track command evolution as terragrunt chains
-	// different commands together. For example, when retrieving dependencies, terragrunt will change the
-	// TerraformCommand to `output` to run `terraform output`, which loses the context of the original command that was
-	// run to fetch the dependency. This is a problem when mock_outputs is configured and we only allow mocks to be
-	// returned on specific commands.
-	// NOTE: For `xxx-all` commands, this will be set to the Terraform command, which would be `xxx`. For example,
-	// if you run `apply-all` (which is a terragrunt command), this variable will be set to `apply`.
-	OriginalTerraformCommand string
-
-	// Terraform implementation tool (e.g. terraform, tofu) that terragrunt is wrapping
-	TerraformImplementation TerraformImplementationType
-
+	// FeatureFlags is a map of feature flags to enable.
+	FeatureFlags *xsync.MapOf[string, string] `clone:"shadowcopy"`
+	// Options to use engine for running IaC operations.
+	Engine *EngineOptions
+	// Attributes to override in AWS provider nested within modules as part of the aws-provider-patch command.
+	AwsProviderPatchOverrides map[string]string
+	// A command that can be used to run Terragrunt with the given options.
+	RunTerragrunt func(ctx context.Context, opts *TerragruntOptions) error
 	// Version of terraform (obtained by running 'terraform version')
 	TerraformVersion *version.Version `clone:"shadowcopy"`
-
-	// Whether we should prompt the user for confirmation or always assume "yes"
-	NonInteractive bool
-
-	// Whether we should automatically run terraform init if necessary when executing other commands
-	AutoInit bool
-
-	// Whether we should automatically run terraform with -auto-apply in run-all mode.
-	RunAllAutoApprove bool
-
-	// CLI args that are intended for Terraform (i.e. all the CLI args except the --terragrunt ones)
-	TerraformCliArgs cli.Args
-
-	// The working directory in which to run Terraform
-	WorkingDir string
-
-	// Unlike `WorkingDir`, this path is the same for all dependencies and points to the root working directory specified in the CLI.
-	RootWorkingDir string
-
-	// Logger is an interface for logging events.
-	Logger log.Logger `clone:"shadowcopy"`
-
-	// Output Terragrunt logs in JSON format
-	JSONLogFormat bool
-
-	// Disable replacing full paths in logs with short relative paths
-	LogShowAbsPaths bool
-
-	// If true, logs will be displayed in formatter key/value, by default logs are formatted in human-readable formatter.
-	DisableLogFormatting bool
-
-	// ValidateStrict mode for the validate-inputs command
-	ValidateStrict bool
-
+	// ReadFiles is a map of files to the Units that read them using HCL functions in the unit.
+	ReadFiles *xsync.MapOf[string, []string] `clone:"shadowcopy"`
+	// Errors is a configuration for error handling.
+	Errors *ErrorsConfig
+	// Map to replace terraform source locations.
+	SourceMap map[string]string
 	// Environment variables at runtime
 	Env map[string]string
-
-	// Download Terraform configurations from the specified source location into a temporary folder and run
-	// Terraform in that temporary folder
+	// IAM Role options that should be used when authenticating to AWS.
+	IAMRoleOptions IAMRoleOptions
+	// IAM Role options set from command line.
+	OriginalIAMRoleOptions IAMRoleOptions
+	// The Token for authentication to the Terragrunt Provider Cache server.
+	ProviderCacheToken string
+	// Current Terraform command being executed by Terragrunt
+	TerraformCommand string
+	// StackOutputFormat format how the stack output is rendered.
+	StackOutputFormat         string
+	TerragruntStackConfigPath string
+	// Location of the original Terragrunt config file.
+	OriginalTerragruntConfigPath string
+	// Unlike `WorkingDir`, this path is the same for all dependencies and points to the root working directory specified in the CLI.
+	RootWorkingDir string
+	// Download Terraform configurations from the specified source location into a temporary folder
 	Source string
-
-	// Map to replace terraform source locations. This will replace occurrences of the given source with the target
-	// value.
-	SourceMap map[string]string
-
-	// If set to true, delete the contents of the temporary folder before downloading Terraform source code into it
-	SourceUpdate bool
-
+	// The working directory in which to run Terraform
+	WorkingDir string
+	// Location of the terraform binary
+	TerraformPath string
 	// Download Terraform configurations specified in the Source parameter into this folder
 	DownloadDir string
-
-	// IAM Role options set from command line. This is used to differentiate between the options set from the config and
-	// CLI.
-	OriginalIAMRoleOptions IAMRoleOptions
-
-	// IAM Role options that should be used when authenticating to AWS.
-	IAMRoleOptions IAMRoleOptions
-
-	// If set to true, continue running *-all commands even if a dependency has errors. This is mostly useful for 'output-all <some_variable>'. See https://github.com/gruntwork-io/terragrunt/issues/193
-	IgnoreDependencyErrors bool
-
-	// If set to true, ignore the dependency order when running *-all command.
-	IgnoreDependencyOrder bool
-
-	// If set to true, skip any external dependencies when running *-all commands
-	IgnoreExternalDependencies bool
-
-	// If set to true, apply all external dependencies when running *-all commands
-	IncludeExternalDependencies bool
-
-	// If you want stdout to go somewhere other than os.stdout
-	Writer io.Writer
-
-	// If you want stderr to go somewhere other than os.stderr
-	ErrWriter io.Writer
-
-	// When searching the directory tree, this is the max folders to check before exiting with an error. This is
-	// exposed here primarily so we can set it to a low value at test time.
-	MaxFoldersToCheck int
-
-	// Whether we should automatically retry errored Terraform commands
-	AutoRetry bool
-
-	// Maximum number of times to retry errors matching RetryableErrors
-	RetryMaxAttempts int
-
-	// The duration in seconds to wait before retrying
-	RetrySleepInterval time.Duration
-
-	// RetryableErrors is an array of regular expressions with RE2 syntax (https://github.com/google/re2/wiki/Syntax) that qualify for retrying
-	RetryableErrors []string
-
-	// Path to a file with a list of directories that need  to be excluded when running *-all commands.
+	// Original Terraform command being executed by Terragrunt.
+	OriginalTerraformCommand string
+	// Terraform implementation tool (e.g. terraform, tofu) that terragrunt is wrapping
+	TerraformImplementation TerraformImplementationType
+	// The file path that terragrunt should use when rendering the terragrunt.hcl config as json.
+	JSONOut string
+	// The path to store unpacked providers.
+	ProviderCacheDir string
+	// Custom log level for engine
+	EngineLogLevel string
+	// Path to cache directory for engine files
+	EngineCachePath string
+	// The command and arguments that can be used to fetch authentication configurations.
+	AuthProviderCmd string
+	// Folder to store JSON representation of output files.
+	JSONOutputFolder string
+	// Folder to store output files.
+	OutputFolder string
+	// The file which hclfmt should be specifically run on
+	HclFile string
+	// The hostname of the Terragrunt Provider Cache server.
+	ProviderCacheHostname string
+	// Location of the Terragrunt config file
+	TerragruntConfigPath string
+	// Name of the root Terragrunt configuration file, if used.
+	ScaffoldRootFileName string
+	// Path to a file with a list of directories that need to be excluded when running *-all commands.
 	ExcludesFile string
-
-	// Unix-style glob of directories to exclude when running *-all commands
-	ExcludeDirs []string
-
+	// Path to folder of scaffold output
+	ScaffoldOutputFolder string
+	// Root directory for graph command.
+	GraphRoot string
+	// CLI args that are intended for Terraform (i.e. all the CLI args except the --terragrunt ones)
+	TerraformCliArgs cli.Args
 	// Unix-style glob of directories to include when running *-all commands
 	IncludeDirs []string
-
-	// If set to true, exclude all directories by default when running *-all commands
-	// Is set automatically if IncludeDirs is set
-	ExcludeByDefault bool
-
-	// If set to true, do not include dependencies when processing IncludeDirs (unless they are in the included dirs)
-	StrictInclude bool
-
-	// Parallelism limits the number of commands to run concurrently during *-all commands
-	Parallelism int
-
-	// Enable check mode, by default it's disabled.
-	Check bool
-
-	// Show diff, by default it's disabled.
-	Diff bool
-
-	// The file which hclfmt should be specifically run on
-	HclFile string
-
+	// Unix-style glob of directories to exclude when running *-all commands
+	ExcludeDirs []string
+	// RetryableErrors is an array of regular expressions with RE2 syntax that qualify for retrying
+	RetryableErrors []string
+	// Files with variables to be used in modules scaffolding.
+	ScaffoldVarFiles []string
+	// The list of remote registries to cached by Terragrunt Provider Cache server.
+	ProviderCacheRegistryNames []string
 	// If set hclfmt will skip files in given directories.
 	HclExclude []string
-
-	// If True then HCL from StdIn must should be formatted.
-	HclFromStdin bool
-
-	// The file path that terragrunt should use when rendering the terragrunt.hcl config as json.
-	JSONOut string
-
-	// When used with `run-all`, restrict the modules in the stack to only those that include at least one of the files
-	// in this list.
+	// Variables for usage in scaffolding.
+	ScaffoldVars []string
+	// StrictControls is a slice of strict controls.
+	StrictControls strict.Controls `clone:"shadowcopy"`
+	// When used with `run-all`, restrict the modules in the stack to only those that include at least one of the files in this list.
 	ModulesThatInclude []string
-
-	// When used with `run-all`, restrict the units in the stack to only those that read at least one of the files
-	// in this list.
+	// When used with `run-all`, restrict the units in the stack to only those that read at least one of the files in this list.
 	UnitsReading []string
-
-	// A command that can be used to run Terragrunt with the given options. This is useful for running Terragrunt
-	// multiple times (e.g. when spinning up a stack of Terraform modules). The actual command is normally defined
-	// in the cli package, which depends on almost all other packages, so we declare it here so that other
-	// packages can use the command without a direct reference back to the cli package (which would create a
-	// circular dependency).
-	RunTerragrunt func(ctx context.Context, opts *TerragruntOptions) error
-
-	// True if terragrunt should run in debug mode, writing terragrunt-debug.tfvars to working folder to help
-	// root-cause issues.
+	// Experiments is a map of experiments, and their status.
+	Experiments experiment.Experiments `clone:"shadowcopy"`
+	// Maximum number of times to retry errors matching RetryableErrors
+	RetryMaxAttempts int
+	// Parallelism limits the number of commands to run concurrently during *-all commands
+	Parallelism int
+	// When searching the directory tree, this is the max folders to check before exiting with an error.
+	MaxFoldersToCheck int
+	// The port of the Terragrunt Provider Cache server.
+	ProviderCachePort int
+	// The duration in seconds to wait before retrying
+	RetrySleepInterval time.Duration
+	// Output Terragrunt logs in JSON format
+	JSONLogFormat bool
+	// True if terragrunt should run in debug mode
 	Debug bool
-
-	// Attributes to override in AWS provider nested within modules as part of the aws-provider-patch command. See that
-	// command for more info.
-	AwsProviderPatchOverrides map[string]string
-
-	// True if is required to show dependent modules and confirm action
-	CheckDependentModules bool
-
-	// True if is required not to show dependent modules and confirm action
-	NoDestroyDependenciesCheck bool
-
-	// This is an experimental feature, used to speed up dependency processing by getting the output from the state
-	FetchDependencyOutputFromState bool
-
-	// Enables caching of includes during partial parsing operations.
-	UsePartialParseConfigCache bool
-
-	// Include fields metadata in render-json
-	RenderJSONWithMetadata bool
-
 	// Disable TF output formatting
 	ForwardTFStdout bool
-
 	// Fail execution if is required to create S3 bucket
 	FailIfBucketCreationRequired bool
-
 	// Controls if s3 bucket should be updated or skipped
 	DisableBucketUpdate bool
-
 	// Disables validation terraform command
 	DisableCommandValidation bool
-
-	// Variables for usage in scaffolding.
-	ScaffoldVars []string
-
-	// Files with variables to be used in modules scaffolding.
-	ScaffoldVarFiles []string
-
+	// If True then HCL from StdIn must should be formatted.
+	HclFromStdin bool
+	// Show diff, by default it's disabled.
+	Diff bool
 	// Do not include root unit in scaffolding.
 	ScaffoldNoIncludeRoot bool
-
-	// Name of the root Terragrunt configuration file, if used.
-	ScaffoldRootFileName string
-
-	// Path to folder of scaffold output
-	ScaffoldOutputFolder string
-
-	// Root directory for graph command.
-	GraphRoot string
-
+	// Enable check mode, by default it's disabled.
+	Check bool
+	// Enables caching of includes during partial parsing operations.
+	UsePartialParseConfigCache bool
+	// If set to true, do not include dependencies when processing IncludeDirs
+	StrictInclude bool
 	// Disable listing of dependent modules in render json output
 	JSONDisableDependentModules bool
-
 	// Enables Terragrunt's provider caching.
 	ProviderCache bool
-
-	// The path to store unpacked providers. The file structure is the same as terraform plugin cache dir.
-	ProviderCacheDir string
-
-	// The Token for authentication to the Terragrunt Provider Cache server.
-	ProviderCacheToken string
-
-	// The hostname of the Terragrunt Provider Cache server.
-	ProviderCacheHostname string
-
-	// The port of the Terragrunt Provider Cache server.
-	ProviderCachePort int
-
-	// The list of remote registries to cached by Terragrunt Provider Cache server.
-	ProviderCacheRegistryNames []string
-
-	// Folder to store output files.
-	OutputFolder string
-
-	// Folder to store JSON representation of output files.
-	JSONOutputFolder string
-
-	// The command and arguments that can be used to fetch authentication configurations.
-	// Terragrunt invokes this command before running tofu/terraform operations for each working directory.
-	AuthProviderCmd string
-
-	// Allows to skip the output of all dependencies. Intended for use with `hclvalidate` command.
-	SkipOutput bool
-
+	// If set to true, exclude all directories by default when running *-all commands
+	ExcludeByDefault bool
+	// This is an experimental feature, used to speed up dependency processing by getting the output from the state
+	FetchDependencyOutputFromState bool
+	// True if is required to show dependent modules and confirm action
+	CheckDependentModules bool
+	// True if is required not to show dependent modules and confirm action
+	NoDestroyDependenciesCheck bool
+	// Include fields metadata in render-json
+	RenderJSONWithMetadata bool
+	// Whether we should automatically retry errored Terraform commands
+	AutoRetry bool
 	// Flag to enable engine for running IaC operations.
 	EngineEnabled bool
-
-	// Path to cache directory for engine files
-	EngineCachePath string
-
+	// Whether we should automatically run terraform init if necessary when executing other commands
+	AutoInit bool
+	// Allows to skip the output of all dependencies.
+	SkipOutput bool
+	// Whether we should prompt the user for confirmation or always assume "yes"
+	NonInteractive bool
+	// If set to true, apply all external dependencies when running *-all commands
+	IncludeExternalDependencies bool
 	// Skip checksum check for engine package.
 	EngineSkipChecksumCheck bool
-
-	// Custom log level for engine
-	EngineLogLevel string
-
-	// Options to use engine for running IaC operations.
-	Engine *EngineOptions
-
-	// StrictControls is a slice of strict controls.
-	StrictControls strict.Controls `clone:"shadowcopy"`
-
-	// Experiments is a map of experiments, and their status.
-	Experiments experiment.Experiments `clone:"shadowcopy"`
-
-	// ]FeatureFlags is a map of feature flags to enable.
-	FeatureFlags *xsync.MapOf[string, string] `clone:"shadowcopy"`
-
-	// ReadFiles is a map of files to the Units
-	// that read them using HCL functions in the unit.
-	ReadFiles *xsync.MapOf[string, []string] `clone:"shadowcopy"`
-
-	// Errors is a configuration for error handling.
-	Errors *ErrorsConfig
-
-	// Headless is set when Terragrunt is running in
-	// headless mode. In this mode, Terragrunt will not
-	// return stdout/stderr directly to the caller.
-	//
-	// It will instead write the output to INFO,
-	// as it's not something intended for a user
-	// to use in a programmatic way.
+	// If set to true, skip any external dependencies when running *-all commands
+	IgnoreExternalDependencies bool
+	// If set to true, ignore the dependency order when running *-all command.
+	IgnoreDependencyOrder bool
+	// If set to true, continue running *-all commands even if a dependency has errors.
+	IgnoreDependencyErrors bool
+	// Whether we should automatically run terraform with -auto-apply in run-all mode.
+	RunAllAutoApprove bool
+	// If set to true, delete the contents of the temporary folder before downloading Terraform source code into it
+	SourceUpdate bool
+	// ValidateStrict mode for the validate-inputs command
+	ValidateStrict bool
+	// If true, logs will be displayed in formatter key/value, by default logs are formatted in human-readable formatter.
+	DisableLogFormatting bool
+	// Headless is set when Terragrunt is running in headless mode.
 	Headless bool
-
 	// LogDisableErrorSummary is a flag to skip the error summary
-	// provided at the end of Terragrunt execution to
-	// recap all that was emitted in stderr throughout
-	// the run of an orchestrated process.
 	LogDisableErrorSummary bool
-
-	// StackOutputFormat format how the stack output is rendered.
-	StackOutputFormat string
-
+	// Disable replacing full paths in logs with short relative paths
+	LogShowAbsPaths bool
 	// NoStackGenerate disable stack generation.
 	NoStackGenerate bool
-
 	// RunAll runs the provided OpenTofu/Terraform command against a stack.
 	RunAll bool
-
 	// Graph runs the provided OpenTofu/Terraform against the graph of dependencies for the unit in the current working directory.
 	Graph bool
 }
@@ -431,17 +303,10 @@ func WithIAMWebIdentityToken(token string) TerragruntOptionsFunc {
 
 // IAMRoleOptions represents options that are used by Terragrunt to assume an IAM role.
 type IAMRoleOptions struct {
-	// The ARN of an IAM Role to assume. Used when accessing AWS, both internally and through terraform.
-	RoleARN string
-
-	// The Web identity token. Used when RoleArn is also set to use AssumeRoleWithWebIdentity instead of AssumeRole.
-	WebIdentityToken string
-
-	// Duration of the STS Session when assuming the role.
-	AssumeRoleDuration int64
-
-	// STS Session name when assuming the role.
+	RoleARN               string
+	WebIdentityToken      string
 	AssumeRoleSessionName string
+	AssumeRoleDuration    int64
 }
 
 func MergeIAMRoleOptions(target IAMRoleOptions, source IAMRoleOptions) IAMRoleOptions {
@@ -771,10 +636,10 @@ func identifyDefaultWrappedExecutable() string {
 
 // EngineOptions Options for the Terragrunt engine.
 type EngineOptions struct {
+	Meta    map[string]any
 	Source  string
 	Version string
 	Type    string
-	Meta    map[string]any
 }
 
 // ErrorsConfig extracted errors handling configuration.
@@ -793,10 +658,10 @@ type RetryConfig struct {
 
 // IgnoreConfig represents the configuration for ignoring specific errors.
 type IgnoreConfig struct {
+	Signals         map[string]any
 	Name            string
-	IgnorableErrors []*ErrorsPattern
 	Message         string
-	Signals         map[string]any
+	IgnorableErrors []*ErrorsPattern
 }
 
 type ErrorsPattern struct {
@@ -889,13 +754,13 @@ func (opts *TerragruntOptions) handleIgnoreSignals(signals map[string]any) error
 
 // ErrorAction represents the action to take when an error occurs
 type ErrorAction struct {
-	ShouldIgnore   bool
-	ShouldRetry    bool
-	IgnoreMessage  string
 	IgnoreSignals  map[string]any
+	IgnoreMessage  string
 	RetryMessage   string
 	RetryAttempts  int
 	RetrySleepSecs int
+	ShouldIgnore   bool
+	ShouldRetry    bool
 }
 
 // ProcessError evaluates an error against the configuration and returns the appropriate action
diff --git a/pkg/log/format/formatter.go b/pkg/log/format/formatter.go
index 4511355e..296723a1 100644
--- a/pkg/log/format/formatter.go
+++ b/pkg/log/format/formatter.go
@@ -14,12 +14,12 @@ import (
 var _ log.Formatter = new(Formatter)
 
 type Formatter struct {
+	relativePather *options.RelativePather
 	baseDir        string
 	placeholders   placeholders.Placeholders
+	mu             sync.Mutex
 	disabledColors bool
 	disabledOutput bool
-	relativePather *options.RelativePather
-	mu             sync.Mutex
 }
 
 // NewFormatter returns a new Formatter instance with default values.
diff --git a/pkg/log/format/options/common.go b/pkg/log/format/options/common.go
index b47c44ff..5014384b 100644
--- a/pkg/log/format/options/common.go
+++ b/pkg/log/format/options/common.go
@@ -11,8 +11,8 @@ import (
 )
 
 type CommonOption[T comparable] struct {
-	name  string
 	value OptionValue[T]
+	name  string
 }
 
 // NewCommonOption creates a new Common option.
diff --git a/pkg/log/format/options/errors.go b/pkg/log/format/options/errors.go
index 1b284ab5..dd308cbf 100644
--- a/pkg/log/format/options/errors.go
+++ b/pkg/log/format/options/errors.go
@@ -57,9 +57,9 @@ func (err InvalidOptionNameError) Error() string {
 
 // InvalidOptionValueError is an invalid `option` value error.
 type InvalidOptionValueError struct {
-	val string
 	opt Option
 	err error
+	val string
 }
 
 // NewInvalidOptionValueError returns a new `InvalidOptionValueError` instance.
diff --git a/pkg/log/format/options/option.go b/pkg/log/format/options/option.go
index 620cbc2f..007c0c0c 100644
--- a/pkg/log/format/options/option.go
+++ b/pkg/log/format/options/option.go
@@ -43,10 +43,10 @@ type Option interface {
 // Data is a log entry data.
 type Data struct {
 	*log.Entry
-	BaseDir        string
-	DisabledColors bool
 	RelativePather *RelativePather
 	PresetColorFn  func() ColorValue
+	BaseDir        string
+	DisabledColors bool
 }
 
 // Options is a set of Options.
diff --git a/pkg/log/formatter.go b/pkg/log/formatter.go
index 7bc2ea7c..c110d60a 100644
--- a/pkg/log/formatter.go
+++ b/pkg/log/formatter.go
@@ -39,8 +39,8 @@ type Formatter interface {
 // Entry is the final logging entry.
 type Entry struct {
 	*logrus.Entry
-	Level  Level
 	Fields Fields
+	Level  Level
 }
 
 // fromLogrusFormatter converts call from logrus.Formatter interface to our long.Formatter interface.
diff --git a/pkg/log/writer/writer.go b/pkg/log/writer/writer.go
index f349681f..dd5ac9e3 100644
--- a/pkg/log/writer/writer.go
+++ b/pkg/log/writer/writer.go
@@ -14,9 +14,9 @@ type WriterParseFunc func(str string) (msg string, time *time.Time, level *log.L
 // Writer redirects Write requests to configured logger and level
 type Writer struct {
 	logger       log.Logger
-	defaultLevel log.Level
-	msgSeparator string
 	parseFunc    WriterParseFunc
+	msgSeparator string
+	defaultLevel log.Level
 }
 
 // New returns a new Writer instance with fields assigned to default values.
diff --git a/remote/remote_encryption.go b/remote/remote_encryption.go
index 73f20097..baf734ab 100644
--- a/remote/remote_encryption.go
+++ b/remote/remote_encryption.go
@@ -89,10 +89,10 @@ func NewRemoteEncryptionKeyProvider(providerType string) (RemoteEncryptionConfig
 type RemoteEncryptionKeyProviderPBKDF2 struct {
 	RemoteEncryptionKeyProviderBase `mapstructure:",squash"`
 	Passphrase                      string `mapstructure:"passphrase"`
+	HashFunction                    string `mapstructure:"hash_function"`
 	KeyLength                       int    `mapstructure:"key_length"`
 	Iterations                      int    `mapstructure:"iterations"`
 	SaltLength                      int    `mapstructure:"salt_length"`
-	HashFunction                    string `mapstructure:"hash_function"`
 }
 
 type RemoteEncryptionKeyProviderAWSKMS struct {
diff --git a/remote/remote_state.go b/remote/remote_state.go
index 7a30fb97..43589197 100644
--- a/remote/remote_state.go
+++ b/remote/remote_state.go
@@ -18,18 +18,18 @@ const initializedRemoteStateCacheName = "initializedRemoteStateCache"
 // RemoteState is the configuration for Terraform remote state
 // NOTE: If any attributes are added here, be sure to add it to remoteStateAsCty in config/config_as_cty.go
 type RemoteState struct {
-	Backend                       string               `mapstructure:"backend" json:"Backend"`
-	DisableInit                   bool                 `mapstructure:"disable_init" json:"DisableInit"`
-	DisableDependencyOptimization bool                 `mapstructure:"disable_dependency_optimization" json:"DisableDependencyOptimization"`
 	Generate                      *RemoteStateGenerate `mapstructure:"generate" json:"Generate"`
 	Config                        map[string]any       `mapstructure:"config" json:"Config"`
 	Encryption                    map[string]any       `mapstructure:"encryption" json:"Encryption"`
+	Backend                       string               `mapstructure:"backend" json:"Backend"`
+	DisableInit                   bool                 `mapstructure:"disable_init" json:"DisableInit"`
+	DisableDependencyOptimization bool                 `mapstructure:"disable_dependency_optimization" json:"DisableDependencyOptimization"`
 }
 
 // map to store mutexes for each state bucket action
 type stateAccess struct {
-	mapAccess   sync.Mutex
 	bucketLocks map[string]*sync.Mutex
+	mapAccess   sync.Mutex
 }
 
 var stateAccessLock = newStateAccess()
diff --git a/remote/remote_state_gcs.go b/remote/remote_state_gcs.go
index 9c298ca8..df84b5c8 100644
--- a/remote/remote_state_gcs.go
+++ b/remote/remote_state_gcs.go
@@ -32,14 +32,13 @@ import (
  * has to create them.
  */
 type ExtendedRemoteStateConfigGCS struct {
-	remoteStateConfigGCS RemoteStateConfigGCS
-
+	GCSBucketLabels        map[string]string `mapstructure:"gcs_bucket_labels"`
 	Project                string            `mapstructure:"project"`
 	Location               string            `mapstructure:"location"`
-	GCSBucketLabels        map[string]string `mapstructure:"gcs_bucket_labels"`
-	SkipBucketVersioning   bool              `mapstructure:"skip_bucket_versioning"`
-	SkipBucketCreation     bool              `mapstructure:"skip_bucket_creation"`
-	EnableBucketPolicyOnly bool              `mapstructure:"enable_bucket_policy_only"`
+	remoteStateConfigGCS   RemoteStateConfigGCS
+	SkipBucketVersioning   bool `mapstructure:"skip_bucket_versioning"`
+	SkipBucketCreation     bool `mapstructure:"skip_bucket_creation"`
+	EnableBucketPolicyOnly bool `mapstructure:"enable_bucket_policy_only"`
 }
 
 // These are settings that can appear in the remote_state config that are ONLY used by Terragrunt and NOT forwarded
diff --git a/remote/remote_state_s3.go b/remote/remote_state_s3.go
index 3b44b942..3ab931ce 100644
--- a/remote/remote_state_s3.go
+++ b/remote/remote_state_s3.go
@@ -41,30 +41,29 @@ const (
  * access logs, in case it has to create them.
  */
 type ExtendedRemoteStateConfigS3 struct {
-	RemoteStateConfigS3 RemoteStateConfigS3 `mapstructure:",squash"`
-
-	S3BucketTags                                 map[string]string `mapstructure:"s3_bucket_tags"`
-	DynamotableTags                              map[string]string `mapstructure:"dynamodb_table_tags"`
-	AccessLoggingBucketTags                      map[string]string `mapstructure:"accesslogging_bucket_tags"`
-	SkipCredentialsValidation                    bool              `mapstructure:"skip_credentials_validation"`
-	SkipBucketVersioning                         bool              `mapstructure:"skip_bucket_versioning"`
-	SkipBucketSSEncryption                       bool              `mapstructure:"skip_bucket_ssencryption"`
-	SkipBucketAccessLogging                      bool              `mapstructure:"skip_bucket_accesslogging"`
-	SkipBucketRootAccess                         bool              `mapstructure:"skip_bucket_root_access"`
-	SkipBucketEnforcedTLS                        bool              `mapstructure:"skip_bucket_enforced_tls"`
-	SkipBucketPublicAccessBlocking               bool              `mapstructure:"skip_bucket_public_access_blocking"`
-	DisableBucketUpdate                          bool              `mapstructure:"disable_bucket_update"`
-	EnableLockTableSSEncryption                  bool              `mapstructure:"enable_lock_table_ssencryption"`
-	DisableAWSClientChecksums                    bool              `mapstructure:"disable_aws_client_checksums"`
-	AccessLoggingBucketName                      string            `mapstructure:"accesslogging_bucket_name"`
-	AccessLoggingTargetObjectPartitionDateSource string            `mapstructure:"accesslogging_target_object_partition_date_source"`
-	AccessLoggingTargetPrefix                    string            `mapstructure:"accesslogging_target_prefix"`
-	SkipAccessLoggingBucketACL                   bool              `mapstructure:"skip_accesslogging_bucket_acl"`
-	SkipAccessLoggingBucketEnforcedTLS           bool              `mapstructure:"skip_accesslogging_bucket_enforced_tls"`
-	SkipAccessLoggingBucketPublicAccessBlocking  bool              `mapstructure:"skip_accesslogging_bucket_public_access_blocking"`
-	SkipAccessLoggingBucketSSEncryption          bool              `mapstructure:"skip_accesslogging_bucket_ssencryption"`
-	BucketSSEAlgorithm                           string            `mapstructure:"bucket_sse_algorithm"`
-	BucketSSEKMSKeyID                            string            `mapstructure:"bucket_sse_kms_key_id"`
+	S3BucketTags                                 map[string]string   `mapstructure:"s3_bucket_tags"`
+	DynamotableTags                              map[string]string   `mapstructure:"dynamodb_table_tags"`
+	AccessLoggingBucketTags                      map[string]string   `mapstructure:"accesslogging_bucket_tags"`
+	AccessLoggingBucketName                      string              `mapstructure:"accesslogging_bucket_name"`
+	BucketSSEKMSKeyID                            string              `mapstructure:"bucket_sse_kms_key_id"`
+	BucketSSEAlgorithm                           string              `mapstructure:"bucket_sse_algorithm"`
+	AccessLoggingTargetPrefix                    string              `mapstructure:"accesslogging_target_prefix"`
+	AccessLoggingTargetObjectPartitionDateSource string              `mapstructure:"accesslogging_target_object_partition_date_source"`
+	RemoteStateConfigS3                          RemoteStateConfigS3 `mapstructure:",squash"`
+	SkipBucketVersioning                         bool                `mapstructure:"skip_bucket_versioning"`
+	SkipBucketAccessLogging                      bool                `mapstructure:"skip_bucket_accesslogging"`
+	DisableBucketUpdate                          bool                `mapstructure:"disable_bucket_update"`
+	EnableLockTableSSEncryption                  bool                `mapstructure:"enable_lock_table_ssencryption"`
+	DisableAWSClientChecksums                    bool                `mapstructure:"disable_aws_client_checksums"`
+	SkipBucketEnforcedTLS                        bool                `mapstructure:"skip_bucket_enforced_tls"`
+	SkipBucketRootAccess                         bool                `mapstructure:"skip_bucket_root_access"`
+	SkipBucketPublicAccessBlocking               bool                `mapstructure:"skip_bucket_public_access_blocking"`
+	SkipAccessLoggingBucketACL                   bool                `mapstructure:"skip_accesslogging_bucket_acl"`
+	SkipAccessLoggingBucketEnforcedTLS           bool                `mapstructure:"skip_accesslogging_bucket_enforced_tls"`
+	SkipAccessLoggingBucketPublicAccessBlocking  bool                `mapstructure:"skip_accesslogging_bucket_public_access_blocking"`
+	SkipAccessLoggingBucketSSEncryption          bool                `mapstructure:"skip_accesslogging_bucket_ssencryption"`
+	SkipBucketSSEncryption                       bool                `mapstructure:"skip_bucket_ssencryption"`
+	SkipCredentialsValidation                    bool                `mapstructure:"skip_credentials_validation"`
 }
 
 // These are settings that can appear in the remote_state config that are ONLY used by Terragrunt and NOT forwarded
@@ -113,22 +112,22 @@ type RemoteStateConfigS3Endpoints struct {
 // RemoteStateConfigS3 is a representation of the
 // configuration options available for S3 remote state.
 type RemoteStateConfigS3 struct {
-	Encrypt          bool                          `mapstructure:"encrypt"`
+	Endpoints        RemoteStateConfigS3Endpoints  `mapstructure:"endpoints"`
+	RoleArn          string                        `mapstructure:"role_arn"`
+	LockTable        string                        `mapstructure:"lock_table"`
+	Region           string                        `mapstructure:"region"`
+	Endpoint         string                        `mapstructure:"endpoint"`
+	DynamoDBEndpoint string                        `mapstructure:"dynamodb_endpoint"`
 	Bucket           string                        `mapstructure:"bucket"`
 	Key              string                        `mapstructure:"key"`
-	Region           string                        `mapstructure:"region"`
-	Endpoint         string                        `mapstructure:"endpoint"`          // Deprecated in Terraform version 1.6 or newer.
-	DynamoDBEndpoint string                        `mapstructure:"dynamodb_endpoint"` // Deprecated in Terraform version 1.6 or newer.
-	Endpoints        RemoteStateConfigS3Endpoints  `mapstructure:"endpoints"`
+	ExternalID       string                        `mapstructure:"external_id"`
 	Profile          string                        `mapstructure:"profile"`
-	RoleArn          string                        `mapstructure:"role_arn"`     // Deprecated in Terraform version 1.6 or newer.
-	ExternalID       string                        `mapstructure:"external_id"`  // Deprecated in Terraform version 1.6 or newer.
-	SessionName      string                        `mapstructure:"session_name"` // Deprecated in Terraform version 1.6 or newer.
-	LockTable        string                        `mapstructure:"lock_table"`   // Deprecated in Terraform version 0.13 or newer.
-	DynamoDBTable    string                        `mapstructure:"dynamodb_table"`
+	SessionName      string                        `mapstructure:"session_name"`
 	CredsFilename    string                        `mapstructure:"shared_credentials_file"`
-	S3ForcePathStyle bool                          `mapstructure:"force_path_style"`
+	DynamoDBTable    string                        `mapstructure:"dynamodb_table"`
 	AssumeRole       RemoteStateConfigS3AssumeRole `mapstructure:"assume_role"`
+	Encrypt          bool                          `mapstructure:"encrypt"`
+	S3ForcePathStyle bool                          `mapstructure:"force_path_style"`
 }
 
 // GetAwsSessionConfig builds a session config for AWS related requests
diff --git a/remote/terraform_state_file.go b/remote/terraform_state_file.go
index a5ce4f2a..9b21417a 100644
--- a/remote/terraform_state_file.go
+++ b/remote/terraform_state_file.go
@@ -22,23 +22,23 @@ const DefaultPathToRemoteStateFile = "terraform.tfstate"
 
 // TerraformState - represents the structure of the Terraform .tfstate file.
 type TerraformState struct {
-	Version int                    `json:"Version"`
-	Serial  int                    `json:"Serial"`
 	Backend *TerraformBackend      `json:"Backend"`
 	Modules []TerraformStateModule `json:"Modules"`
+	Version int                    `json:"Version"`
+	Serial  int                    `json:"Serial"`
 }
 
 // TerraformBackend represents the structure of the "backend" section in the Terraform .tfstate file.
 type TerraformBackend struct {
-	Type   string         `json:"Type"`
 	Config map[string]any `json:"Config"`
+	Type   string         `json:"Type"`
 }
 
 // TerraformStateModule represents the structure of a "module" section in the Terraform .tfstate file.
 type TerraformStateModule struct {
-	Path      []string       `json:"Path"`
 	Outputs   map[string]any `json:"Outputs"`
 	Resources map[string]any `json:"Resources"`
+	Path      []string       `json:"Path"`
 }
 
 // IsRemote returns true if this Terraform state is configured for remote state storage.
@@ -103,8 +103,8 @@ func ParseTerraformState(terraformStateData []byte) (*TerraformState, error) {
 
 // CantParseTerraformStateFileError error that occurs when we can't parse the Terraform state file.
 type CantParseTerraformStateFileError struct {
-	Path          string
 	UnderlyingErr error
+	Path          string
 }
 
 func (err CantParseTerraformStateFileError) Error() string {
diff --git a/telemetry/telemetry.go b/telemetry/telemetry.go
index a4c6fe13..33f5b869 100644
--- a/telemetry/telemetry.go
+++ b/telemetry/telemetry.go
@@ -20,11 +20,11 @@ import (
 
 // TelemetryOptions - options for telemetry provider.
 type TelemetryOptions struct {
+	Writer     io.Writer
+	ErrWriter  io.Writer
 	Vars       map[string]string
 	AppName    string
 	AppVersion string
-	Writer     io.Writer
-	ErrWriter  io.Writer
 }
 
 var spanExporter sdktrace.SpanExporter
diff --git a/tf/cache/config.go b/tf/cache/config.go
index fe4134c0..6ff1fc93 100644
--- a/tf/cache/config.go
+++ b/tf/cache/config.go
@@ -80,17 +80,15 @@ func WithLogger(logger log.Logger) Option {
 }
 
 type Config struct {
-	hostname        string
-	port            int
-	token           string
-	shutdownTimeout time.Duration
-
+	logger                      log.Logger
 	providerService             *services.ProviderService
-	providerHandlers            handlers.ProviderHandlers
 	proxyProviderHandler        *handlers.ProxyProviderHandler
+	hostname                    string
+	token                       string
+	providerHandlers            handlers.ProviderHandlers
+	port                        int
+	shutdownTimeout             time.Duration
 	cacheProviderHTTPStatusCode int
-
-	logger log.Logger
 }
 
 func NewConfig(opts ...Option) *Config {
diff --git a/tf/cache/controllers/provider.go b/tf/cache/controllers/provider.go
index b91b87e2..922e073a 100644
--- a/tf/cache/controllers/provider.go
+++ b/tf/cache/controllers/provider.go
@@ -20,16 +20,14 @@ const (
 )
 
 type ProviderController struct {
-	*router.Router
-
 	Logger               log.Logger
-	Server               http.Server
 	DownloaderController router.Controller
-
+	*router.Router
 	AuthMiddleware              echo.MiddlewareFunc
-	ProviderHandlers            []handlers.ProviderHandler
 	ProxyProviderHandler        *handlers.ProxyProviderHandler
 	ProviderService             *services.ProviderService
+	ProviderHandlers            []handlers.ProviderHandler
+	Server                      http.Server
 	CacheProviderHTTPStatusCode int
 }
 
diff --git a/tf/cache/handlers/common_provider.go b/tf/cache/handlers/common_provider.go
index 60c3c742..e821ed09 100644
--- a/tf/cache/handlers/common_provider.go
+++ b/tf/cache/handlers/common_provider.go
@@ -12,14 +12,14 @@ import (
 type CommonProviderHandler struct {
 	logger log.Logger
 
-	// includeProviders and excludeProviders are sets of provider matching patterns that together define which providers are eligible to be potentially installed from the corresponding Source.
-	includeProviders models.Providers
-	excludeProviders models.Providers
-
 	// registryURLCache stores discovered registry URLs
 	// We use [xsync.MapOf](https://github.com/puzpuzpuz/xsync?tab=readme-ov-file#map)
 	// instead of standard `sync.Map` since it's faster and has generic types.
 	registryURLCache *xsync.MapOf[string, *RegistryURLs]
+
+	// includeProviders and excludeProviders are sets of provider matching patterns that together define which providers are eligible to be potentially installed from the corresponding Source.
+	includeProviders models.Providers
+	excludeProviders models.Providers
 }
 
 // NewCommonProviderHandler returns a new `CommonProviderHandler` instance with the defined values.
diff --git a/tf/cache/server.go b/tf/cache/server.go
index 15fbb7d1..699a5e27 100644
--- a/tf/cache/server.go
+++ b/tf/cache/server.go
@@ -19,9 +19,8 @@ import (
 type Server struct {
 	*router.Router
 	*Config
-
-	services           []services.Service
 	ProviderController *controllers.ProviderController
+	services           []services.Service
 }
 
 // NewServer returns a new Server instance.
diff --git a/tf/cache/services/provider_cache.go b/tf/cache/services/provider_cache.go
index e3743e65..8b71df63 100644
--- a/tf/cache/services/provider_cache.go
+++ b/tf/cache/services/provider_cache.go
@@ -75,21 +75,19 @@ func (caches ProviderCaches) removeArchive() error {
 }
 
 type ProviderCache struct {
-	*ProviderService
+	err error
 	*models.Provider
-	requestIDs []string
-
+	*ProviderService
 	started            chan struct{}
-	documentSHA256Sums []byte
+	userProviderDir    string
+	packageDir         string
+	lockfilePath       string
+	archivePath        string
 	signature          []byte
+	documentSHA256Sums []byte
+	requestIDs         []string
 	archiveCached      bool
 	ready              bool
-	err                error
-
-	userProviderDir string
-	packageDir      string
-	lockfilePath    string
-	archivePath     string
 }
 
 func (cache *ProviderCache) DocumentSHA256Sums(ctx context.Context) ([]byte, error) {
@@ -300,6 +298,10 @@ func (cache *ProviderCache) acquireLockFile(ctx context.Context) (*util.Lockfile
 }
 
 type ProviderService struct {
+	logger                log.Logger
+	providerCacheWarmUpCh chan *ProviderCache
+	credsSource           *cliconfig.CredentialsSource
+
 	// The path to store unpacked providers. The file structure is the same as terraform plugin cache dir.
 	cacheDir string
 
@@ -307,17 +309,10 @@ type ProviderService struct {
 	tempDir string
 
 	// the user plugins directory, by default: %APPDATA%\terraform.d\plugins on Windows, ~/.terraform.d/plugins on other systems.
-	userCacheDir string
-
-	providerCaches        ProviderCaches
-	providerCacheWarmUpCh chan *ProviderCache
-
-	cacheMu      sync.RWMutex
-	cacheReadyMu sync.RWMutex
-
-	credsSource *cliconfig.CredentialsSource
-
-	logger log.Logger
+	userCacheDir   string
+	providerCaches ProviderCaches
+	cacheMu        sync.RWMutex
+	cacheReadyMu   sync.RWMutex
 }
 
 func NewProviderService(cacheDir, userCacheDir string, credsSource *cliconfig.CredentialsSource, logger log.Logger) *ProviderService {
diff --git a/tf/cliconfig/config.go b/tf/cliconfig/config.go
index 5ff60639..6996628d 100644
--- a/tf/cliconfig/config.go
+++ b/tf/cliconfig/config.go
@@ -12,8 +12,8 @@ import (
 
 // ConfigHost is the structure of the "host" nested block within the CLI configuration, which can be used to override the default service host discovery behavior for a particular hostname.
 type ConfigHost struct {
-	Name     string            `hcl:",label"`
 	Services map[string]string `hcl:"services,attr"`
+	Name     string            `hcl:",label"`
 }
 
 // ConfigCredentials is the structure of the "credentials" nested block within the CLI configuration.
@@ -31,15 +31,13 @@ type ConfigCredentialsHelper struct {
 // Config provides methods to create a terraform [CLI config file](https://developer.hashicorp.com/terraform/cli/config/config-file).
 // The main purpose of which is to create a local config that will inherit the default user CLI config and adding new sections to force Terraform to send requests through the Terragrunt Cache server and use the provider cache directory.
 type Config struct {
-	DisableCheckpoint          bool `hcl:"disable_checkpoint"`
-	DisableCheckpointSignature bool `hcl:"disable_checkpoint_signature"`
-
-	Credentials        []ConfigCredentials      `hcl:"credentials,block"`
-	CredentialsHelpers *ConfigCredentialsHelper `hcl:"credentials_helper,block"`
-
-	PluginCacheDir       string                `hcl:"plugin_cache_dir"`
-	Hosts                []ConfigHost          `hcl:"host,block"`
-	ProviderInstallation *ProviderInstallation `hcl:"provider_installation,block"`
+	CredentialsHelpers         *ConfigCredentialsHelper `hcl:"credentials_helper,block"`
+	ProviderInstallation       *ProviderInstallation    `hcl:"provider_installation,block"`
+	PluginCacheDir             string                   `hcl:"plugin_cache_dir"`
+	Credentials                []ConfigCredentials      `hcl:"credentials,block"`
+	Hosts                      []ConfigHost             `hcl:"host,block"`
+	DisableCheckpoint          bool                     `hcl:"disable_checkpoint"`
+	DisableCheckpointSignature bool                     `hcl:"disable_checkpoint_signature"`
 }
 
 func (cfg *Config) Clone() *Config {
diff --git a/tf/cliconfig/provider_installation.go b/tf/cliconfig/provider_installation.go
index ea304777..ed03cf6e 100644
--- a/tf/cliconfig/provider_installation.go
+++ b/tf/cliconfig/provider_installation.go
@@ -70,9 +70,9 @@ type ProviderInstallationMethod interface {
 }
 
 type ProviderInstallationDirect struct {
-	Name    string    `hcl:",label" json:"Name"`
 	Include *[]string `hcl:"include,optional" json:"Include"`
 	Exclude *[]string `hcl:"exclude,optional" json:"Exclude"`
+	Name    string    `hcl:",label" json:"Name"`
 }
 
 func NewProviderInstallationDirect(include, exclude []string) *ProviderInstallationDirect {
@@ -180,10 +180,10 @@ func (method *ProviderInstallationDirect) String() string {
 }
 
 type ProviderInstallationFilesystemMirror struct {
-	Name    string    `hcl:",label" json:"Name"`
-	Path    string    `hcl:"path,attr" json:"Path"`
 	Include *[]string `hcl:"include,optional" json:"Include"`
 	Exclude *[]string `hcl:"exclude,optional" json:"Exclude"`
+	Name    string    `hcl:",label" json:"Name"`
+	Path    string    `hcl:"path,attr" json:"Path"`
 }
 
 func NewProviderInstallationFilesystemMirror(path string, include, exclude []string) *ProviderInstallationFilesystemMirror {
@@ -293,10 +293,10 @@ func (method *ProviderInstallationFilesystemMirror) String() string {
 }
 
 type ProviderInstallationNetworkMirror struct {
-	Name    string    `hcl:",label" json:"Name"`
-	URL     string    `hcl:"url,attr" json:"URL"`
 	Include *[]string `hcl:"include,optional" json:"Include"`
 	Exclude *[]string `hcl:"exclude,optional" json:"Exclude"`
+	Name    string    `hcl:",label" json:"Name"`
+	URL     string    `hcl:"url,attr" json:"URL"`
 }
 
 func NewProviderInstallationNetworkMirror(url string, include, exclude []string) *ProviderInstallationNetworkMirror {
diff --git a/tf/getproviders/package_authentication.go b/tf/getproviders/package_authentication.go
index 98bdc35e..14590ced 100644
--- a/tf/getproviders/package_authentication.go
+++ b/tf/getproviders/package_authentication.go
@@ -148,8 +148,8 @@ func (auth archiveHashAuthentication) AcceptableHashes() []Hash {
 }
 
 type matchingChecksumAuthentication struct {
-	Document      []byte
 	Filename      string
+	Document      []byte
 	WantSHA256Sum [sha256.Size]byte
 }
 
@@ -187,9 +187,9 @@ func (auth matchingChecksumAuthentication) Authenticate(location string) (*Packa
 }
 
 type signatureAuthentication struct {
+	Keys      map[string]string
 	Document  []byte
 	Signature []byte
-	Keys      map[string]string
 }
 
 // NewSignatureAuthentication returns a PackageAuthentication implementation that verifies the cryptographic signature for a package against any of the provided keys.
diff --git a/tf/source.go b/tf/source.go
index a2c73a9d..8e6a8dac 100644
--- a/tf/source.go
+++ b/tf/source.go
@@ -27,6 +27,8 @@ const matchCount = 2
 
 // Source represents information about Terraform source code that needs to be downloaded.
 type Source struct {
+	Logger log.Logger
+
 	// A canonical version of RawSource, in URL format
 	CanonicalSourceURL *url.URL
 
@@ -39,9 +41,6 @@ type Source struct {
 	// The path to a file in DownloadDir that stores the version number of the code
 	VersionFile string
 
-	// Logger to use for logging
-	Logger log.Logger
-
 	// WalkWithSymlinks controls whether to walk symlinks in the downloaded source
 	WalkWithSymlinks bool
 }
diff --git a/util/file.go b/util/file.go
index 9a0cafbd..b7ac4f58 100644
--- a/util/file.go
+++ b/util/file.go
@@ -547,11 +547,11 @@ func JoinTerraformModulePath(modulesFolder string, path string) string {
 // we have to track all the files we touch in a manifest. This way we know exactly which files we need to clean on
 // subsequent runs.
 type fileManifest struct {
-	ManifestFolder string // this is a folder that has the manifest in it
-	ManifestFile   string // this is the manifest file name
+	logger         log.Logger
 	encoder        *gob.Encoder
 	fileHandle     *os.File
-	logger         log.Logger
+	ManifestFolder string
+	ManifestFile   string
 }
 
 // fileManifestEntry represents an entry in the fileManifest.
diff --git a/util/locks.go b/util/locks.go
index 4ff20294..97711960 100644
--- a/util/locks.go
+++ b/util/locks.go
@@ -6,8 +6,8 @@ import (
 
 // KeyLocks manages a map of locks, each associated with a string key.
 type KeyLocks struct {
-	masterLock sync.Mutex
 	locks      map[string]*sync.Mutex
+	masterLock sync.Mutex
 }
 
 // NewKeyLocks creates a new instance of KeyLocks.
diff --git a/util/shell.go b/util/shell.go
index 07878657..9ded6da9 100644
--- a/util/shell.go
+++ b/util/shell.go
@@ -76,10 +76,10 @@ func GetExitCode(err error) (int, error) {
 // ProcessExecutionError - error returned when a command fails, contains StdOut and StdErr
 type ProcessExecutionError struct {
 	Err            error
-	Output         CmdOutput
 	WorkingDir     string
 	Command        string
 	Args           []string
+	Output         CmdOutput
 	DisableSummary bool
 }
 
diff --git a/util/worker.go b/util/worker.go
index 8a1ae601..93d4fba3 100644
--- a/util/worker.go
+++ b/util/worker.go
@@ -12,15 +12,15 @@ type Task func() error
 
 // WorkerPool manages concurrent task execution with a configurable number of workers
 type WorkerPool struct {
-	maxWorkers  int
-	semaphore   chan struct{} // Semaphore to limit concurrent execution
+	semaphore   chan struct{}
 	resultChan  chan error
-	doneChan    chan struct{} // Signal to stop the collector goroutine
-	wg          sync.WaitGroup
+	doneChan    chan struct{}
 	errorsSlice []error
-	mu          sync.Mutex // Mutex to protect errorsSlice
+	wg          sync.WaitGroup
+	maxWorkers  int
+	mu          sync.Mutex
+	isStopping  atomic.Bool
 	isRunning   bool
-	isStopping  atomic.Bool // Atomic flag to indicate the pool is stopping
 }
 
 // NewWorkerPool creates a new worker pool with the specified maximum number of concurrent workers



Test patch:
diff --git a/cli/app_test.go b/cli/app_test.go
index 19435056..3bae27eb 100644
--- a/cli/app_test.go
+++ b/cli/app_test.go
@@ -42,150 +42,128 @@ func TestParseTerragruntOptionsFromArgs(t *testing.T) {
 	workingDir = filepath.ToSlash(workingDir)
 
 	testCases := []struct {
-		args            []string
-		expectedOptions *options.TerragruntOptions
 		expectedErr     error
+		expectedOptions *options.TerragruntOptions
+		args            []string
 	}{
 		{
-			[]string{"plan"},
-			mockOptions(t, util.JoinPath(workingDir, config.DefaultTerragruntConfigPath), workingDir, []string{"plan"}, false, "", false, false, defaultLogLevel, false),
-			nil,
+			args:            []string{"plan"},
+			expectedOptions: mockOptions(t, util.JoinPath(workingDir, config.DefaultTerragruntConfigPath), workingDir, []string{"plan"}, false, "", false, false, defaultLogLevel, false),
 		},
 
 		{
-			[]string{"plan", "bar"},
-			mockOptions(t, util.JoinPath(workingDir, config.DefaultTerragruntConfigPath), workingDir, []string{"plan", "bar"}, false, "", false, false, defaultLogLevel, false),
-			nil,
+			args:            []string{"plan", "bar"},
+			expectedOptions: mockOptions(t, util.JoinPath(workingDir, config.DefaultTerragruntConfigPath), workingDir, []string{"plan", "bar"}, false, "", false, false, defaultLogLevel, false),
 		},
 
 		{
-			[]string{"--foo", "--bar"},
-			mockOptions(t, util.JoinPath(workingDir, config.DefaultTerragruntConfigPath), workingDir, []string{"-foo", "-bar"}, false, "", false, false, defaultLogLevel, false),
-			clipkg.UndefinedFlagError("foo"),
+			args:            []string{"--foo", "--bar"},
+			expectedOptions: mockOptions(t, util.JoinPath(workingDir, config.DefaultTerragruntConfigPath), workingDir, []string{"-foo", "-bar"}, false, "", false, false, defaultLogLevel, false),
+			expectedErr:     clipkg.UndefinedFlagError("foo"),
 		},
 
 		{
-			[]string{"--foo", "apply", "--bar"},
-			mockOptions(t, util.JoinPath(workingDir, config.DefaultTerragruntConfigPath), workingDir, []string{"apply", "-foo", "-bar"}, false, "", false, false, defaultLogLevel, false),
-			clipkg.UndefinedFlagError("foo"),
+			args:            []string{"--foo", "apply", "--bar"},
+			expectedOptions: mockOptions(t, util.JoinPath(workingDir, config.DefaultTerragruntConfigPath), workingDir, []string{"apply", "-foo", "-bar"}, false, "", false, false, defaultLogLevel, false),
+			expectedErr:     clipkg.UndefinedFlagError("foo"),
 		},
 
 		{
-			[]string{doubleDashed(global.NonInteractiveFlagName)},
-			mockOptions(t, "", "", []string{}, true, "", false, false, defaultLogLevel, false),
-			nil,
+			args:            []string{doubleDashed(global.NonInteractiveFlagName)},
+			expectedOptions: mockOptions(t, "", "", []string{}, true, "", false, false, defaultLogLevel, false),
 		},
 
 		{
-			[]string{"apply", doubleDashed(terragruntPrefix.FlagName(run.DeprecatedIncludeExternalDependenciesFlagName))},
-			mockOptions(t, util.JoinPath(workingDir, config.DefaultTerragruntConfigPath), workingDir, []string{"apply"}, false, "", false, true, defaultLogLevel, false),
-			nil,
+			args:            []string{"apply", doubleDashed(terragruntPrefix.FlagName(run.DeprecatedIncludeExternalDependenciesFlagName))},
+			expectedOptions: mockOptions(t, util.JoinPath(workingDir, config.DefaultTerragruntConfigPath), workingDir, []string{"apply"}, false, "", false, true, defaultLogLevel, false),
 		},
 
 		{
-			[]string{"plan", doubleDashed(run.ConfigFlagName), "/some/path/" + config.DefaultTerragruntConfigPath},
-			mockOptions(t, "/some/path/"+config.DefaultTerragruntConfigPath, workingDir, []string{"plan"}, false, "", false, false, defaultLogLevel, false),
-			nil,
+			args:            []string{"plan", doubleDashed(run.ConfigFlagName), "/some/path/" + config.DefaultTerragruntConfigPath},
+			expectedOptions: mockOptions(t, "/some/path/"+config.DefaultTerragruntConfigPath, workingDir, []string{"plan"}, false, "", false, false, defaultLogLevel, false),
 		},
 
 		{
-			[]string{"plan", doubleDashed(global.WorkingDirFlagName), "/some/path"},
-			mockOptions(t, util.JoinPath("/some/path", config.DefaultTerragruntConfigPath), "/some/path", []string{"plan"}, false, "", false, false, defaultLogLevel, false),
-			nil,
+			args:            []string{"plan", doubleDashed(global.WorkingDirFlagName), "/some/path"},
+			expectedOptions: mockOptions(t, util.JoinPath("/some/path", config.DefaultTerragruntConfigPath), "/some/path", []string{"plan"}, false, "", false, false, defaultLogLevel, false),
 		},
 
 		{
-			[]string{"plan", doubleDashed(run.SourceFlagName), "/some/path"},
-			mockOptions(t, util.JoinPath(workingDir, config.DefaultTerragruntConfigPath), workingDir, []string{"plan"}, false, "/some/path", false, false, defaultLogLevel, false),
-			nil,
+			args:            []string{"plan", doubleDashed(run.SourceFlagName), "/some/path"},
+			expectedOptions: mockOptions(t, util.JoinPath(workingDir, config.DefaultTerragruntConfigPath), workingDir, []string{"plan"}, false, "/some/path", false, false, defaultLogLevel, false),
 		},
 
 		{
-			[]string{"plan", doubleDashed(run.SourceMapFlagName), "git::git@github.com:one/gw-terraform-aws-vpc.git=git::git@github.com:two/test.git?ref=FEATURE"},
-			mockOptionsWithSourceMap(t, util.JoinPath(workingDir, config.DefaultTerragruntConfigPath), workingDir, []string{"plan"}, map[string]string{"git::git@github.com:one/gw-terraform-aws-vpc.git": "git::git@github.com:two/test.git?ref=FEATURE"}),
-			nil,
+			args:            []string{"plan", doubleDashed(run.SourceMapFlagName), "git::git@github.com:one/gw-terraform-aws-vpc.git=git::git@github.com:two/test.git?ref=FEATURE"},
+			expectedOptions: mockOptionsWithSourceMap(t, util.JoinPath(workingDir, config.DefaultTerragruntConfigPath), workingDir, []string{"plan"}, map[string]string{"git::git@github.com:one/gw-terraform-aws-vpc.git": "git::git@github.com:two/test.git?ref=FEATURE"}),
 		},
 
 		{
-			[]string{"plan", doubleDashed(run.QueueIgnoreErrorsFlagName)},
-			mockOptions(t, util.JoinPath(workingDir, config.DefaultTerragruntConfigPath), workingDir, []string{"plan"}, false, "", true, false, defaultLogLevel, false),
-			nil,
+			args:            []string{"plan", doubleDashed(run.QueueIgnoreErrorsFlagName)},
+			expectedOptions: mockOptions(t, util.JoinPath(workingDir, config.DefaultTerragruntConfigPath), workingDir, []string{"plan"}, false, "", true, false, defaultLogLevel, false),
 		},
 
 		{
-			[]string{"plan", doubleDashed(terragruntPrefix.FlagName(run.DeprecatedIgnoreExternalDependenciesFlagName))},
-			mockOptions(t, util.JoinPath(workingDir, config.DefaultTerragruntConfigPath), workingDir, []string{"plan"}, false, "", false, false, defaultLogLevel, false),
-			nil,
+			args:            []string{"plan", doubleDashed(terragruntPrefix.FlagName(run.DeprecatedIgnoreExternalDependenciesFlagName))},
+			expectedOptions: mockOptions(t, util.JoinPath(workingDir, config.DefaultTerragruntConfigPath), workingDir, []string{"plan"}, false, "", false, false, defaultLogLevel, false),
 		},
 
 		{
-			[]string{"plan", doubleDashed(terragruntPrefix.FlagName(run.DeprecatedIAMRoleFlagName)), "arn:aws:iam::ACCOUNT_ID:role/ROLE_NAME"},
-			mockOptionsWithIamRole(t, util.JoinPath(workingDir, config.DefaultTerragruntConfigPath), workingDir, []string{"plan"}, false, "", false, "arn:aws:iam::ACCOUNT_ID:role/ROLE_NAME"),
-			nil,
+			args:            []string{"plan", doubleDashed(terragruntPrefix.FlagName(run.DeprecatedIAMRoleFlagName)), "arn:aws:iam::ACCOUNT_ID:role/ROLE_NAME"},
+			expectedOptions: mockOptionsWithIamRole(t, util.JoinPath(workingDir, config.DefaultTerragruntConfigPath), workingDir, []string{"plan"}, false, "", false, "arn:aws:iam::ACCOUNT_ID:role/ROLE_NAME"),
 		},
 
 		{
-			[]string{"plan", doubleDashed(run.IAMAssumeRoleDurationFlagName), "36000"},
-			mockOptionsWithIamAssumeRoleDuration(t, util.JoinPath(workingDir, config.DefaultTerragruntConfigPath), workingDir, []string{"plan"}, false, "", false, 36000),
-			nil,
+			args:            []string{"plan", doubleDashed(run.IAMAssumeRoleDurationFlagName), "36000"},
+			expectedOptions: mockOptionsWithIamAssumeRoleDuration(t, util.JoinPath(workingDir, config.DefaultTerragruntConfigPath), workingDir, []string{"plan"}, false, "", false, 36000),
 		},
 
 		{
-			[]string{"plan", doubleDashed(run.IAMAssumeRoleSessionNameFlagName), "terragrunt-iam-role-session-name"},
-			mockOptionsWithIamAssumeRoleSessionName(t, util.JoinPath(workingDir, config.DefaultTerragruntConfigPath), workingDir, []string{"plan"}, false, "", false, "terragrunt-iam-role-session-name"),
-			nil,
+			args:            []string{"plan", doubleDashed(run.IAMAssumeRoleSessionNameFlagName), "terragrunt-iam-role-session-name"},
+			expectedOptions: mockOptionsWithIamAssumeRoleSessionName(t, util.JoinPath(workingDir, config.DefaultTerragruntConfigPath), workingDir, []string{"plan"}, false, "", false, "terragrunt-iam-role-session-name"),
 		},
 
 		{
-			[]string{"plan", doubleDashed(terragruntPrefix.FlagName(run.DeprecatedIAMWebIdentityTokenFlagName)), "web-identity-token"},
-			mockOptionsWithIamWebIdentityToken(t, util.JoinPath(workingDir, config.DefaultTerragruntConfigPath), workingDir, []string{"plan"}, false, "", false, "web-identity-token"),
-			nil,
+			args:            []string{"plan", doubleDashed(terragruntPrefix.FlagName(run.DeprecatedIAMWebIdentityTokenFlagName)), "web-identity-token"},
+			expectedOptions: mockOptionsWithIamWebIdentityToken(t, util.JoinPath(workingDir, config.DefaultTerragruntConfigPath), workingDir, []string{"plan"}, false, "", false, "web-identity-token"),
 		},
 
 		{
-			[]string{"plan", doubleDashed(run.ConfigFlagName), "/some/path/" + config.DefaultTerragruntConfigPath, "--terragrunt-non-interactive"},
-			mockOptions(t, "/some/path/"+config.DefaultTerragruntConfigPath, workingDir, []string{"plan"}, true, "", false, false, defaultLogLevel, false),
-			nil,
+			args:            []string{"plan", doubleDashed(run.ConfigFlagName), "/some/path/" + config.DefaultTerragruntConfigPath, "--terragrunt-non-interactive"},
+			expectedOptions: mockOptions(t, "/some/path/"+config.DefaultTerragruntConfigPath, workingDir, []string{"plan"}, true, "", false, false, defaultLogLevel, false),
 		},
 
 		{
-			[]string{"plan", doubleDashed(run.ConfigFlagName), "/some/path/" + config.DefaultTerragruntConfigPath, "bar", doubleDashed(global.NonInteractiveFlagName), "--baz", doubleDashed(global.WorkingDirFlagName), "/some/path", doubleDashed(run.SourceFlagName), "github.com/foo/bar//baz?ref=1.0.3"},
-			mockOptions(t, "/some/path/"+config.DefaultTerragruntConfigPath, "/some/path", []string{"plan", "bar", "-baz"}, true, "github.com/foo/bar//baz?ref=1.0.3", false, false, defaultLogLevel, false),
-			nil,
+			args:            []string{"plan", doubleDashed(run.ConfigFlagName), "/some/path/" + config.DefaultTerragruntConfigPath, "bar", doubleDashed(global.NonInteractiveFlagName), "--baz", doubleDashed(global.WorkingDirFlagName), "/some/path", doubleDashed(run.SourceFlagName), "github.com/foo/bar//baz?ref=1.0.3"},
+			expectedOptions: mockOptions(t, "/some/path/"+config.DefaultTerragruntConfigPath, "/some/path", []string{"plan", "bar", "-baz"}, true, "github.com/foo/bar//baz?ref=1.0.3", false, false, defaultLogLevel, false),
 		},
 
 		// Adding the --terragrunt-log-level flag should result in DebugLevel configured
 		{
-			[]string{"plan", doubleDashed(global.LogLevelFlagName), "debug"},
-			mockOptions(t, util.JoinPath(workingDir, config.DefaultTerragruntConfigPath), workingDir, []string{"plan"}, false, "", false, false, log.DebugLevel, false),
-			nil,
+			args:            []string{"plan", doubleDashed(global.LogLevelFlagName), "debug"},
+			expectedOptions: mockOptions(t, util.JoinPath(workingDir, config.DefaultTerragruntConfigPath), workingDir, []string{"plan"}, false, "", false, false, log.DebugLevel, false),
 		},
 		{
-			[]string{"plan", doubleDashed(run.ConfigFlagName)},
-			nil,
-			argMissingValueError(run.ConfigFlagName),
+			args:        []string{"plan", doubleDashed(run.ConfigFlagName)},
+			expectedErr: argMissingValueError(run.ConfigFlagName),
 		},
 
 		{
-			[]string{"plan", doubleDashed(global.WorkingDirFlagName)},
-			nil,
-			argMissingValueError(global.WorkingDirFlagName),
+			args:        []string{"plan", doubleDashed(global.WorkingDirFlagName)},
+			expectedErr: argMissingValueError(global.WorkingDirFlagName),
 		},
 
 		{
-			[]string{"plan", "--foo", "bar", doubleDashed(run.ConfigFlagName)},
-			nil,
-			argMissingValueError(run.ConfigFlagName),
+			args:        []string{"plan", "--foo", "bar", doubleDashed(run.ConfigFlagName)},
+			expectedErr: argMissingValueError(run.ConfigFlagName),
 		},
 		{
-			[]string{"plan", doubleDashed(run.InputsDebugFlagName)},
-			mockOptions(t, util.JoinPath(workingDir, config.DefaultTerragruntConfigPath), workingDir, []string{"plan"}, false, "", false, false, defaultLogLevel, true),
-			nil,
+			args:            []string{"plan", doubleDashed(run.InputsDebugFlagName)},
+			expectedOptions: mockOptions(t, util.JoinPath(workingDir, config.DefaultTerragruntConfigPath), workingDir, []string{"plan"}, false, "", false, false, defaultLogLevel, true),
 		},
 		{
-			[]string{outputmodulegroups.CommandName, outputmodulegroups.SubCommandApply},
-			mockOptions(t, util.JoinPath(workingDir, config.DefaultTerragruntConfigPath), workingDir, []string{outputmodulegroups.SubCommandApply}, false, "", false, false, defaultLogLevel, false),
-			nil,
+			args:            []string{outputmodulegroups.CommandName, outputmodulegroups.SubCommandApply},
+			expectedOptions: mockOptions(t, util.JoinPath(workingDir, config.DefaultTerragruntConfigPath), workingDir, []string{outputmodulegroups.SubCommandApply}, false, "", false, false, defaultLogLevel, false),
 		},
 	}
 
@@ -328,15 +306,31 @@ func TestParseMultiStringArg(t *testing.T) {
 	flagName := doubleDashed(run.UnitsThatIncludeFlagName)
 
 	testCases := []struct {
+		expectedErr  error
 		args         []string
 		defaultValue []string
 		expectedVals []string
-		expectedErr  error
 	}{
-		{[]string{commands.CommandNameApplyAll, flagName, "bar"}, []string{"default_bar"}, []string{"bar"}, nil},
-		{[]string{commands.CommandNameApplyAll, "--test", "bar"}, []string{"default_bar"}, []string{"default_bar"}, nil},
-		{[]string{commands.CommandNamePlanAll, "--test", flagName, "bar1", flagName, "bar2"}, []string{"default_bar"}, []string{"bar1", "bar2"}, nil},
-		{[]string{commands.CommandNamePlanAll, "--test", "value", flagName, "bar1", flagName}, []string{"default_bar"}, nil, argMissingValueError(run.UnitsThatIncludeFlagName)},
+		{
+			args:         []string{commands.CommandNameApplyAll, flagName, "bar"},
+			defaultValue: []string{"default_bar"},
+			expectedVals: []string{"bar"},
+		},
+		{
+			args:         []string{commands.CommandNameApplyAll, "--test", "bar"},
+			defaultValue: []string{"default_bar"},
+			expectedVals: []string{"default_bar"},
+		},
+		{
+			args:         []string{commands.CommandNamePlanAll, "--test", "value", flagName, "bar1", flagName, "bar2"},
+			defaultValue: []string{"default_bar"},
+			expectedVals: []string{"bar1", "bar2"},
+		},
+		{
+			args:         []string{commands.CommandNamePlanAll, "--test", "value", flagName, "bar1", flagName},
+			defaultValue: []string{"default_bar"},
+			expectedErr:  argMissingValueError(run.UnitsThatIncludeFlagName),
+		},
 	}
 
 	for i, testCase := range testCases {
@@ -365,17 +359,39 @@ func TestParseMutliStringKeyValueArg(t *testing.T) {
 	flagName := doubleDashed(terragruntPrefix.FlagName(awsproviderpatch.OverrideAttrFlagName))
 
 	testCases := []struct {
-		args         []string
+		expectedErr  error
 		defaultValue map[string]string
 		expectedVals map[string]string
-		expectedErr  error
+		args         []string
 	}{
-		{[]string{awsproviderpatch.CommandName}, nil, nil, nil},
-		{[]string{awsproviderpatch.CommandName}, map[string]string{"default": "value"}, map[string]string{"default": "value"}, nil},
-		{[]string{awsproviderpatch.CommandName, "--other", "arg"}, map[string]string{"default": "value"}, map[string]string{"default": "value"}, nil},
-		{[]string{awsproviderpatch.CommandName, flagName, "key=value"}, map[string]string{"default": "value"}, map[string]string{"key": "value"}, nil},
-		{[]string{awsproviderpatch.CommandName, flagName, "key1=value1", flagName, "key2=value2", flagName, "key3=value3"}, map[string]string{"default": "value"}, map[string]string{"key1": "value1", "key2": "value2", "key3": "value3"}, nil},
-		{[]string{awsproviderpatch.CommandName, flagName, "invalidvalue"}, map[string]string{"default": "value"}, nil, clipkg.NewInvalidKeyValueError(clipkg.MapFlagKeyValSep, "invalidvalue")},
+		{
+			args: []string{awsproviderpatch.CommandName},
+		},
+		{
+			args:         []string{awsproviderpatch.CommandName},
+			defaultValue: map[string]string{"default": "value"},
+			expectedVals: map[string]string{"default": "value"},
+		},
+		{
+			args:         []string{awsproviderpatch.CommandName, "--other", "arg"},
+			defaultValue: map[string]string{"default": "value"},
+			expectedVals: map[string]string{"default": "value"},
+		},
+		{
+			args:         []string{awsproviderpatch.CommandName, flagName, "key=value"},
+			defaultValue: map[string]string{"default": "value"},
+			expectedVals: map[string]string{"key": "value"},
+		},
+		{
+			args:         []string{awsproviderpatch.CommandName, flagName, "key1=value1", flagName, "key2=value2", flagName, "key3=value3"},
+			defaultValue: map[string]string{"default": "value"},
+			expectedVals: map[string]string{"key1": "value1", "key2": "value2", "key3": "value3"},
+		},
+		{
+			args:         []string{awsproviderpatch.CommandName, flagName, "invalidvalue"},
+			defaultValue: map[string]string{"default": "value"},
+			expectedErr:  clipkg.NewInvalidKeyValueError(clipkg.MapFlagKeyValSep, "invalidvalue"),
+		},
 	}
 
 	for _, testCase := range testCases {
@@ -427,15 +443,34 @@ func TestTerragruntHelp(t *testing.T) {
 	app := cli.NewApp(opts)
 
 	testCases := []struct {
-		args        []string
 		expected    string
 		notExpected string
+		args        []string
 	}{
-		{[]string{"terragrunt", "--help"}, app.UsageText, terragruntPrefix.FlagName(awsproviderpatch.OverrideAttrFlagName)},
-		{[]string{"terragrunt", "-help"}, app.UsageText, terragruntPrefix.FlagName(awsproviderpatch.OverrideAttrFlagName)},
-		{[]string{"terragrunt", "-h"}, app.UsageText, terragruntPrefix.FlagName(awsproviderpatch.OverrideAttrFlagName)},
-		{[]string{"terragrunt", awsproviderpatch.CommandName, "-h"}, run.ConfigFlagName, hclfmt.CommandName},
-		{[]string{"terragrunt", commands.CommandNamePlanAll, "--help"}, runall.CommandName, ""},
+		{
+			args:        []string{"terragrunt", "--help"},
+			expected:    app.UsageText,
+			notExpected: terragruntPrefix.FlagName(awsproviderpatch.OverrideAttrFlagName),
+		},
+		{
+			args:        []string{"terragrunt", "-help"},
+			expected:    app.UsageText,
+			notExpected: terragruntPrefix.FlagName(awsproviderpatch.OverrideAttrFlagName),
+		},
+		{
+			args:        []string{"terragrunt", "-h"},
+			expected:    app.UsageText,
+			notExpected: terragruntPrefix.FlagName(awsproviderpatch.OverrideAttrFlagName),
+		},
+		{
+			args:        []string{"terragrunt", awsproviderpatch.CommandName, "-h"},
+			expected:    run.ConfigFlagName,
+			notExpected: hclfmt.CommandName,
+		},
+		{
+			args:     []string{"terragrunt", commands.CommandNamePlanAll, "--help"},
+			expected: runall.CommandName,
+		},
 	}
 
 	for i, testCase := range testCases {
@@ -460,12 +495,12 @@ func TestTerraformHelp(t *testing.T) {
 	t.Parallel()
 
 	testCases := []struct {
-		args     []string
 		expected string
+		args     []string
 	}{
-		{[]string{"terragrunt", tf.CommandNamePlan, "--help"}, "(?s)Usage: terragrunt \\[global options\\] plan.*-detailed-exitcode"},
-		{[]string{"terragrunt", tf.CommandNameApply, "-help"}, "(?s)Usage: terragrunt \\[global options\\] apply.*-destroy"},
-		{[]string{"terragrunt", tf.CommandNameApply, "-h"}, "(?s)Usage: terragrunt \\[global options\\] apply.*-destroy"},
+		{args: []string{"terragrunt", tf.CommandNamePlan, "--help"}, expected: "(?s)Usage: terragrunt \\[global options\\] plan.*-detailed-exitcode"},
+		{args: []string{"terragrunt", tf.CommandNameApply, "-help"}, expected: "(?s)Usage: terragrunt \\[global options\\] apply.*-destroy"},
+		{args: []string{"terragrunt", tf.CommandNameApply, "-h"}, expected: "(?s)Usage: terragrunt \\[global options\\] apply.*-destroy"},
 	}
 
 	for _, testCase := range testCases {
diff --git a/cli/commands/aws-provider-patch/aws-provider-patch_test.go b/cli/commands/aws-provider-patch/aws-provider-patch_test.go
index 3e503327..d09d5009 100644
--- a/cli/commands/aws-provider-patch/aws-provider-patch_test.go
+++ b/cli/commands/aws-provider-patch/aws-provider-patch_test.go
@@ -287,30 +287,30 @@ func TestPatchAwsProviderInTerraformCodeHappyPath(t *testing.T) {
 	t.Parallel()
 
 	testCases := []struct {
+		attributesToOverride   map[string]string
 		testName               string
 		originalTerraformCode  string
-		attributesToOverride   map[string]string
-		expectedCodeWasUpdated bool
 		expectedTerraformCode  []string
+		expectedCodeWasUpdated bool
 	}{
-		{"empty", "", nil, false, []string{""}},
-		{"empty with attributes", "", map[string]string{"region": `"eu-west-1"`}, false, []string{""}},
-		{"no provider", terraformCodeExampleOutputOnly, map[string]string{"region": `"eu-west-1"`}, false, []string{terraformCodeExampleOutputOnly}},
-		{"no aws provider", terraformCodeExampleGcpProvider, map[string]string{"region": `"eu-west-1"`}, false, []string{terraformCodeExampleGcpProvider}},
-		{"one empty aws provider, but no overrides", terraformCodeExampleAwsProviderEmptyOriginal, nil, false, []string{terraformCodeExampleAwsProviderEmptyOriginal}},
-		{"one empty aws provider, with region override", terraformCodeExampleAwsProviderEmptyOriginal, map[string]string{"region": `"eu-west-1"`}, false, []string{terraformCodeExampleAwsProviderEmptyOriginal}},
-		{"one empty aws provider, with region, version override", terraformCodeExampleAwsProviderEmptyOriginal, map[string]string{"region": `"eu-west-1"`, "version": `"0.3.0"`}, false, []string{terraformCodeExampleAwsProviderEmptyOriginal}},
-		{"one non-empty aws provider, but no overrides", terraformCodeExampleAwsProviderNonEmptyOriginal, nil, false, []string{terraformCodeExampleAwsProviderNonEmptyOriginal}},
-		{"one non-empty aws provider, with region override", terraformCodeExampleAwsProviderNonEmptyOriginal, map[string]string{"region": `"eu-west-1"`}, true, []string{terraformCodeExampleAwsProviderRegionOverridenVersionNotOverriddenExpected}},
-		{"one non-empty aws provider, with region, version override", terraformCodeExampleAwsProviderNonEmptyOriginal, map[string]string{"region": `"eu-west-1"`, "version": `"0.3.0"`}, true, []string{terraformCodeExampleAwsProviderRegionVersionOverridenExpected, terraformCodeExampleAwsProviderRegionVersionOverridenReverseOrderExpected}},
-		{"multiple providers, but no overrides", terraformCodeExampleAwsMultipleProvidersOriginal, nil, false, []string{terraformCodeExampleAwsMultipleProvidersOriginal}},
-		{"multiple providers, with region override", terraformCodeExampleAwsMultipleProvidersOriginal, map[string]string{"region": `"eu-west-1"`}, true, []string{terraformCodeExampleAwsMultipleProvidersRegionOverridenExpected}},
-		{"multiple providers, with region, version override", terraformCodeExampleAwsMultipleProvidersOriginal, map[string]string{"region": `"eu-west-1"`, "version": `"0.3.0"`}, true, []string{terraformCodeExampleAwsMultipleProvidersRegionVersionOverridenExpected}},
-		{"multiple providers with comments, but no overrides", terraformCodeExampleAwsMultipleProvidersNonEmptyWithCommentsOriginal, nil, false, []string{terraformCodeExampleAwsMultipleProvidersNonEmptyWithCommentsOriginal}},
-		{"multiple providers with comments, with region override", terraformCodeExampleAwsMultipleProvidersNonEmptyWithCommentsOriginal, map[string]string{"region": `"eu-west-1"`}, true, []string{terraformCodeExampleAwsMultipleProvidersNonEmptyWithCommentsRegionOverriddenExpected}},
-		{"multiple providers with comments, with region, version override", terraformCodeExampleAwsMultipleProvidersNonEmptyWithCommentsOriginal, map[string]string{"region": `"eu-west-1"`, "version": `"0.3.0"`}, true, []string{terraformCodeExampleAwsMultipleProvidersNonEmptyWithCommentsRegionVersionOverriddenExpected}},
-		{"one provider with nested blocks, with region and role_arn override", terraformCodeExampleAwsOneProviderNestedBlocks, map[string]string{"region": `"eu-west-1"`, "assume_role.role_arn": `"nested-override"`}, true, []string{terraformCodeExampleAwsOneProviderNestedBlocksRegionRoleArnExpected}},
-		{"one provider with nested blocks, with region and role_arn override, plus non-matching overrides", terraformCodeExampleAwsOneProviderNestedBlocks, map[string]string{"region": `"eu-west-1"`, "assume_role.role_arn": `"nested-override"`, "should-be": `"ignored"`, "assume_role.should-be": `"ignored"`}, true, []string{terraformCodeExampleAwsOneProviderNestedBlocksRegionRoleArnExpected}},
+		{testName: "empty", originalTerraformCode: "", attributesToOverride: nil, expectedCodeWasUpdated: false, expectedTerraformCode: []string{""}},
+		{testName: "empty with attributes", originalTerraformCode: "", attributesToOverride: map[string]string{"region": `"eu-west-1"`}, expectedCodeWasUpdated: false, expectedTerraformCode: []string{""}},
+		{testName: "no provider", originalTerraformCode: terraformCodeExampleOutputOnly, attributesToOverride: map[string]string{"region": `"eu-west-1"`}, expectedCodeWasUpdated: false, expectedTerraformCode: []string{terraformCodeExampleOutputOnly}},
+		{testName: "no aws provider", originalTerraformCode: terraformCodeExampleGcpProvider, attributesToOverride: map[string]string{"region": `"eu-west-1"`}, expectedCodeWasUpdated: false, expectedTerraformCode: []string{terraformCodeExampleGcpProvider}},
+		{testName: "one empty aws provider, but no overrides", originalTerraformCode: terraformCodeExampleAwsProviderEmptyOriginal, attributesToOverride: nil, expectedCodeWasUpdated: false, expectedTerraformCode: []string{terraformCodeExampleAwsProviderEmptyOriginal}},
+		{testName: "one empty aws provider, with region override", originalTerraformCode: terraformCodeExampleAwsProviderEmptyOriginal, attributesToOverride: map[string]string{"region": `"eu-west-1"`}, expectedCodeWasUpdated: false, expectedTerraformCode: []string{terraformCodeExampleAwsProviderEmptyOriginal}},
+		{testName: "one empty aws provider, with region, version override", originalTerraformCode: terraformCodeExampleAwsProviderEmptyOriginal, attributesToOverride: map[string]string{"region": `"eu-west-1"`, "version": `"0.3.0"`}, expectedCodeWasUpdated: false, expectedTerraformCode: []string{terraformCodeExampleAwsProviderEmptyOriginal}},
+		{testName: "one non-empty aws provider, but no overrides", originalTerraformCode: terraformCodeExampleAwsProviderNonEmptyOriginal, attributesToOverride: nil, expectedCodeWasUpdated: false, expectedTerraformCode: []string{terraformCodeExampleAwsProviderNonEmptyOriginal}},
+		{testName: "one non-empty aws provider, with region override", originalTerraformCode: terraformCodeExampleAwsProviderNonEmptyOriginal, attributesToOverride: map[string]string{"region": `"eu-west-1"`}, expectedCodeWasUpdated: true, expectedTerraformCode: []string{terraformCodeExampleAwsProviderRegionOverridenVersionNotOverriddenExpected}},
+		{testName: "one non-empty aws provider, with region, version override", originalTerraformCode: terraformCodeExampleAwsProviderNonEmptyOriginal, attributesToOverride: map[string]string{"region": `"eu-west-1"`, "version": `"0.3.0"`}, expectedCodeWasUpdated: true, expectedTerraformCode: []string{terraformCodeExampleAwsProviderRegionVersionOverridenExpected, terraformCodeExampleAwsProviderRegionVersionOverridenReverseOrderExpected}},
+		{testName: "multiple providers, but no overrides", originalTerraformCode: terraformCodeExampleAwsMultipleProvidersOriginal, attributesToOverride: nil, expectedCodeWasUpdated: false, expectedTerraformCode: []string{terraformCodeExampleAwsMultipleProvidersOriginal}},
+		{testName: "multiple providers, with region override", originalTerraformCode: terraformCodeExampleAwsMultipleProvidersOriginal, attributesToOverride: map[string]string{"region": `"eu-west-1"`}, expectedCodeWasUpdated: true, expectedTerraformCode: []string{terraformCodeExampleAwsMultipleProvidersRegionOverridenExpected}},
+		{testName: "multiple providers, with region, version override", originalTerraformCode: terraformCodeExampleAwsMultipleProvidersOriginal, attributesToOverride: map[string]string{"region": `"eu-west-1"`, "version": `"0.3.0"`}, expectedCodeWasUpdated: true, expectedTerraformCode: []string{terraformCodeExampleAwsMultipleProvidersRegionVersionOverridenExpected}},
+		{testName: "multiple providers with comments, but no overrides", originalTerraformCode: terraformCodeExampleAwsMultipleProvidersNonEmptyWithCommentsOriginal, attributesToOverride: nil, expectedCodeWasUpdated: false, expectedTerraformCode: []string{terraformCodeExampleAwsMultipleProvidersNonEmptyWithCommentsOriginal}},
+		{testName: "multiple providers with comments, with region override", originalTerraformCode: terraformCodeExampleAwsMultipleProvidersNonEmptyWithCommentsOriginal, attributesToOverride: map[string]string{"region": `"eu-west-1"`}, expectedCodeWasUpdated: true, expectedTerraformCode: []string{terraformCodeExampleAwsMultipleProvidersNonEmptyWithCommentsRegionOverriddenExpected}},
+		{testName: "multiple providers with comments, with region, version override", originalTerraformCode: terraformCodeExampleAwsMultipleProvidersNonEmptyWithCommentsOriginal, attributesToOverride: map[string]string{"region": `"eu-west-1"`, "version": `"0.3.0"`}, expectedCodeWasUpdated: true, expectedTerraformCode: []string{terraformCodeExampleAwsMultipleProvidersNonEmptyWithCommentsRegionVersionOverriddenExpected}},
+		{testName: "one provider with nested blocks, with region and role_arn override", originalTerraformCode: terraformCodeExampleAwsOneProviderNestedBlocks, attributesToOverride: map[string]string{"region": `"eu-west-1"`, "assume_role.role_arn": `"nested-override"`}, expectedCodeWasUpdated: true, expectedTerraformCode: []string{terraformCodeExampleAwsOneProviderNestedBlocksRegionRoleArnExpected}},
+		{testName: "one provider with nested blocks, with region and role_arn override, plus non-matching overrides", originalTerraformCode: terraformCodeExampleAwsOneProviderNestedBlocks, attributesToOverride: map[string]string{"region": `"eu-west-1"`, "assume_role.role_arn": `"nested-override"`, "should-be": `"ignored"`, "assume_role.should-be": `"ignored"`}, expectedCodeWasUpdated: true, expectedTerraformCode: []string{terraformCodeExampleAwsOneProviderNestedBlocksRegionRoleArnExpected}},
 	}
 
 	for _, testCase := range testCases {
diff --git a/cli/commands/catalog/module/doc_test.go b/cli/commands/catalog/module/doc_test.go
index 7b24fd78..9758be46 100644
--- a/cli/commands/catalog/module/doc_test.go
+++ b/cli/commands/catalog/module/doc_test.go
@@ -184,37 +184,37 @@ func TestElement(t *testing.T) {
 	testCases := []struct {
 		content              string
 		fileExt              string
-		maxDescriptionLength int
 		expectedTitle        string
 		expectedDescription  string
+		maxDescriptionLength int
 	}{
 		{
-			testH1EksK8sArgocd,
-			".md",
-			200,
-			"EKS K8s GitOps Module",
-			"This module deploys Argo CD to an EKS cluster. Argo CD is a declarative GitOps continuous delivery tool for Kubernetes. See the Argo CD for more details.",
+			content:              testH1EksK8sArgocd,
+			fileExt:              ".md",
+			maxDescriptionLength: 200,
+			expectedTitle:        "EKS K8s GitOps Module",
+			expectedDescription:  "This module deploys Argo CD to an EKS cluster. Argo CD is a declarative GitOps continuous delivery tool for Kubernetes. See the Argo CD for more details.",
 		},
 		{
-			testH1EksCloudwatchAgent,
-			".md",
-			200,
-			"EKS CloudWatch Agent Module",
-			"This Terraform Module installs and configures Amazon CloudWatch Agent on an EKS cluster, so that each node runs the agent to collect more system-level metrics from Amazon EC2 instances and ship them to Amazon CloudWatch.",
+			content:              testH1EksCloudwatchAgent,
+			fileExt:              ".md",
+			maxDescriptionLength: 200,
+			expectedTitle:        "EKS CloudWatch Agent Module",
+			expectedDescription:  "This Terraform Module installs and configures Amazon CloudWatch Agent on an EKS cluster, so that each node runs the agent to collect more system-level metrics from Amazon EC2 instances and ship them to Amazon CloudWatch.",
 		},
 		{
-			testH1EcsCluster,
-			".md",
-			200,
-			"Amazon ECS Cluster",
-			"This service contains Terraform code to deploy a production-grade ECS cluster on AWS using Elastic Container Service (ECS).",
+			content:              testH1EcsCluster,
+			fileExt:              ".md",
+			maxDescriptionLength: 200,
+			expectedTitle:        "Amazon ECS Cluster",
+			expectedDescription:  "This service contains Terraform code to deploy a production-grade ECS cluster on AWS using Elastic Container Service (ECS).",
 		},
 		{
-			testH1EksAWSAuthMerger,
-			".adoc",
-			200,
-			"EKS AWS Auth Merger",
-			"This module contains a go CLI, docker container, and terraform module for deploying a Kubernetes controller for managing mappings between AWS IAM roles and users to RBAC groups in Kubernetes.",
+			content:              testH1EksAWSAuthMerger,
+			fileExt:              ".adoc",
+			maxDescriptionLength: 200,
+			expectedTitle:        "EKS AWS Auth Merger",
+			expectedDescription:  "This module contains a go CLI, docker container, and terraform module for deploying a Kubernetes controller for managing mappings between AWS IAM roles and users to RBAC groups in Kubernetes.",
 		},
 	}
 
diff --git a/cli/commands/catalog/module/repo_test.go b/cli/commands/catalog/module/repo_test.go
index 472d5737..30004bd0 100644
--- a/cli/commands/catalog/module/repo_test.go
+++ b/cli/commands/catalog/module/repo_test.go
@@ -24,13 +24,13 @@ func TestFindModules(t *testing.T) {
 	}
 
 	testCases := []struct {
+		expectedErr  error
 		repoPath     string
 		expectedData []moduleData
-		expectedErr  error
 	}{
 		{
-			"testdata/find_modules",
-			[]moduleData{
+			repoPath: "testdata/find_modules",
+			expectedData: []moduleData{
 				{
 					title:       "ALB Ingress Controller Module",
 					description: "This Terraform Module installs and configures the AWS ALB Ingress Controller on an EKS cluster, so that you can configure an ALB using Ingress resources.",
@@ -49,7 +49,6 @@ func TestFindModules(t *testing.T) {
 					url:         "https://github.com/gruntwork-io/terraform-aws-eks/tree/master/modules/eks-aws-auth-merger",
 					moduleDir:   "modules/eks-aws-auth-merger",
 				}},
-			nil,
 		},
 	}
 
@@ -92,60 +91,60 @@ func TestModuleURL(t *testing.T) {
 	t.Parallel()
 
 	testCases := []struct {
-		name        string
+		expectedErr error
 		repo        *module.Repo
+		name        string
 		moduleDir   string
 		expectedURL string
-		expectedErr error
 	}{
 		{
-			"github",
-			newRepo(t, "https://github.com/acme/terraform-aws-modules"),
-			".",
-			"https://github.com/acme/terraform-aws-modules/tree/main/.",
-			nil,
+			name:        "github",
+			repo:        newRepo(t, "https://github.com/acme/terraform-aws-modules"),
+			moduleDir:   ".",
+			expectedURL: "https://github.com/acme/terraform-aws-modules/tree/main/.",
+			expectedErr: nil,
 		},
 		{
-			"github enterprise",
-			newRepo(t, "https://github.acme.com/acme/terraform-aws-modules"),
-			".",
-			"https://github.acme.com/acme/terraform-aws-modules/tree/main/.",
-			nil,
+			name:        "github enterprise",
+			repo:        newRepo(t, "https://github.acme.com/acme/terraform-aws-modules"),
+			moduleDir:   ".",
+			expectedURL: "https://github.acme.com/acme/terraform-aws-modules/tree/main/.",
+			expectedErr: nil,
 		},
 		{
-			"gitlab",
-			newRepo(t, "https://gitlab.com/acme/terraform-aws-modules"),
-			".",
-			"https://gitlab.com/acme/terraform-aws-modules/-/tree/main/.",
-			nil,
+			name:        "gitlab",
+			repo:        newRepo(t, "https://gitlab.com/acme/terraform-aws-modules"),
+			moduleDir:   ".",
+			expectedURL: "https://gitlab.com/acme/terraform-aws-modules/-/tree/main/.",
+			expectedErr: nil,
 		},
 		{
-			"gitlab self-hosted",
-			newRepo(t, "https://gitlab.acme.com/acme/terraform-aws-modules"),
-			".",
-			"https://gitlab.acme.com/acme/terraform-aws-modules/-/tree/main/.",
-			nil,
+			name:        "gitlab self-hosted",
+			repo:        newRepo(t, "https://gitlab.acme.com/acme/terraform-aws-modules"),
+			moduleDir:   ".",
+			expectedURL: "https://gitlab.acme.com/acme/terraform-aws-modules/-/tree/main/.",
+			expectedErr: nil,
 		},
 		{
-			"bitbucket",
-			newRepo(t, "https://bitbucket.org/acme/terraform-aws-modules"),
-			".",
-			"https://bitbucket.org/acme/terraform-aws-modules/browse/.?at=main",
-			nil,
+			name:        "bitbucket",
+			repo:        newRepo(t, "https://bitbucket.org/acme/terraform-aws-modules"),
+			moduleDir:   ".",
+			expectedURL: "https://bitbucket.org/acme/terraform-aws-modules/browse/.?at=main",
+			expectedErr: nil,
 		},
 		{
-			"azuredev",
-			newRepo(t, "https://dev.azure.com/acme/terraform-aws-modules"),
-			".",
-			"https://dev.azure.com/_git/acme/terraform-aws-modules?path=.&version=GBmain",
-			nil,
+			name:        "azuredev",
+			repo:        newRepo(t, "https://dev.azure.com/acme/terraform-aws-modules"),
+			moduleDir:   ".",
+			expectedURL: "https://dev.azure.com/_git/acme/terraform-aws-modules?path=.&version=GBmain",
+			expectedErr: nil,
 		},
 		{
-			"unsupported",
-			newRepo(t, "https://fake.com/acme/terraform-aws-modules"),
-			".",
-			"",
-			errors.Errorf("hosting: %q is not supported yet", "fake.com"),
+			name:        "unsupported",
+			repo:        newRepo(t, "https://fake.com/acme/terraform-aws-modules"),
+			moduleDir:   ".",
+			expectedURL: "",
+			expectedErr: errors.Errorf("hosting: %q is not supported yet", "fake.com"),
 		},
 	}
 
diff --git a/cli/commands/find/find_test.go b/cli/commands/find/find_test.go
index 6a57a73c..e8984406 100644
--- a/cli/commands/find/find_test.go
+++ b/cli/commands/find/find_test.go
@@ -20,15 +20,15 @@ func TestRun(t *testing.T) {
 	t.Parallel()
 
 	tests := []struct {
-		name          string
 		setup         func(t *testing.T) string
-		expectedPaths []string
+		validate      func(t *testing.T, output string, expectedPaths []string)
+		name          string
 		format        string
 		mode          string
+		expectedPaths []string
 		hidden        bool
 		dependencies  bool
 		external      bool
-		validate      func(t *testing.T, output string, expectedPaths []string)
 	}{
 		{
 			name: "basic discovery",
diff --git a/cli/commands/run/cli_test.go b/cli/commands/run/cli_test.go
index 1cccf50f..14f28fa7 100644
--- a/cli/commands/run/cli_test.go
+++ b/cli/commands/run/cli_test.go
@@ -14,9 +14,9 @@ func TestAction(t *testing.T) {
 	t.Parallel()
 
 	tt := []struct {
-		name        string
-		opts        *options.TerragruntOptions
 		expectedErr error
+		opts        *options.TerragruntOptions
+		name        string
 	}{
 		{
 			name: "wrong tofu command",
diff --git a/cli/commands/run/download_source_test.go b/cli/commands/run/download_source_test.go
index f6d5b648..d4274ad1 100644
--- a/cli/commands/run/download_source_test.go
+++ b/cli/commands/run/download_source_test.go
@@ -321,46 +321,28 @@ func TestDownloadTerraformSourceFromLocalFolderWithManifest(t *testing.T) {
 	})
 
 	testCases := []struct {
+		comp      assert.Comparison
 		name      string
 		sourceURL string
-		comp      assert.Comparison
 	}{
-		{
-			"test-stale-file-exists", "../../../test/fixtures/manifest/version-1",
-			func() bool {
-				return util.FileExists(filepath.Join(downloadDir, "stale.tf"))
-			},
-		},
-		{
-			"test-stale-file-doesnt-exist-after-source-update", "../../../test/fixtures/manifest/version-2",
-			func() bool {
-				return !util.FileExists(filepath.Join(downloadDir, "stale.tf"))
-			},
-		},
-		{
-			"test-tffile-exists-in-subfolder", "../../../test/fixtures/manifest/version-3-subfolder",
-			func() bool {
-				return util.FileExists(filepath.Join(downloadDir, "sub", "main.tf"))
-			},
-		},
-		{
-			"test-tffile-doesnt-exist-in-subfolder", "../../../test/fixtures/manifest/version-4-subfolder-empty",
-			func() bool {
-				return !util.FileExists(filepath.Join(downloadDir, "sub", "main.tf"))
-			},
-		},
-		{
-			"test-empty-folder-gets-copied", testDir,
-			func() bool {
-				return util.FileExists(filepath.Join(downloadDir, "sub2"))
-			},
-		},
-		{
-			"test-empty-folder-gets-populated", "../../../test/fixtures/manifest/version-5-not-empty-subfolder",
-			func() bool {
-				return util.FileExists(filepath.Join(downloadDir, "sub2", "main.tf"))
-			},
-		},
+		{name: "test-stale-file-exists", sourceURL: "../../../test/fixtures/manifest/version-1", comp: func() bool {
+			return util.FileExists(filepath.Join(downloadDir, "stale.tf"))
+		}},
+		{name: "test-stale-file-doesnt-exist-after-source-update", sourceURL: "../../../test/fixtures/manifest/version-2", comp: func() bool {
+			return !util.FileExists(filepath.Join(downloadDir, "stale.tf"))
+		}},
+		{name: "test-tffile-exists-in-subfolder", sourceURL: "../../../test/fixtures/manifest/version-3-subfolder", comp: func() bool {
+			return util.FileExists(filepath.Join(downloadDir, "sub", "main.tf"))
+		}},
+		{name: "test-tffile-doesnt-exist-in-subfolder", sourceURL: "../../../test/fixtures/manifest/version-4-subfolder-empty", comp: func() bool {
+			return !util.FileExists(filepath.Join(downloadDir, "sub", "main.tf"))
+		}},
+		{name: "test-empty-folder-gets-copied", sourceURL: testDir, comp: func() bool {
+			return util.FileExists(filepath.Join(downloadDir, "sub2"))
+		}},
+		{name: "test-empty-folder-gets-populated", sourceURL: "../../../test/fixtures/manifest/version-5-not-empty-subfolder", comp: func() bool {
+			return util.FileExists(filepath.Join(downloadDir, "sub2", "main.tf"))
+		}},
 	}
 
 	// The test cases are run sequentially because they depend on each other.
@@ -372,9 +354,7 @@ func TestDownloadTerraformSourceFromLocalFolderWithManifest(t *testing.T) {
 			copyFolder(t, testCase.sourceURL, downloadDir)
 			assert.Condition(t, testCase.comp)
 		})
-
 	}
-
 }
 
 func testDownloadTerraformSourceIfNecessary(t *testing.T, canonicalURL string, downloadDir string, sourceUpdate bool, expectedFileContents string, requireInitFile bool) {
diff --git a/cli/commands/run/run_test.go b/cli/commands/run/run_test.go
index 3c067c9d..86206528 100644
--- a/cli/commands/run/run_test.go
+++ b/cli/commands/run/run_test.go
@@ -21,10 +21,10 @@ func TestSetTerragruntInputsAsEnvVars(t *testing.T) {
 	t.Parallel()
 
 	testCases := []struct {
-		description    string
 		envVarsInOpts  map[string]string
 		inputsInConfig map[string]any
 		expected       map[string]string
+		description    string
 	}{
 		{
 			description:    "No env vars in opts, no inputs",
@@ -96,13 +96,33 @@ func TestTerragruntTerraformCodeCheck(t *testing.T) {
 			workingDir:  "test-fixtures/dir-with-terraform",
 			valid:       true,
 		},
+		{
+			description: "Directory with plain OpenTofu",
+			workingDir:  "test-fixtures/dir-with-tofu",
+			valid:       true,
+		},
+		{
+			description: "Directory with plain Terraform and OpenTofu",
+			workingDir:  "test-fixtures/dir-with-terraform-and-tofu",
+			valid:       true,
+		},
 		{
 			description: "Directory with JSON formatted Terraform",
 			workingDir:  "test-fixtures/dir-with-terraform-json",
 			valid:       true,
 		},
 		{
-			description: "Directory with no Terraform",
+			description: "Directory with JSON formatted OpenTofu",
+			workingDir:  "test-fixtures/dir-with-tofu-json",
+			valid:       true,
+		},
+		{
+			description: "Directory with JSON formatted Terraform and OpenTofu",
+			workingDir:  "test-fixtures/dir-with-terraform-and-tofu-json",
+			valid:       true,
+		},
+		{
+			description: "Directory with no Terraform or OpenTofu",
 			workingDir:  "test-fixtures/dir-with-no-terraform",
 			valid:       false,
 		},
@@ -258,49 +278,49 @@ func TestToTerraformEnvVars(t *testing.T) {
 	t.Parallel()
 
 	testCases := []struct {
-		description string
 		vars        map[string]any
 		expected    map[string]string
+		description string
 	}{
 		{
-			"empty",
-			map[string]any{},
-			map[string]string{},
+			description: "empty",
+			vars:        map[string]any{},
+			expected:    map[string]string{},
 		},
 		{
-			"string value",
-			map[string]any{"foo": "bar"},
-			map[string]string{"TF_VAR_foo": `bar`},
+			description: "string value",
+			vars:        map[string]any{"foo": "bar"},
+			expected:    map[string]string{"TF_VAR_foo": `bar`},
 		},
 		{
-			"int value",
-			map[string]any{"foo": 42},
-			map[string]string{"TF_VAR_foo": `42`},
+			description: "int value",
+			vars:        map[string]any{"foo": 42},
+			expected:    map[string]string{"TF_VAR_foo": `42`},
 		},
 		{
-			"bool value",
-			map[string]any{"foo": true},
-			map[string]string{"TF_VAR_foo": `true`},
+			description: "bool value",
+			vars:        map[string]any{"foo": true},
+			expected:    map[string]string{"TF_VAR_foo": `true`},
 		},
 		{
-			"list value",
-			map[string]any{"foo": []string{"a", "b", "c"}},
-			map[string]string{"TF_VAR_foo": `["a","b","c"]`},
+			description: "list value",
+			vars:        map[string]any{"foo": []string{"a", "b", "c"}},
+			expected:    map[string]string{"TF_VAR_foo": `["a","b","c"]`},
 		},
 		{
-			"map value",
-			map[string]any{"foo": map[string]any{"a": "b", "c": "d"}},
-			map[string]string{"TF_VAR_foo": `{"a":"b","c":"d"}`},
+			description: "map value",
+			vars:        map[string]any{"foo": map[string]any{"a": "b", "c": "d"}},
+			expected:    map[string]string{"TF_VAR_foo": `{"a":"b","c":"d"}`},
 		},
 		{
-			"nested map value",
-			map[string]any{"foo": map[string]any{"a": []int{1, 2, 3}, "b": "c", "d": map[string]any{"e": "f"}}},
-			map[string]string{"TF_VAR_foo": `{"a":[1,2,3],"b":"c","d":{"e":"f"}}`},
+			description: "nested map value",
+			vars:        map[string]any{"foo": map[string]any{"a": []int{1, 2, 3}, "b": "c", "d": map[string]any{"e": "f"}}},
+			expected:    map[string]string{"TF_VAR_foo": `{"a":[1,2,3],"b":"c","d":{"e":"f"}}`},
 		},
 		{
-			"multiple values",
-			map[string]any{"str": "bar", "int": 42, "bool": false, "list": []int{1, 2, 3}, "map": map[string]any{"a": "b"}},
-			map[string]string{"TF_VAR_str": `bar`, "TF_VAR_int": `42`, "TF_VAR_bool": `false`, "TF_VAR_list": `[1,2,3]`, "TF_VAR_map": `{"a":"b"}`},
+			description: "multiple values",
+			vars:        map[string]any{"str": "bar", "int": 42, "bool": false, "list": []int{1, 2, 3}, "map": map[string]any{"a": "b"}},
+			expected:    map[string]string{"TF_VAR_str": `bar`, "TF_VAR_int": `42`, "TF_VAR_bool": `false`, "TF_VAR_list": `[1,2,3]`, "TF_VAR_map": `{"a":"b"}`},
 		},
 	}
 
@@ -492,8 +512,8 @@ func TestShouldCopyLockFile(t *testing.T) {
 	t.Parallel()
 
 	type args struct {
-		args            []string
 		terraformConfig *config.TerraformConfig
+		args            []string
 	}
 	tests := []struct {
 		name string
diff --git a/cli/commands/stack/output_test.go b/cli/commands/stack/output_test.go
index 15ced902..ab976b89 100644
--- a/cli/commands/stack/output_test.go
+++ b/cli/commands/stack/output_test.go
@@ -31,9 +31,9 @@ func TestFilterOutputs(t *testing.T) {
 	tests := []struct {
 		name        string
 		outputIndex string
+		expectedKey string
 		expectedLen int
 		shouldExist bool
-		expectedKey string
 	}{
 		{
 			name:        "empty output index returns flattened map",
@@ -141,8 +141,8 @@ func TestPrintJsonOutput(t *testing.T) {
 
 // Mock implementation for testing
 type mockWriter struct {
-	written []byte
 	err     error
+	written []byte
 }
 
 func (m *mockWriter) Write(p []byte) (n int, err error) {
@@ -163,9 +163,9 @@ func TestPrintOutputs(t *testing.T) {
 	}
 
 	tests := []struct {
+		writerErr   error
 		name        string
 		outputIndex string
-		writerErr   error
 		shouldError bool
 	}{
 		{
diff --git a/cli/provider_cache_test.go b/cli/provider_cache_test.go
index 81b3d922..9ef42766 100644
--- a/cli/provider_cache_test.go
+++ b/cli/provider_cache_test.go
@@ -51,12 +51,12 @@ func TestProviderCache(t *testing.T) {
 	opts := []cache.Option{cache.WithToken(token), cache.WithCacheProviderHTTPStatusCode(cli.CacheProviderHTTPStatusCode)}
 
 	testCases := []struct {
-		opts               []cache.Option
+		expectedBodyReg    *regexp.Regexp
 		fullURLPath        string
 		relURLPath         string
-		expectedStatusCode int
-		expectedBodyReg    *regexp.Regexp
 		expectedCachePath  string
+		opts               []cache.Option
+		expectedStatusCode int
 	}{
 		{
 			opts:               opts,
diff --git a/codegen/generate_test.go b/codegen/generate_test.go
index 702b968d..d2d7bd98 100644
--- a/codegen/generate_test.go
+++ b/codegen/generate_test.go
@@ -185,13 +185,13 @@ func TestFmtGeneratedFile(t *testing.T) {
 	bFalse := false
 
 	tc := []struct {
-		name     string
-		disabled bool
 		fmt      *bool
+		name     string
 		path     string
 		contents string
 		expected string
 		ifExists codegen.GenerateConfigExists
+		disabled bool
 	}{
 		{
 			name:     "fmt-simple-hcl-file",
@@ -258,24 +258,24 @@ func TestGenerateDisabling(t *testing.T) {
 
 	tc := []struct {
 		name     string
-		disabled bool
 		path     string
 		contents string
 		ifExists codegen.GenerateConfigExists
+		disabled bool
 	}{
 		{
-			"generate-disabled-true",
-			true,
-			fmt.Sprintf("%s/%s", testDir, "disabled_true"),
-			"this file should not be generated",
-			codegen.ExistsError,
+			name:     "generate-disabled-true",
+			path:     fmt.Sprintf("%s/%s", testDir, "disabled_true"),
+			contents: "this file should not be generated",
+			ifExists: codegen.ExistsError,
+			disabled: true,
 		},
 		{
-			"generate-disabled-false",
-			false,
-			fmt.Sprintf("%s/%s", testDir, "disabled_false"),
-			"this file should be generated",
-			codegen.ExistsError,
+			name:     "generate-disabled-false",
+			path:     fmt.Sprintf("%s/%s", testDir, "disabled_false"),
+			contents: "this file should be generated",
+			ifExists: codegen.ExistsError,
+			disabled: false,
 		},
 	}
 
diff --git a/config/catalog_test.go b/config/catalog_test.go
index 351d32f2..8d606fd6 100644
--- a/config/catalog_test.go
+++ b/config/catalog_test.go
@@ -22,13 +22,13 @@ func TestCatalogParseConfigFile(t *testing.T) {
 	basePath := filepath.Join(curDir, "../test/fixtures/catalog")
 
 	testCases := []struct {
-		configPath     string
-		expectedConfig *config.CatalogConfig
 		expectedErr    error
+		expectedConfig *config.CatalogConfig
+		configPath     string
 	}{
 		{
-			filepath.Join(basePath, "config1.hcl"),
-			&config.CatalogConfig{
+			configPath: filepath.Join(basePath, "config1.hcl"),
+			expectedConfig: &config.CatalogConfig{
 				URLs: []string{
 					filepath.Join(basePath, "terraform-aws-eks"), // this path exists in the fixture directory and must be converted to the absolute path.
 					"/repo-copier",
@@ -37,94 +37,83 @@ func TestCatalogParseConfigFile(t *testing.T) {
 					"github.com/gruntwork-io/terraform-aws-lambda",
 				},
 			},
-			nil,
 		},
 		{
-			filepath.Join(basePath, "config2.hcl"),
-			nil,
-			nil,
+			configPath: filepath.Join(basePath, "config2.hcl"),
 		},
 		{
-			filepath.Join(basePath, "config3.hcl"),
-			&config.CatalogConfig{},
-			nil,
+			configPath:     filepath.Join(basePath, "config3.hcl"),
+			expectedConfig: &config.CatalogConfig{},
 		},
 		{
-			filepath.Join(basePath, "complex-legacy-root/terragrunt.hcl"),
-			&config.CatalogConfig{
+			configPath: filepath.Join(basePath, "complex-legacy-root/terragrunt.hcl"),
+			expectedConfig: &config.CatalogConfig{
 				URLs: []string{
 					filepath.Join(basePath, "complex-legacy-root/dev/us-west-1/modules/terraform-aws-eks"),
 					"./terraform-aws-service-catalog",
 					"https://github.com/gruntwork-io/terraform-aws-utilities",
 				},
 			},
-			nil,
 		},
 		{
-			filepath.Join(basePath, "complex/root.hcl"),
-			&config.CatalogConfig{
+			configPath: filepath.Join(basePath, "complex/root.hcl"),
+			expectedConfig: &config.CatalogConfig{
 				URLs: []string{
 					filepath.Join(basePath, "complex/dev/us-west-1/modules/terraform-aws-eks"),
 					"./terraform-aws-service-catalog",
 					"https://github.com/gruntwork-io/terraform-aws-utilities",
 				},
 			},
-			nil,
 		},
 		{
-			filepath.Join(basePath, "complex-legacy-root/dev/terragrunt.hcl"),
-			&config.CatalogConfig{
+			configPath: filepath.Join(basePath, "complex-legacy-root/dev/terragrunt.hcl"),
+			expectedConfig: &config.CatalogConfig{
 				URLs: []string{
 					filepath.Join(basePath, "complex-legacy-root/dev/us-west-1/modules/terraform-aws-eks"),
 					"./terraform-aws-service-catalog",
 					"https://github.com/gruntwork-io/terraform-aws-utilities",
 				},
 			},
-			nil,
 		},
 		{
-			filepath.Join(basePath, "complex/dev/root.hcl"),
-			&config.CatalogConfig{
+			configPath: filepath.Join(basePath, "complex/dev/root.hcl"),
+			expectedConfig: &config.CatalogConfig{
 				URLs: []string{
 					filepath.Join(basePath, "complex/dev/us-west-1/modules/terraform-aws-eks"),
 					"./terraform-aws-service-catalog",
 					"https://github.com/gruntwork-io/terraform-aws-utilities",
 				},
 			},
-			nil,
 		},
 		{
-			filepath.Join(basePath, "complex/dev/us-west-1/terragrunt.hcl"),
-			&config.CatalogConfig{
+			configPath: filepath.Join(basePath, "complex/dev/us-west-1/terragrunt.hcl"),
+			expectedConfig: &config.CatalogConfig{
 				URLs: []string{
 					filepath.Join(basePath, "complex/dev/us-west-1/modules/terraform-aws-eks"),
 					"./terraform-aws-service-catalog",
 					"https://github.com/gruntwork-io/terraform-aws-utilities",
 				},
 			},
-			nil,
 		},
 		{
-			filepath.Join(basePath, "complex/dev/us-west-1/modules/terragrunt.hcl"),
-			&config.CatalogConfig{
+			configPath: filepath.Join(basePath, "complex/dev/us-west-1/modules/terragrunt.hcl"),
+			expectedConfig: &config.CatalogConfig{
 				URLs: []string{
 					filepath.Join(basePath, "complex/dev/us-west-1/modules/terraform-aws-eks"),
 					"./terraform-aws-service-catalog",
 					"https://github.com/gruntwork-io/terraform-aws-utilities",
 				},
 			},
-			nil,
 		},
 		{
-			filepath.Join(basePath, "complex/prod/terragrunt.hcl"),
-			&config.CatalogConfig{
+			configPath: filepath.Join(basePath, "complex/prod/terragrunt.hcl"),
+			expectedConfig: &config.CatalogConfig{
 				URLs: []string{
 					filepath.Join(basePath, "complex/dev/us-west-1/modules/terraform-aws-eks"),
 					"./terraform-aws-service-catalog",
 					"https://github.com/gruntwork-io/terraform-aws-utilities",
 				},
 			},
-			nil,
 		},
 	}
 
diff --git a/config/config_helpers_test.go b/config/config_helpers_test.go
index 4652f12b..ab89148b 100644
--- a/config/config_helpers_test.go
+++ b/config/config_helpers_test.go
@@ -21,60 +21,52 @@ func TestPathRelativeToInclude(t *testing.T) {
 
 	tc := []struct {
 		include           map[string]config.IncludeConfig
-		params            []string
 		terragruntOptions *options.TerragruntOptions
 		expectedPath      string
+		params            []string
 	}{
 		{
-			nil,
-			nil,
-			terragruntOptionsForTest(t, helpers.RootFolder+"child/"+config.DefaultTerragruntConfigPath),
-			".",
+			terragruntOptions: terragruntOptionsForTest(t, helpers.RootFolder+"child/"+config.DefaultTerragruntConfigPath),
+			expectedPath:      ".",
 		},
 		{
-			map[string]config.IncludeConfig{"": {Path: "../" + config.DefaultTerragruntConfigPath}},
-			nil,
-			terragruntOptionsForTest(t, helpers.RootFolder+"child/"+config.DefaultTerragruntConfigPath),
-			"child",
+			include:           map[string]config.IncludeConfig{"": {Path: "../" + config.DefaultTerragruntConfigPath}},
+			terragruntOptions: terragruntOptionsForTest(t, helpers.RootFolder+"child/"+config.DefaultTerragruntConfigPath),
+			expectedPath:      "child",
 		},
 		{
-			map[string]config.IncludeConfig{"": {Path: helpers.RootFolder + config.DefaultTerragruntConfigPath}},
-			nil,
-			terragruntOptionsForTest(t, helpers.RootFolder+"child/"+config.DefaultTerragruntConfigPath),
-			"child",
+			include:           map[string]config.IncludeConfig{"": {Path: helpers.RootFolder + config.DefaultTerragruntConfigPath}},
+			terragruntOptions: terragruntOptionsForTest(t, helpers.RootFolder+"child/"+config.DefaultTerragruntConfigPath),
+			expectedPath:      "child",
 		},
 		{
-			map[string]config.IncludeConfig{"": {Path: "../../../" + config.DefaultTerragruntConfigPath}},
-			nil,
-			terragruntOptionsForTest(t, helpers.RootFolder+"child/sub-child/sub-sub-child/"+config.DefaultTerragruntConfigPath),
-			"child/sub-child/sub-sub-child",
+			include:           map[string]config.IncludeConfig{"": {Path: "../../../" + config.DefaultTerragruntConfigPath}},
+			terragruntOptions: terragruntOptionsForTest(t, helpers.RootFolder+"child/sub-child/sub-sub-child/"+config.DefaultTerragruntConfigPath),
+			expectedPath:      "child/sub-child/sub-sub-child",
 		},
 		{
-			map[string]config.IncludeConfig{"": {Path: helpers.RootFolder + config.DefaultTerragruntConfigPath}},
-			nil,
-			terragruntOptionsForTest(t, helpers.RootFolder+"child/sub-child/sub-sub-child/"+config.DefaultTerragruntConfigPath),
-			"child/sub-child/sub-sub-child",
+			include:           map[string]config.IncludeConfig{"": {Path: helpers.RootFolder + config.DefaultTerragruntConfigPath}},
+			terragruntOptions: terragruntOptionsForTest(t, helpers.RootFolder+"child/sub-child/sub-sub-child/"+config.DefaultTerragruntConfigPath),
+			expectedPath:      "child/sub-child/sub-sub-child",
 		},
 		{
-			map[string]config.IncludeConfig{"": {Path: "../../other-child/" + config.DefaultTerragruntConfigPath}},
-			nil,
-			terragruntOptionsForTest(t, helpers.RootFolder+"child/sub-child/"+config.DefaultTerragruntConfigPath),
-			"../child/sub-child",
+			include:           map[string]config.IncludeConfig{"": {Path: "../../other-child/" + config.DefaultTerragruntConfigPath}},
+			terragruntOptions: terragruntOptionsForTest(t, helpers.RootFolder+"child/sub-child/"+config.DefaultTerragruntConfigPath),
+			expectedPath:      "../child/sub-child",
 		},
 		{
-			map[string]config.IncludeConfig{"": {Path: "../../" + config.DefaultTerragruntConfigPath}},
-			nil,
-			terragruntOptionsForTest(t, "../child/sub-child/"+config.DefaultTerragruntConfigPath),
-			"child/sub-child",
+			include:           map[string]config.IncludeConfig{"": {Path: "../../" + config.DefaultTerragruntConfigPath}},
+			terragruntOptions: terragruntOptionsForTest(t, "../child/sub-child/"+config.DefaultTerragruntConfigPath),
+			expectedPath:      "child/sub-child",
 		},
 		{
-			map[string]config.IncludeConfig{
+			include: map[string]config.IncludeConfig{
 				"root":  {Path: "../../" + config.DefaultTerragruntConfigPath},
 				"child": {Path: "../../other-child/" + config.DefaultTerragruntConfigPath},
 			},
-			[]string{"child"},
-			terragruntOptionsForTest(t, "../child/sub-child/"+config.DefaultTerragruntConfigPath),
-			"../child/sub-child",
+			params:            []string{"child"},
+			terragruntOptions: terragruntOptionsForTest(t, "../child/sub-child/"+config.DefaultTerragruntConfigPath),
+			expectedPath:      "../child/sub-child",
 		},
 	}
 
@@ -92,60 +84,52 @@ func TestPathRelativeFromInclude(t *testing.T) {
 
 	tc := []struct {
 		include           map[string]config.IncludeConfig
-		params            []string
 		terragruntOptions *options.TerragruntOptions
 		expectedPath      string
+		params            []string
 	}{
 		{
-			nil,
-			nil,
-			terragruntOptionsForTest(t, helpers.RootFolder+"child/"+config.DefaultTerragruntConfigPath),
-			".",
+			terragruntOptions: terragruntOptionsForTest(t, helpers.RootFolder+"child/"+config.DefaultTerragruntConfigPath),
+			expectedPath:      ".",
 		},
 		{
-			map[string]config.IncludeConfig{"": {Path: "../" + config.DefaultTerragruntConfigPath}},
-			nil,
-			terragruntOptionsForTest(t, helpers.RootFolder+"child/"+config.DefaultTerragruntConfigPath),
-			"..",
+			include:           map[string]config.IncludeConfig{"": {Path: "../" + config.DefaultTerragruntConfigPath}},
+			terragruntOptions: terragruntOptionsForTest(t, helpers.RootFolder+"child/"+config.DefaultTerragruntConfigPath),
+			expectedPath:      "..",
 		},
 		{
-			map[string]config.IncludeConfig{"": {Path: helpers.RootFolder + config.DefaultTerragruntConfigPath}},
-			nil,
-			terragruntOptionsForTest(t, helpers.RootFolder+"child/"+config.DefaultTerragruntConfigPath),
-			"..",
+			include:           map[string]config.IncludeConfig{"": {Path: helpers.RootFolder + config.DefaultTerragruntConfigPath}},
+			terragruntOptions: terragruntOptionsForTest(t, helpers.RootFolder+"child/"+config.DefaultTerragruntConfigPath),
+			expectedPath:      "..",
 		},
 		{
-			map[string]config.IncludeConfig{"": {Path: "../../../" + config.DefaultTerragruntConfigPath}},
-			nil,
-			terragruntOptionsForTest(t, helpers.RootFolder+"child/sub-child/sub-sub-child/"+config.DefaultTerragruntConfigPath),
-			"../../..",
+			include:           map[string]config.IncludeConfig{"": {Path: "../../../" + config.DefaultTerragruntConfigPath}},
+			terragruntOptions: terragruntOptionsForTest(t, helpers.RootFolder+"child/sub-child/sub-sub-child/"+config.DefaultTerragruntConfigPath),
+			expectedPath:      "../../..",
 		},
 		{
-			map[string]config.IncludeConfig{"": {Path: helpers.RootFolder + config.DefaultTerragruntConfigPath}},
-			nil,
-			terragruntOptionsForTest(t, helpers.RootFolder+"child/sub-child/sub-sub-child/"+config.DefaultTerragruntConfigPath),
-			"../../..",
+			include:           map[string]config.IncludeConfig{"": {Path: helpers.RootFolder + config.DefaultTerragruntConfigPath}},
+			terragruntOptions: terragruntOptionsForTest(t, helpers.RootFolder+"child/sub-child/sub-sub-child/"+config.DefaultTerragruntConfigPath),
+			expectedPath:      "../../..",
 		},
 		{
-			map[string]config.IncludeConfig{"": {Path: "../../other-child/" + config.DefaultTerragruntConfigPath}},
-			nil,
-			terragruntOptionsForTest(t, helpers.RootFolder+"child/sub-child/"+config.DefaultTerragruntConfigPath),
-			"../../other-child",
+			include:           map[string]config.IncludeConfig{"": {Path: "../../other-child/" + config.DefaultTerragruntConfigPath}},
+			terragruntOptions: terragruntOptionsForTest(t, helpers.RootFolder+"child/sub-child/"+config.DefaultTerragruntConfigPath),
+			expectedPath:      "../../other-child",
 		},
 		{
-			map[string]config.IncludeConfig{"": {Path: "../../" + config.DefaultTerragruntConfigPath}},
-			nil,
-			terragruntOptionsForTest(t, "../child/sub-child/"+config.DefaultTerragruntConfigPath),
-			"../..",
+			include:           map[string]config.IncludeConfig{"": {Path: "../../" + config.DefaultTerragruntConfigPath}},
+			terragruntOptions: terragruntOptionsForTest(t, "../child/sub-child/"+config.DefaultTerragruntConfigPath),
+			expectedPath:      "../..",
 		},
 		{
-			map[string]config.IncludeConfig{
+			include: map[string]config.IncludeConfig{
 				"root":  {Path: "../../" + config.DefaultTerragruntConfigPath},
 				"child": {Path: "../../other-child/" + config.DefaultTerragruntConfigPath},
 			},
-			[]string{"child"},
-			terragruntOptionsForTest(t, "../child/sub-child/"+config.DefaultTerragruntConfigPath),
-			"../../other-child",
+			params:            []string{"child"},
+			terragruntOptions: terragruntOptionsForTest(t, "../child/sub-child/"+config.DefaultTerragruntConfigPath),
+			expectedPath:      "../../other-child",
 		},
 	}
 
@@ -163,58 +147,49 @@ func TestRunCommand(t *testing.T) {
 
 	homeDir := os.Getenv("HOME")
 	tc := []struct {
-		params            []string
+		expectedErr       error
 		terragruntOptions *options.TerragruntOptions
 		expectedOutput    string
-		expectedErr       error
+		params            []string
 	}{
 		{
-			[]string{"/bin/bash", "-c", "echo -n foo"},
-			terragruntOptionsForTest(t, homeDir),
-			"foo",
-			nil,
+			params:            []string{"/bin/bash", "-c", "echo -n foo"},
+			terragruntOptions: terragruntOptionsForTest(t, homeDir),
+			expectedOutput:    "foo",
 		},
 		{
-			[]string{"/bin/bash", "-c", "echo foo"},
-			terragruntOptionsForTest(t, homeDir),
-			"foo",
-			nil,
+			params:            []string{"/bin/bash", "-c", "echo foo"},
+			terragruntOptions: terragruntOptionsForTest(t, homeDir),
+			expectedOutput:    "foo",
 		},
 		{
-			[]string{"--terragrunt-quiet", "/bin/bash", "-c", "echo -n foo"},
-			terragruntOptionsForTest(t, homeDir),
-			"foo",
-			nil,
+			params:            []string{"--terragrunt-quiet", "/bin/bash", "-c", "echo -n foo"},
+			terragruntOptions: terragruntOptionsForTest(t, homeDir),
+			expectedOutput:    "foo",
 		},
 		{
-			[]string{"--terragrunt-quiet", "/bin/bash", "-c", "echo foo"},
-			terragruntOptionsForTest(t, homeDir),
-			"foo",
-			nil,
+			params:            []string{"--terragrunt-quiet", "/bin/bash", "-c", "echo foo"},
+			terragruntOptions: terragruntOptionsForTest(t, homeDir),
+			expectedOutput:    "foo",
 		},
 		{
-			[]string{"--terragrunt-global-cache", "/bin/bash", "-c", "echo foo"},
-			terragruntOptionsForTest(t, homeDir),
-			"foo",
-			nil,
+			params:            []string{"--terragrunt-global-cache", "/bin/bash", "-c", "echo foo"},
+			terragruntOptions: terragruntOptionsForTest(t, homeDir),
+			expectedOutput:    "foo",
 		},
 		{
-			[]string{"--terragrunt-global-cache", "--terragrunt-quiet", "/bin/bash", "-c", "echo foo"},
-			terragruntOptionsForTest(t, homeDir),
-			"foo",
-			nil,
+			params:            []string{"--terragrunt-global-cache", "--terragrunt-quiet", "/bin/bash", "-c", "echo foo"},
+			terragruntOptions: terragruntOptionsForTest(t, homeDir),
+			expectedOutput:    "foo",
 		},
 		{
-			[]string{"--terragrunt-quiet", "--terragrunt-global-cache", "/bin/bash", "-c", "echo foo"},
-			terragruntOptionsForTest(t, homeDir),
-			"foo",
-			nil,
+			params:            []string{"--terragrunt-quiet", "--terragrunt-global-cache", "/bin/bash", "-c", "echo foo"},
+			terragruntOptions: terragruntOptionsForTest(t, homeDir),
+			expectedOutput:    "foo",
 		},
 		{
-			nil,
-			terragruntOptionsForTest(t, homeDir),
-			"",
-			config.EmptyStringNotAllowedError("{run_cmd()}"),
+			terragruntOptions: terragruntOptionsForTest(t, homeDir),
+			expectedErr:       config.EmptyStringNotAllowedError("{run_cmd()}"),
 		},
 	}
 	for _, tt := range tc {
@@ -249,96 +224,81 @@ func TestFindInParentFolders(t *testing.T) {
 	t.Parallel()
 
 	tc := []struct {
-		name              string
-		params            []string
+		expectedErr       error
 		terragruntOptions *options.TerragruntOptions
+		name              string
 		expectedPath      string
-		expectedErr       error
+		params            []string
 	}{
 		{
-			"simple-lookup",
-			[]string{"root.hcl"},
-			terragruntOptionsForTest(t, "../test/fixtures/parent-folders/terragrunt-in-root/child/"+config.DefaultTerragruntConfigPath),
-			absPath(t, "../test/fixtures/parent-folders/terragrunt-in-root/root.hcl"),
-			nil,
+			name:              "simple-lookup",
+			params:            []string{"root.hcl"},
+			terragruntOptions: terragruntOptionsForTest(t, "../test/fixtures/parent-folders/terragrunt-in-root/child/"+config.DefaultTerragruntConfigPath),
+			expectedPath:      absPath(t, "../test/fixtures/parent-folders/terragrunt-in-root/root.hcl"),
 		},
 		{
-			"nested-lookup",
-			[]string{"root.hcl"},
-			terragruntOptionsForTest(t, "../test/fixtures/parent-folders/terragrunt-in-root/child/sub-child/sub-sub-child/"+config.DefaultTerragruntConfigPath),
-			absPath(t, "../test/fixtures/parent-folders/terragrunt-in-root/root.hcl"),
-			nil,
+			name:              "nested-lookup",
+			params:            []string{"root.hcl"},
+			terragruntOptions: terragruntOptionsForTest(t, "../test/fixtures/parent-folders/terragrunt-in-root/child/sub-child/sub-sub-child/"+config.DefaultTerragruntConfigPath),
+			expectedPath:      absPath(t, "../test/fixtures/parent-folders/terragrunt-in-root/root.hcl"),
 		},
 		{
-			"lookup-with-max-folders",
-			[]string{"root.hcl"},
-			terragruntOptionsForTestWithMaxFolders(t, "../test/fixtures/parent-folders/no-terragrunt-in-root/child/sub-child/"+config.DefaultTerragruntConfigPath, 3),
-			"",
-			config.ParentFileNotFoundError{},
+			name:              "lookup-with-max-folders",
+			params:            []string{"root.hcl"},
+			terragruntOptions: terragruntOptionsForTestWithMaxFolders(t, "../test/fixtures/parent-folders/no-terragrunt-in-root/child/sub-child/"+config.DefaultTerragruntConfigPath, 3),
+			expectedErr:       config.ParentFileNotFoundError{},
 		},
 		{
-			"multiple-terragrunt-in-parents",
-			[]string{"root.hcl"},
-			terragruntOptionsForTest(t, "../test/fixtures/parent-folders/multiple-terragrunt-in-parents/child/"+config.DefaultTerragruntConfigPath),
-			absPath(t, "../test/fixtures/parent-folders/multiple-terragrunt-in-parents/root.hcl"),
-			nil,
+			name:              "multiple-terragrunt-in-parents",
+			params:            []string{"root.hcl"},
+			terragruntOptions: terragruntOptionsForTest(t, "../test/fixtures/parent-folders/multiple-terragrunt-in-parents/child/"+config.DefaultTerragruntConfigPath),
+			expectedPath:      absPath(t, "../test/fixtures/parent-folders/multiple-terragrunt-in-parents/root.hcl"),
 		},
 		{
-			"multiple-terragrunt-in-parents-under-child",
-			[]string{"root.hcl"},
-			terragruntOptionsForTest(t, "../test/fixtures/parent-folders/multiple-terragrunt-in-parents/child/sub-child/"+config.DefaultTerragruntConfigPath),
-			absPath(t, "../test/fixtures/parent-folders/multiple-terragrunt-in-parents/child/root.hcl"),
-			nil,
+			name:              "multiple-terragrunt-in-parents-under-child",
+			params:            []string{"root.hcl"},
+			terragruntOptions: terragruntOptionsForTest(t, "../test/fixtures/parent-folders/multiple-terragrunt-in-parents/child/sub-child/"+config.DefaultTerragruntConfigPath),
+			expectedPath:      absPath(t, "../test/fixtures/parent-folders/multiple-terragrunt-in-parents/child/root.hcl"),
 		},
 		{
-			"multiple-terragrunt-in-parents-under-sub-child",
-
-			[]string{"root.hcl"},
-			terragruntOptionsForTest(t, "../test/fixtures/parent-folders/multiple-terragrunt-in-parents/child/sub-child/sub-sub-child/"+config.DefaultTerragruntConfigPath),
-			absPath(t, "../test/fixtures/parent-folders/multiple-terragrunt-in-parents/child/sub-child/root.hcl"),
-			nil,
+			name:              "multiple-terragrunt-in-parents-under-sub-child",
+			params:            []string{"root.hcl"},
+			terragruntOptions: terragruntOptionsForTest(t, "../test/fixtures/parent-folders/multiple-terragrunt-in-parents/child/sub-child/sub-sub-child/"+config.DefaultTerragruntConfigPath),
+			expectedPath:      absPath(t, "../test/fixtures/parent-folders/multiple-terragrunt-in-parents/child/sub-child/root.hcl"),
 		},
 		{
-			"parent-file-that-isnt-terragrunt",
-			[]string{"foo.txt"},
-			terragruntOptionsForTest(t, "../test/fixtures/parent-folders/other-file-names/child/"+config.DefaultTerragruntConfigPath),
-			absPath(t, "../test/fixtures/parent-folders/other-file-names/foo.txt"),
-			nil,
+			name:              "parent-file-that-isnt-terragrunt",
+			params:            []string{"foo.txt"},
+			terragruntOptions: terragruntOptionsForTest(t, "../test/fixtures/parent-folders/other-file-names/child/"+config.DefaultTerragruntConfigPath),
+			expectedPath:      absPath(t, "../test/fixtures/parent-folders/other-file-names/foo.txt"),
 		},
 		{
-			"parent-file-that-isnt-terragrunt-in-another-subfolder",
-			[]string{"common/foo.txt"},
-			terragruntOptionsForTest(t, "../test/fixtures/parent-folders/in-another-subfolder/live/"+config.DefaultTerragruntConfigPath),
-			absPath(t, "../test/fixtures/parent-folders/in-another-subfolder/common/foo.txt"),
-			nil,
+			name:              "parent-file-that-isnt-terragrunt-in-another-subfolder",
+			params:            []string{"common/foo.txt"},
+			terragruntOptions: terragruntOptionsForTest(t, "../test/fixtures/parent-folders/in-another-subfolder/live/"+config.DefaultTerragruntConfigPath),
+			expectedPath:      absPath(t, "../test/fixtures/parent-folders/in-another-subfolder/common/foo.txt"),
 		},
 		{
-			"parent-file-that-isnt-terragrunt-in-another-subfolder-with-params",
-			[]string{"tfwork"},
-			terragruntOptionsForTest(t, "../test/fixtures/parent-folders/with-params/tfwork/tg/"+config.DefaultTerragruntConfigPath),
-			absPath(t, "../test/fixtures/parent-folders/with-params/tfwork"),
-			nil,
+			name:              "parent-file-that-isnt-terragrunt-in-another-subfolder-with-params",
+			params:            []string{"tfwork"},
+			terragruntOptions: terragruntOptionsForTest(t, "../test/fixtures/parent-folders/with-params/tfwork/tg/"+config.DefaultTerragruntConfigPath),
+			expectedPath:      absPath(t, "../test/fixtures/parent-folders/with-params/tfwork"),
 		},
 		{
-			"not-found",
-			nil,
-			terragruntOptionsForTest(t, "/"),
-			"",
-			config.ParentFileNotFoundError{},
+			name:              "not-found",
+			terragruntOptions: terragruntOptionsForTest(t, "/"),
+			expectedErr:       config.ParentFileNotFoundError{},
 		},
 		{
-			"not-found-with-path",
-			nil,
-			terragruntOptionsForTest(t, "/fake/path"),
-			"",
-			config.ParentFileNotFoundError{},
+			name:              "not-found-with-path",
+			terragruntOptions: terragruntOptionsForTest(t, "/fake/path"),
+			expectedErr:       config.ParentFileNotFoundError{},
 		},
 		{
-			"fallback",
-			[]string{"foo.txt", "fallback.txt"},
-			terragruntOptionsForTest(t, "/fake/path"),
-			"fallback.txt",
-			nil,
+			name:              "fallback",
+			params:            []string{"foo.txt", "fallback.txt"},
+			terragruntOptions: terragruntOptionsForTest(t, "/fake/path"),
+			expectedPath:      "fallback.txt",
 		},
 	}
 
@@ -717,60 +677,52 @@ func TestGetParentTerragruntDir(t *testing.T) {
 
 	tc := []struct {
 		include           map[string]config.IncludeConfig
-		params            []string
 		terragruntOptions *options.TerragruntOptions
 		expectedPath      string
+		params            []string
 	}{
 		{
-			nil,
-			nil,
-			terragruntOptionsForTest(t, helpers.RootFolder+"child/"+config.DefaultTerragruntConfigPath),
-			helpers.RootFolder + "child",
+			terragruntOptions: terragruntOptionsForTest(t, helpers.RootFolder+"child/"+config.DefaultTerragruntConfigPath),
+			expectedPath:      helpers.RootFolder + "child",
 		},
 		{
-			map[string]config.IncludeConfig{"": {Path: "../" + config.DefaultTerragruntConfigPath}},
-			nil,
-			terragruntOptionsForTest(t, helpers.RootFolder+"child/"+config.DefaultTerragruntConfigPath),
-			helpers.RootFolder,
+			include:           map[string]config.IncludeConfig{"": {Path: "../" + config.DefaultTerragruntConfigPath}},
+			terragruntOptions: terragruntOptionsForTest(t, helpers.RootFolder+"child/"+config.DefaultTerragruntConfigPath),
+			expectedPath:      helpers.RootFolder,
 		},
 		{
-			map[string]config.IncludeConfig{"": {Path: helpers.RootFolder + config.DefaultTerragruntConfigPath}},
-			nil,
-			terragruntOptionsForTest(t, helpers.RootFolder+"child/"+config.DefaultTerragruntConfigPath),
-			helpers.RootFolder,
+			include:           map[string]config.IncludeConfig{"": {Path: helpers.RootFolder + config.DefaultTerragruntConfigPath}},
+			terragruntOptions: terragruntOptionsForTest(t, helpers.RootFolder+"child/"+config.DefaultTerragruntConfigPath),
+			expectedPath:      helpers.RootFolder,
 		},
 		{
-			map[string]config.IncludeConfig{"": {Path: "../../../" + config.DefaultTerragruntConfigPath}},
-			nil,
-			terragruntOptionsForTest(t, helpers.RootFolder+"child/sub-child/sub-sub-child/"+config.DefaultTerragruntConfigPath),
-			helpers.RootFolder,
+			include:           map[string]config.IncludeConfig{"": {Path: "../../../" + config.DefaultTerragruntConfigPath}},
+			terragruntOptions: terragruntOptionsForTest(t, helpers.RootFolder+"child/sub-child/sub-sub-child/"+config.DefaultTerragruntConfigPath),
+			expectedPath:      helpers.RootFolder,
 		},
 		{
-			map[string]config.IncludeConfig{"": {Path: helpers.RootFolder + config.DefaultTerragruntConfigPath}},
-			nil,
-			terragruntOptionsForTest(t, helpers.RootFolder+"child/sub-child/sub-sub-child/"+config.DefaultTerragruntConfigPath),
-			helpers.RootFolder,
+			include:           map[string]config.IncludeConfig{"": {Path: helpers.RootFolder + config.DefaultTerragruntConfigPath}},
+			terragruntOptions: terragruntOptionsForTest(t, helpers.RootFolder+"child/sub-child/sub-sub-child/"+config.DefaultTerragruntConfigPath),
+			expectedPath:      helpers.RootFolder,
 		},
 		{
-			map[string]config.IncludeConfig{"": {Path: "../../other-child/" + config.DefaultTerragruntConfigPath}},
-			nil,
-			terragruntOptionsForTest(t, helpers.RootFolder+"child/sub-child/"+config.DefaultTerragruntConfigPath),
-			filepath.VolumeName(parentDir) + "/other-child",
+			include:           map[string]config.IncludeConfig{"": {Path: "../../other-child/" + config.DefaultTerragruntConfigPath}},
+			terragruntOptions: terragruntOptionsForTest(t, helpers.RootFolder+"child/sub-child/"+config.DefaultTerragruntConfigPath),
+			expectedPath:      filepath.VolumeName(parentDir) + "/other-child",
 		},
 		{
-			map[string]config.IncludeConfig{"": {Path: "../../" + config.DefaultTerragruntConfigPath}},
-			nil,
-			terragruntOptionsForTest(t, "../child/sub-child/"+config.DefaultTerragruntConfigPath),
-			parentDir,
+			include:           map[string]config.IncludeConfig{"": {Path: "../../" + config.DefaultTerragruntConfigPath}},
+			terragruntOptions: terragruntOptionsForTest(t, "../child/sub-child/"+config.DefaultTerragruntConfigPath),
+			expectedPath:      parentDir,
 		},
 		{
-			map[string]config.IncludeConfig{
+			include: map[string]config.IncludeConfig{
 				"root":  {Path: "../../" + config.DefaultTerragruntConfigPath},
 				"child": {Path: "../../other-child/" + config.DefaultTerragruntConfigPath},
 			},
-			[]string{"child"},
-			terragruntOptionsForTest(t, helpers.RootFolder+"child/sub-child/"+config.DefaultTerragruntConfigPath),
-			filepath.VolumeName(parentDir) + "/other-child",
+			params:            []string{"child"},
+			terragruntOptions: terragruntOptionsForTest(t, helpers.RootFolder+"child/sub-child/"+config.DefaultTerragruntConfigPath),
+			expectedPath:      filepath.VolumeName(parentDir) + "/other-child",
 		},
 	}
 
@@ -787,40 +739,40 @@ func TestTerraformBuiltInFunctions(t *testing.T) {
 	t.Parallel()
 
 	tc := []struct {
-		input    string
 		expected any
+		input    string
 	}{
 		{
-			"abs(-1)",
-			1.,
+			input:    "abs(-1)",
+			expected: 1.,
 		},
 		{
-			`element(["one", "two", "three"], 1)`,
-			"two",
+			input:    `element(["one", "two", "three"], 1)`,
+			expected: "two",
 		},
 		{
-			`chomp(file("other-file.txt"))`,
-			"This is a test file",
+			input:    `chomp(file("other-file.txt"))`,
+			expected: "This is a test file",
 		},
 		{
-			`sha1("input")`,
-			"140f86aae51ab9e1cda9b4254fe98a74eb54c1a1",
+			input:    `sha1("input")`,
+			expected: "140f86aae51ab9e1cda9b4254fe98a74eb54c1a1",
 		},
 		{
-			`split("|", "one|two|three")`,
-			[]any{"one", "two", "three"},
+			input:    `split("|", "one|two|three")`,
+			expected: []any{"one", "two", "three"},
 		},
 		{
-			`!tobool("false")`,
-			true,
+			input:    `!tobool("false")`,
+			expected: true,
 		},
 		{
-			`trimspace("     content     ")`,
-			"content",
+			input:    `trimspace("     content     ")`,
+			expected: "content",
 		},
 		{
-			`zipmap(["one", "two", "three"], [1, 2, 3])`,
-			map[string]any{"one": 1., "two": 2., "three": 3.},
+			input:    `zipmap(["one", "two", "three"], [1, 2, 3])`,
+			expected: map[string]any{"one": 1., "two": 2., "three": 3.},
 		},
 	}
 
@@ -853,28 +805,28 @@ func TestTerraformOutputJsonToCtyValueMap(t *testing.T) {
 	t.Parallel()
 
 	tc := []struct {
-		input    string
 		expected map[string]cty.Value
+		input    string
 	}{
 		{
-			`{"bool": {"sensitive": false, "type": "bool", "value": true}}`,
-			map[string]cty.Value{"bool": cty.True},
+			input:    `{"bool": {"sensitive": false, "type": "bool", "value": true}}`,
+			expected: map[string]cty.Value{"bool": cty.True},
 		},
 		{
-			`{"number": {"sensitive": false, "type": "number", "value": 42}}`,
-			map[string]cty.Value{"number": cty.NumberIntVal(42)},
+			input:    `{"number": {"sensitive": false, "type": "number", "value": 42}}`,
+			expected: map[string]cty.Value{"number": cty.NumberIntVal(42)},
 		},
 		{
-			`{"list_string": {"sensitive": false, "type": ["list", "string"], "value": ["4", "2"]}}`,
-			map[string]cty.Value{"list_string": cty.ListVal([]cty.Value{cty.StringVal("4"), cty.StringVal("2")})},
+			input:    `{"list_string": {"sensitive": false, "type": ["list", "string"], "value": ["4", "2"]}}`,
+			expected: map[string]cty.Value{"list_string": cty.ListVal([]cty.Value{cty.StringVal("4"), cty.StringVal("2")})},
 		},
 		{
-			`{"map_string": {"sensitive": false, "type": ["map", "string"], "value": {"x": "foo", "y": "bar"}}}`,
-			map[string]cty.Value{"map_string": cty.MapVal(map[string]cty.Value{"x": cty.StringVal("foo"), "y": cty.StringVal("bar")})},
+			input:    `{"map_string": {"sensitive": false, "type": ["map", "string"], "value": {"x": "foo", "y": "bar"}}}`,
+			expected: map[string]cty.Value{"map_string": cty.MapVal(map[string]cty.Value{"x": cty.StringVal("foo"), "y": cty.StringVal("bar")})},
 		},
 		{
-			`{"map_list_number": {"sensitive": false, "type": ["map", ["list", "number"]], "value": {"x": [4, 2]}}}`,
-			map[string]cty.Value{
+			input: `{"map_list_number": {"sensitive": false, "type": ["map", ["list", "number"]], "value": {"x": [4, 2]}}}`,
+			expected: map[string]cty.Value{
 				"map_list_number": cty.MapVal(
 					map[string]cty.Value{
 						"x": cty.ListVal([]cty.Value{cty.NumberIntVal(4), cty.NumberIntVal(2)}),
@@ -883,8 +835,8 @@ func TestTerraformOutputJsonToCtyValueMap(t *testing.T) {
 			},
 		},
 		{
-			`{"object": {"sensitive": false, "type": ["object", {"x": "number", "y": "string", "lst": ["list", "string"]}], "value": {"x": 42, "y": "the truth", "lst": ["foo", "bar"]}}}`,
-			map[string]cty.Value{
+			input: `{"object": {"sensitive": false, "type": ["object", {"x": "number", "y": "string", "lst": ["list", "string"]}], "value": {"x": 42, "y": "the truth", "lst": ["foo", "bar"]}}}`,
+			expected: map[string]cty.Value{
 				"object": cty.ObjectVal(
 					map[string]cty.Value{
 						"x":   cty.NumberIntVal(42),
@@ -895,8 +847,8 @@ func TestTerraformOutputJsonToCtyValueMap(t *testing.T) {
 			},
 		},
 		{
-			`{"out1": {"sensitive": false, "type": "number", "value": 42}, "out2": {"sensitive": false, "type": "string", "value": "foo bar"}}`,
-			map[string]cty.Value{
+			input: `{"out1": {"sensitive": false, "type": "number", "value": 42}, "out2": {"sensitive": false, "type": "string", "value": "foo bar"}}`,
+			expected: map[string]cty.Value{
 				"out1": cty.NumberIntVal(42),
 				"out2": cty.StringVal("foo bar"),
 			},
@@ -1149,18 +1101,48 @@ func TestTimeCmp(t *testing.T) {
 
 	tc := []struct {
 		config *options.TerragruntOptions
+		err    string
 		args   []string
 		value  int64
-		err    string
 	}{
-		{terragruntOptionsForTest(t, ""), []string{"2017-11-22T00:00:00Z", "2017-11-22T00:00:00Z"}, 0, ""},
-		{terragruntOptionsForTest(t, ""), []string{"2017-11-22T00:00:00Z", "2017-11-22T01:00:00+01:00"}, 0, ""},
-		{terragruntOptionsForTest(t, ""), []string{"2017-11-22T00:00:01Z", "2017-11-22T01:00:00+01:00"}, 1, ""},
-		{terragruntOptionsForTest(t, ""), []string{"2017-11-22T01:00:00Z", "2017-11-22T00:59:00-01:00"}, -1, ""},
-		{terragruntOptionsForTest(t, ""), []string{"2017-11-22T01:00:00+01:00", "2017-11-22T01:00:00-01:00"}, -1, ""},
-		{terragruntOptionsForTest(t, ""), []string{"2017-11-22T01:00:00-01:00", "2017-11-22T01:00:00+01:00"}, 1, ""},
-		{terragruntOptionsForTest(t, ""), []string{"2017-11-22T00:00:00Z", "bloop"}, 0, `could not parse second parameter "bloop": not a valid RFC3339 timestamp: cannot use "bloop" as year`},
-		{terragruntOptionsForTest(t, ""), []string{"2017-11-22 00:00:00Z", "2017-11-22T00:00:00Z"}, 0, `could not parse first parameter "2017-11-22 00:00:00Z": not a valid RFC3339 timestamp: missing required time introducer 'T'`},
+		{
+			config: terragruntOptionsForTest(t, ""),
+			args:   []string{"2017-11-22T00:00:00Z", "2017-11-22T00:00:00Z"},
+		},
+		{
+			config: terragruntOptionsForTest(t, ""),
+			args:   []string{"2017-11-22T00:00:00Z", "2017-11-22T01:00:00+01:00"},
+		},
+		{
+			config: terragruntOptionsForTest(t, ""),
+			args:   []string{"2017-11-22T00:00:01Z", "2017-11-22T01:00:00+01:00"},
+			value:  1,
+		},
+		{
+			config: terragruntOptionsForTest(t, ""),
+			args:   []string{"2017-11-22T01:00:00Z", "2017-11-22T00:59:00-01:00"},
+			value:  -1,
+		},
+		{
+			config: terragruntOptionsForTest(t, ""),
+			args:   []string{"2017-11-22T01:00:00+01:00", "2017-11-22T01:00:00-01:00"},
+			value:  -1,
+		},
+		{
+			config: terragruntOptionsForTest(t, ""),
+			args:   []string{"2017-11-22T01:00:00-01:00", "2017-11-22T01:00:00+01:00"},
+			value:  1,
+		},
+		{
+			config: terragruntOptionsForTest(t, ""),
+			args:   []string{"2017-11-22T00:00:00Z", "bloop"},
+			err:    `could not parse second parameter "bloop": not a valid RFC3339 timestamp: cannot use "bloop" as year`,
+		},
+		{
+			config: terragruntOptionsForTest(t, ""),
+			args:   []string{"2017-11-22 00:00:00Z", "2017-11-22T00:00:00Z"},
+			err:    `could not parse first parameter "2017-11-22 00:00:00Z": not a valid RFC3339 timestamp: missing required time introducer 'T'`,
+		},
 	}
 
 	for _, tt := range tc {
@@ -1187,17 +1169,29 @@ func TestStrContains(t *testing.T) {
 
 	tc := []struct {
 		config *options.TerragruntOptions
+		err    string
 		args   []string
 		value  bool
-		err    string
 	}{
-		{terragruntOptionsForTest(t, ""), []string{"hello world", "hello"}, true, ""},
-		{terragruntOptionsForTest(t, ""), []string{"hello world", "world"}, true, ""},
-		{terragruntOptionsForTest(t, ""), []string{"hello world0", "0"}, true, ""},
-		{terragruntOptionsForTest(t, ""), []string{"9hello world0", "9"}, true, ""},
-		{terragruntOptionsForTest(t, ""), []string{"hello world", "test"}, false, ""},
-		{terragruntOptionsForTest(t, ""), []string{"hello", "hello"}, true, ""},
-		{terragruntOptionsForTest(t, ""), []string{}, false, "Empty string value is not allowed for parameter to the strcontains function"},
+		{
+			config: terragruntOptionsForTest(t, ""),
+			args:   []string{"hello world", "hello"},
+			value:  true,
+		},
+		{
+			config: terragruntOptionsForTest(t, ""),
+			args:   []string{"hello world", "world"},
+			value:  true,
+		},
+		{
+			config: terragruntOptionsForTest(t, ""),
+			args:   []string{"hello world0", "0"},
+			value:  true,
+		},
+		{
+			config: terragruntOptionsForTest(t, ""),
+			args:   []string{"hello world", "test"},
+		},
 	}
 
 	for _, tt := range tc {
diff --git a/config/include_test.go b/config/include_test.go
index 0fab4586..cb0a1422 100644
--- a/config/include_test.go
+++ b/config/include_test.go
@@ -228,76 +228,76 @@ func TestDeepMergeConfigIntoIncludedConfig(t *testing.T) {
 	}
 
 	tc := []struct {
-		name     string
 		source   *config.TerragruntConfig
 		target   *config.TerragruntConfig
 		expected *config.TerragruntConfig
+		name     string
 	}{
 		// Base case: empty config
 		{
-			"base case",
-			&config.TerragruntConfig{},
-			&config.TerragruntConfig{},
-			&config.TerragruntConfig{},
+			name:     "base case",
+			source:   &config.TerragruntConfig{},
+			target:   &config.TerragruntConfig{},
+			expected: &config.TerragruntConfig{},
 		},
 		// Simple attribute in target
 		{
-			"simple in target",
-			&config.TerragruntConfig{},
-			&config.TerragruntConfig{IamRole: "foo"},
-			&config.TerragruntConfig{IamRole: "foo"},
+			name:     "simple in target",
+			source:   &config.TerragruntConfig{},
+			target:   &config.TerragruntConfig{IamRole: "foo"},
+			expected: &config.TerragruntConfig{IamRole: "foo"},
 		},
 		// Simple attribute in source
 		{
-			"simple in source",
-			&config.TerragruntConfig{IamRole: "foo"},
-			&config.TerragruntConfig{},
-			&config.TerragruntConfig{IamRole: "foo"},
+			name:     "simple in source",
+			source:   &config.TerragruntConfig{IamRole: "foo"},
+			target:   &config.TerragruntConfig{},
+			expected: &config.TerragruntConfig{IamRole: "foo"},
 		},
 		// Simple attribute in both
 		{
-			"simple in both",
-			&config.TerragruntConfig{IamRole: "foo"},
-			&config.TerragruntConfig{IamRole: "bar"},
-			&config.TerragruntConfig{IamRole: "foo"},
+			name:     "simple in both",
+			source:   &config.TerragruntConfig{IamRole: "foo"},
+			target:   &config.TerragruntConfig{IamRole: "bar"},
+			expected: &config.TerragruntConfig{IamRole: "foo"},
 		},
 		// skip related tests
 		{
-			"skip - preserve target",
-			&config.TerragruntConfig{},
-			&config.TerragruntConfig{Skip: &testTrue},
-			&config.TerragruntConfig{Skip: &testTrue},
+			name:     "skip - preserve target",
+			source:   &config.TerragruntConfig{},
+			target:   &config.TerragruntConfig{Skip: &testTrue},
+			expected: &config.TerragruntConfig{Skip: &testTrue},
 		},
 		{
-			"skip - copy source",
-			&config.TerragruntConfig{Skip: &testFalse},
-			&config.TerragruntConfig{Skip: &testTrue},
-			&config.TerragruntConfig{Skip: &testFalse},
+			name:     "skip - copy source",
+			source:   &config.TerragruntConfig{Skip: &testFalse},
+			target:   &config.TerragruntConfig{Skip: &testTrue},
+			expected: &config.TerragruntConfig{Skip: &testFalse},
 		},
 		{
-			"skip - still copy source",
-			&config.TerragruntConfig{Skip: &testTrue},
-			&config.TerragruntConfig{Skip: &testTrue},
-			&config.TerragruntConfig{Skip: &testTrue},
+			name:     "skip - still copy source",
+			source:   &config.TerragruntConfig{Skip: &testTrue},
+			target:   &config.TerragruntConfig{Skip: &testTrue},
+			expected: &config.TerragruntConfig{Skip: &testTrue},
 		},
 		// Deep merge dependencies
 		{
-			"dependencies",
-			&config.TerragruntConfig{Dependencies: &config.ModuleDependencies{Paths: []string{"../vpc"}},
+			name: "dependencies",
+			source: &config.TerragruntConfig{Dependencies: &config.ModuleDependencies{Paths: []string{"../vpc"}},
 				TerragruntDependencies: config.Dependencies{
 					config.Dependency{
 						Name:       "vpc",
 						ConfigPath: cty.StringVal("../vpc"),
 					},
 				}},
-			&config.TerragruntConfig{Dependencies: &config.ModuleDependencies{Paths: []string{"../mysql"}},
+			target: &config.TerragruntConfig{Dependencies: &config.ModuleDependencies{Paths: []string{"../mysql"}},
 				TerragruntDependencies: config.Dependencies{
 					config.Dependency{
 						Name:       "mysql",
 						ConfigPath: cty.StringVal("../mysql"),
 					},
 				}},
-			&config.TerragruntConfig{Dependencies: &config.ModuleDependencies{Paths: []string{"../mysql", "../vpc"}},
+			expected: &config.TerragruntConfig{Dependencies: &config.ModuleDependencies{Paths: []string{"../mysql", "../vpc"}},
 				TerragruntDependencies: config.Dependencies{
 					config.Dependency{
 						Name:       "mysql",
@@ -311,29 +311,29 @@ func TestDeepMergeConfigIntoIncludedConfig(t *testing.T) {
 		},
 		// Deep merge retryable errors
 		{
-			"retryable errors",
-			&config.TerragruntConfig{RetryableErrors: []string{"error", "override"}},
-			&config.TerragruntConfig{RetryableErrors: []string{"original", "error"}},
-			&config.TerragruntConfig{RetryableErrors: []string{"original", "error", "error", "override"}},
+			name:     "retryable errors",
+			source:   &config.TerragruntConfig{RetryableErrors: []string{"error", "override"}},
+			target:   &config.TerragruntConfig{RetryableErrors: []string{"original", "error"}},
+			expected: &config.TerragruntConfig{RetryableErrors: []string{"original", "error", "error", "override"}},
 		},
 		// Deep merge inputs
 		{
-			"inputs",
-			&config.TerragruntConfig{Inputs: overrideMap},
-			&config.TerragruntConfig{Inputs: originalMap},
-			&config.TerragruntConfig{Inputs: mergedMap},
+			name:     "inputs",
+			source:   &config.TerragruntConfig{Inputs: overrideMap},
+			target:   &config.TerragruntConfig{Inputs: originalMap},
+			expected: &config.TerragruntConfig{Inputs: mergedMap},
 		},
 		{
-			"terraform copy_terraform_lock_file",
-			&config.TerragruntConfig{Terraform: &config.TerraformConfig{CopyTerraformLockFile: &[]bool{false}[0]}},
-			&config.TerragruntConfig{Terraform: &config.TerraformConfig{IncludeInCopy: &[]string{"abc"}}},
-			&config.TerragruntConfig{Terraform: &config.TerraformConfig{CopyTerraformLockFile: &[]bool{false}[0], IncludeInCopy: &[]string{"abc"}}},
+			name:     "terraform copy_terraform_lock_file",
+			source:   &config.TerragruntConfig{Terraform: &config.TerraformConfig{CopyTerraformLockFile: &[]bool{false}[0]}},
+			target:   &config.TerragruntConfig{Terraform: &config.TerraformConfig{IncludeInCopy: &[]string{"abc"}}},
+			expected: &config.TerragruntConfig{Terraform: &config.TerraformConfig{CopyTerraformLockFile: &[]bool{false}[0], IncludeInCopy: &[]string{"abc"}}},
 		},
 		{
-			"terraform copy_terraform_lock_file",
-			&config.TerragruntConfig{Terraform: &config.TerraformConfig{CopyTerraformLockFile: &[]bool{false}[0]}},
-			&config.TerragruntConfig{Terraform: &config.TerraformConfig{ExcludeFromCopy: &[]string{"abc"}}},
-			&config.TerragruntConfig{Terraform: &config.TerraformConfig{CopyTerraformLockFile: &[]bool{false}[0], ExcludeFromCopy: &[]string{"abc"}}},
+			name:     "terraform copy_terraform_lock_file",
+			source:   &config.TerragruntConfig{Terraform: &config.TerraformConfig{CopyTerraformLockFile: &[]bool{false}[0]}},
+			target:   &config.TerragruntConfig{Terraform: &config.TerraformConfig{ExcludeFromCopy: &[]string{"abc"}}},
+			expected: &config.TerragruntConfig{Terraform: &config.TerraformConfig{CopyTerraformLockFile: &[]bool{false}[0], ExcludeFromCopy: &[]string{"abc"}}},
 		},
 	}
 
diff --git a/internal/cas/tree_test.go b/internal/cas/tree_test.go
index 18769997..48b1aa6f 100644
--- a/internal/cas/tree_test.go
+++ b/internal/cas/tree_test.go
@@ -88,8 +88,8 @@ func TestParseTree(t *testing.T) {
 		name     string
 		input    string
 		path     string
-		wantLen  int
 		wantPath string
+		wantLen  int
 		wantErr  bool
 	}{
 		{
@@ -141,9 +141,9 @@ func TestLinkTree(t *testing.T) {
 		treeData   string
 		wantFiles  []struct {
 			path    string
+			hash    string
 			content []byte
 			isDir   bool
-			hash    string
 		}
 		wantErr bool
 	}{
@@ -175,9 +175,9 @@ func TestLinkTree(t *testing.T) {
 040000 tree i9j0k1l2 src`,
 			wantFiles: []struct {
 				path    string
+				hash    string
 				content []byte
 				isDir   bool
-				hash    string
 			}{
 				{
 					path:    "README.md",
@@ -215,9 +215,9 @@ func TestLinkTree(t *testing.T) {
 			treeData: "",
 			wantFiles: []struct {
 				path    string
+				hash    string
 				content []byte
 				isDir   bool
-				hash    string
 			}{},
 		},
 		{
diff --git a/internal/cli/bool_flag_test.go b/internal/cli/bool_flag_test.go
index 6d2d6573..bd0ef670 100644
--- a/internal/cli/bool_flag_test.go
+++ b/internal/cli/bool_flag_test.go
@@ -18,88 +18,88 @@ func TestBoolFlagApply(t *testing.T) {
 	t.Parallel()
 
 	testCases := []struct {
-		flag          cli.BoolFlag
-		args          []string
+		expectedErr   error
 		envs          map[string]string
+		args          []string
+		flag          cli.BoolFlag
 		expectedValue bool
-		expectedErr   error
 	}{
 		{
-			cli.BoolFlag{Name: "foo", EnvVars: []string{"FOO"}},
-			[]string{"--foo"},
-			map[string]string{"FOO": "false"},
-			true,
-			nil,
+			flag:          cli.BoolFlag{Name: "foo", EnvVars: []string{"FOO"}},
+			args:          []string{"--foo"},
+			envs:          map[string]string{"FOO": "false"},
+			expectedValue: true,
+			expectedErr:   nil,
 		},
 		{
-			cli.BoolFlag{Name: "foo", EnvVars: []string{"FOO"}},
-			nil,
-			map[string]string{"FOO": "true"},
-			true,
-			nil,
+			flag:          cli.BoolFlag{Name: "foo", EnvVars: []string{"FOO"}},
+			args:          nil,
+			envs:          map[string]string{"FOO": "true"},
+			expectedValue: true,
+			expectedErr:   nil,
 		},
 		{
-			cli.BoolFlag{Name: "foo", EnvVars: []string{"FOO"}},
-			nil,
-			nil,
-			false,
-			nil,
+			flag:          cli.BoolFlag{Name: "foo", EnvVars: []string{"FOO"}},
+			args:          nil,
+			envs:          nil,
+			expectedValue: false,
+			expectedErr:   nil,
 		},
 		{
-			cli.BoolFlag{Name: "foo", EnvVars: []string{"FOO"}, Destination: mockDestValue(false)},
-			[]string{"--foo"},
-			map[string]string{"FOO": "false"},
-			true,
-			nil,
+			flag:          cli.BoolFlag{Name: "foo", EnvVars: []string{"FOO"}, Destination: mockDestValue(false)},
+			args:          []string{"--foo"},
+			envs:          map[string]string{"FOO": "false"},
+			expectedValue: true,
+			expectedErr:   nil,
 		},
 		{
-			cli.BoolFlag{Name: "foo", Destination: mockDestValue(true)},
-			nil,
-			nil,
-			true,
-			nil,
+			flag:          cli.BoolFlag{Name: "foo", Destination: mockDestValue(true)},
+			args:          nil,
+			envs:          nil,
+			expectedValue: true,
+			expectedErr:   nil,
 		},
 		{
-			cli.BoolFlag{Name: "foo", Destination: mockDestValue(true), Negative: true},
-			[]string{"--foo"},
-			nil,
-			false,
-			nil,
+			flag:          cli.BoolFlag{Name: "foo", Destination: mockDestValue(true), Negative: true},
+			args:          []string{"--foo"},
+			envs:          nil,
+			expectedValue: false,
+			expectedErr:   nil,
 		},
 		{
-			cli.BoolFlag{Name: "foo", EnvVars: []string{"FOO"}, Destination: mockDestValue(true), Negative: true},
-			nil,
-			map[string]string{"FOO": "true"},
-			false,
-			nil,
+			flag:          cli.BoolFlag{Name: "foo", EnvVars: []string{"FOO"}, Destination: mockDestValue(true), Negative: true},
+			args:          nil,
+			envs:          map[string]string{"FOO": "true"},
+			expectedValue: false,
+			expectedErr:   nil,
 		},
 		{
-			cli.BoolFlag{Name: "foo", EnvVars: []string{"FOO"}, Destination: mockDestValue(false), Negative: true},
-			nil,
-			map[string]string{"FOO": "false"},
-			true,
-			nil,
+			flag:          cli.BoolFlag{Name: "foo", EnvVars: []string{"FOO"}, Destination: mockDestValue(false), Negative: true},
+			args:          nil,
+			envs:          map[string]string{"FOO": "false"},
+			expectedValue: true,
+			expectedErr:   nil,
 		},
 		{
-			cli.BoolFlag{Name: "foo", EnvVars: []string{"FOO"}},
-			[]string{"--foo", "--foo"},
-			nil,
-			false,
-			errors.New(`invalid boolean flag foo: setting the flag multiple times`),
+			flag:          cli.BoolFlag{Name: "foo", EnvVars: []string{"FOO"}},
+			args:          []string{"--foo", "--foo"},
+			envs:          nil,
+			expectedValue: false,
+			expectedErr:   errors.New(`invalid boolean flag foo: setting the flag multiple times`),
 		},
 		{
-			cli.BoolFlag{Name: "foo", EnvVars: []string{"FOO"}},
-			nil,
-			map[string]string{"FOO": ""},
-			false,
-			nil,
+			flag:          cli.BoolFlag{Name: "foo", EnvVars: []string{"FOO"}},
+			args:          nil,
+			envs:          map[string]string{"FOO": ""},
+			expectedValue: false,
+			expectedErr:   nil,
 		},
 		{
-			cli.BoolFlag{Name: "foo", EnvVars: []string{"FOO"}},
-			nil,
-			map[string]string{"FOO": "monkey"},
-			false,
-			errors.New(`invalid value "monkey" for env var FOO: must be one of: "0", "1", "f", "t", "false", "true"`),
+			flag:          cli.BoolFlag{Name: "foo", EnvVars: []string{"FOO"}},
+			args:          nil,
+			envs:          map[string]string{"FOO": "monkey"},
+			expectedValue: false,
+			expectedErr:   errors.New(`invalid value "monkey" for env var FOO: must be one of: "0", "1", "f", "t", "false", "true"`),
 		},
 	}
 
diff --git a/internal/cli/command_test.go b/internal/cli/command_test.go
index c4adbc89..28fe194c 100644
--- a/internal/cli/command_test.go
+++ b/internal/cli/command_test.go
@@ -19,29 +19,29 @@ func TestCommandRun(t *testing.T) {
 	type TestActionFunc func(expectedOrder int, expectedArgs []string) cli.ActionFunc
 
 	type TestCase struct {
+		expectedErr error
 		args        []string
 		command     cli.Command
-		expectedErr error
 	}
 
 	testCaseFuncs := []func(action TestActionFunc, skip cli.ActionFunc) TestCase{
 		func(action TestActionFunc, skip cli.ActionFunc) TestCase {
 			return TestCase{
-				[]string{"--foo", "--foo", "cmd-bar", "--bar", "one", "-two"},
-				cli.Command{
+				args: []string{"--foo", "--foo", "cmd-bar", "--bar", "one", "-two"},
+				command: cli.Command{
 					Flags:  cli.Flags{&cli.BoolFlag{Name: "foo"}},
 					Before: skip,
 					Action: skip,
 					After:  skip,
 				},
-				errors.New("invalid boolean flag foo: setting the flag multiple times"),
+				expectedErr: errors.New("invalid boolean flag foo: setting the flag multiple times"),
 			}
 		},
 
 		func(action TestActionFunc, skip cli.ActionFunc) TestCase {
 			return TestCase{
-				[]string{"--foo", "cmd-bar", "--bar", "one", "-two"},
-				cli.Command{
+				args: []string{"--foo", "cmd-bar", "--bar", "one", "-two"},
+				command: cli.Command{
 					Flags:  cli.Flags{&cli.BoolFlag{Name: "foo"}},
 					Before: action(1, nil),
 					Action: skip,
@@ -63,13 +63,12 @@ func TestCommandRun(t *testing.T) {
 						},
 					},
 				},
-				nil,
 			}
 		},
 		func(action TestActionFunc, skip cli.ActionFunc) TestCase {
 			return TestCase{
-				[]string{"--foo", "cmd-bar", "--bar", "one", "-two"},
-				cli.Command{
+				args: []string{"--foo", "cmd-bar", "--bar", "one", "-two"},
+				command: cli.Command{
 					Flags:  cli.Flags{&cli.BoolFlag{Name: "foo"}},
 					Before: action(1, nil),
 					Action: skip,
@@ -83,13 +82,12 @@ func TestCommandRun(t *testing.T) {
 						},
 					},
 				},
-				nil,
 			}
 		},
 		func(action TestActionFunc, skip cli.ActionFunc) TestCase {
 			return TestCase{
-				[]string{"--foo", "--bar", "cmd-bar", "one", "-two"},
-				cli.Command{
+				args: []string{"--foo", "--bar", "cmd-bar", "one", "-two"},
+				command: cli.Command{
 					Flags:  cli.Flags{&cli.BoolFlag{Name: "foo"}},
 					Before: action(1, nil),
 					Action: skip,
@@ -104,13 +102,12 @@ func TestCommandRun(t *testing.T) {
 						},
 					},
 				},
-				nil,
 			}
 		},
 		func(action TestActionFunc, skip cli.ActionFunc) TestCase {
 			return TestCase{
-				[]string{"--foo", "cmd-bar", "--bar", "value", "one", "-two"},
-				cli.Command{
+				args: []string{"--foo", "cmd-bar", "--bar", "value", "one", "-two"},
+				command: cli.Command{
 					Flags:  cli.Flags{&cli.BoolFlag{Name: "foo"}},
 					Before: action(1, nil),
 					Action: skip,
@@ -125,13 +122,12 @@ func TestCommandRun(t *testing.T) {
 						},
 					},
 				},
-				nil,
 			}
 		},
 		func(action TestActionFunc, skip cli.ActionFunc) TestCase {
 			return TestCase{
-				[]string{"--foo", "cmd-bar", "--bar", "value", "one", "-two"},
-				cli.Command{
+				args: []string{"--foo", "cmd-bar", "--bar", "value", "one", "-two"},
+				command: cli.Command{
 					Flags:  cli.Flags{&cli.BoolFlag{Name: "foo"}},
 					Before: action(1, nil),
 					Action: action(2, []string{"cmd-bar", "--bar", "value", "one", "-two"}),
@@ -147,7 +143,6 @@ func TestCommandRun(t *testing.T) {
 						},
 					},
 				},
-				nil,
 			}
 		},
 	}
@@ -198,24 +193,23 @@ func TestCommandHasName(t *testing.T) {
 	t.Parallel()
 
 	testCases := []struct {
-		command  cli.Command
 		hasName  string
+		command  cli.Command
 		expected bool
 	}{
 		{
-			cli.Command{Name: "foo"},
-			"bar",
-			false,
+			command: cli.Command{Name: "foo"},
+			hasName: "bar",
 		},
 		{
-			cli.Command{Name: "foo", Aliases: []string{"bar"}},
-			"bar",
-			true,
+			command:  cli.Command{Name: "foo", Aliases: []string{"bar"}},
+			hasName:  "bar",
+			expected: true,
 		},
 		{
-			cli.Command{Name: "bar"},
-			"bar",
-			true,
+			command:  cli.Command{Name: "bar"},
+			hasName:  "bar",
+			expected: true,
 		},
 	}
 
@@ -235,16 +229,16 @@ func TestCommandNames(t *testing.T) {
 	t.Parallel()
 
 	testCases := []struct {
-		command  cli.Command
 		expected []string
+		command  cli.Command
 	}{
 		{
-			cli.Command{Name: "foo"},
-			[]string{"foo"},
+			command:  cli.Command{Name: "foo"},
+			expected: []string{"foo"},
 		},
 		{
-			cli.Command{Name: "foo", Aliases: []string{"bar", "baz"}},
-			[]string{"foo", "bar", "baz"},
+			command:  cli.Command{Name: "foo", Aliases: []string{"bar", "baz"}},
+			expected: []string{"foo", "bar", "baz"},
 		},
 	}
 
@@ -264,19 +258,19 @@ func TestCommandSubcommand(t *testing.T) {
 	t.Parallel()
 
 	testCases := []struct {
-		command       cli.Command
-		searchCmdName string
 		expected      *cli.Command
+		searchCmdName string
+		command       cli.Command
 	}{
 		{
-			cli.Command{Name: "foo", Subcommands: cli.Commands{&cli.Command{Name: "bar"}, &cli.Command{Name: "baz"}}},
-			"baz",
-			&cli.Command{Name: "baz"},
+			command:       cli.Command{Name: "foo", Subcommands: cli.Commands{&cli.Command{Name: "bar"}, &cli.Command{Name: "baz"}}},
+			searchCmdName: "baz",
+			expected:      &cli.Command{Name: "baz"},
 		},
 		{
-			cli.Command{Name: "foo", Subcommands: cli.Commands{&cli.Command{Name: "bar"}, &cli.Command{Name: "baz"}}},
-			"qux",
-			nil,
+			command:       cli.Command{Name: "foo", Subcommands: cli.Commands{&cli.Command{Name: "bar"}, &cli.Command{Name: "baz"}}},
+			searchCmdName: "qux",
+			expected:      nil,
 		},
 	}
 
@@ -296,16 +290,16 @@ func TestCommandVisibleSubcommand(t *testing.T) {
 	t.Parallel()
 
 	testCases := []struct {
-		command  cli.Command
 		expected cli.Commands
+		command  cli.Command
 	}{
 		{
-			cli.Command{Name: "foo", Subcommands: cli.Commands{&cli.Command{Name: "bar"}, &cli.Command{Name: "baz", HelpName: "helpBaz"}}},
-			cli.Commands{{Name: "bar", HelpName: "bar"}, {Name: "baz", HelpName: "helpBaz"}},
+			command:  cli.Command{Name: "foo", Subcommands: cli.Commands{&cli.Command{Name: "bar"}, &cli.Command{Name: "baz", HelpName: "helpBaz"}}},
+			expected: cli.Commands{{Name: "bar", HelpName: "bar"}, {Name: "baz", HelpName: "helpBaz"}},
 		},
 		{
-			cli.Command{Name: "foo", Subcommands: cli.Commands{&cli.Command{Name: "bar", Hidden: true}, &cli.Command{Name: "baz"}}},
-			cli.Commands{{Name: "baz", HelpName: "baz"}},
+			command:  cli.Command{Name: "foo", Subcommands: cli.Commands{&cli.Command{Name: "bar", Hidden: true}, &cli.Command{Name: "baz"}}},
+			expected: cli.Commands{{Name: "baz", HelpName: "baz"}},
 		},
 	}
 
diff --git a/internal/cli/generic_flag_test.go b/internal/cli/generic_flag_test.go
index 52a8adc7..0b3c09ee 100644
--- a/internal/cli/generic_flag_test.go
+++ b/internal/cli/generic_flag_test.go
@@ -16,53 +16,40 @@ func TestGenericFlagStringApply(t *testing.T) {
 	t.Parallel()
 
 	testCases := []struct {
-		flag          cli.GenericFlag[string]
-		args          []string
+		expectedErr   error
 		envs          map[string]string
 		expectedValue string
-		expectedErr   error
+		args          []string
+		flag          cli.GenericFlag[string]
 	}{
 		{
-			cli.GenericFlag[string]{Name: "foo", EnvVars: []string{"FOO"}},
-			[]string{"--foo", "arg-value"},
-			map[string]string{"FOO": "env-value"},
-			"arg-value",
-			nil,
+			flag:          cli.GenericFlag[string]{Name: "foo", EnvVars: []string{"FOO"}},
+			args:          []string{"--foo", "arg-value"},
+			envs:          map[string]string{"FOO": "env-value"},
+			expectedValue: "arg-value",
 		},
 		{
-			cli.GenericFlag[string]{Name: "foo", EnvVars: []string{"FOO"}},
-			nil,
-			map[string]string{"FOO": "env-value"},
-			"env-value",
-			nil,
+			flag:          cli.GenericFlag[string]{Name: "foo", EnvVars: []string{"FOO"}},
+			envs:          map[string]string{"FOO": "env-value"},
+			expectedValue: "env-value",
 		},
 		{
-			cli.GenericFlag[string]{Name: "foo", EnvVars: []string{"FOO"}},
-			nil,
-			nil,
-			"",
-			nil,
+			flag: cli.GenericFlag[string]{Name: "foo", EnvVars: []string{"FOO"}},
 		},
 		{
-			cli.GenericFlag[string]{Name: "foo", EnvVars: []string{"FOO"}, Destination: mockDestValue("default-value")},
-			[]string{"--foo", "arg-value"},
-			map[string]string{"FOO": "env-value"},
-			"arg-value",
-			nil,
+			flag:          cli.GenericFlag[string]{Name: "foo", EnvVars: []string{"FOO"}, Destination: mockDestValue("default-value")},
+			args:          []string{"--foo", "arg-value"},
+			envs:          map[string]string{"FOO": "env-value"},
+			expectedValue: "arg-value",
 		},
 		{
-			cli.GenericFlag[string]{Name: "foo", Destination: mockDestValue("default-value")},
-			nil,
-			nil,
-			"default-value",
-			nil,
+			flag:          cli.GenericFlag[string]{Name: "foo", Destination: mockDestValue("default-value")},
+			expectedValue: "default-value",
 		},
 		{
-			cli.GenericFlag[string]{Name: "foo", EnvVars: []string{"FOO"}},
-			[]string{"--foo", "arg-value1", "--foo", "arg-value2"},
-			nil,
-			"",
-			errors.New(`invalid value "arg-value2" for flag -foo: setting the flag multiple times`),
+			flag:        cli.GenericFlag[string]{Name: "foo", EnvVars: []string{"FOO"}},
+			args:        []string{"--foo", "arg-value1", "--foo", "arg-value2"},
+			expectedErr: errors.New(`invalid value "arg-value2" for flag -foo: setting the flag multiple times`),
 		},
 	}
 
@@ -81,39 +68,33 @@ func TestGenericFlagIntApply(t *testing.T) {
 	t.Parallel()
 
 	testCases := []struct {
-		flag          cli.GenericFlag[int]
-		args          []string
+		expectedErr   error
 		envs          map[string]string
+		args          []string
+		flag          cli.GenericFlag[int]
 		expectedValue int
-		expectedErr   error
 	}{
 		{
-			cli.GenericFlag[int]{Name: "foo", EnvVars: []string{"FOO"}},
-			[]string{"--foo", "10"},
-			map[string]string{"FOO": "20"},
-			10,
-			nil,
+			flag:          cli.GenericFlag[int]{Name: "foo", EnvVars: []string{"FOO"}},
+			args:          []string{"--foo", "10"},
+			envs:          map[string]string{"FOO": "20"},
+			expectedValue: 10,
 		},
 		{
-			cli.GenericFlag[int]{Name: "foo", EnvVars: []string{"FOO"}},
-			[]string{},
-			map[string]string{"FOO": "20"},
-			20,
-			nil,
+			flag:          cli.GenericFlag[int]{Name: "foo", EnvVars: []string{"FOO"}},
+			args:          []string{},
+			envs:          map[string]string{"FOO": "20"},
+			expectedValue: 20,
 		},
 		{
-			cli.GenericFlag[int]{Name: "foo", EnvVars: []string{"FOO"}},
-			[]string{},
-			map[string]string{"FOO": "monkey"},
-			0,
-			errors.New(`invalid value "monkey" for env var FOO: must be 32-bit integer`),
+			flag:        cli.GenericFlag[int]{Name: "foo", EnvVars: []string{"FOO"}},
+			args:        []string{},
+			envs:        map[string]string{"FOO": "monkey"},
+			expectedErr: errors.New(`invalid value "monkey" for env var FOO: must be 32-bit integer`),
 		},
 		{
-			cli.GenericFlag[int]{Name: "foo", Destination: mockDestValue(55)},
-			nil,
-			nil,
-			55,
-			nil,
+			flag:          cli.GenericFlag[int]{Name: "foo", Destination: mockDestValue(55)},
+			expectedValue: 55,
 		},
 	}
 
@@ -132,39 +113,33 @@ func TestGenericFlagInt64Apply(t *testing.T) {
 	t.Parallel()
 
 	testCases := []struct {
-		flag          cli.GenericFlag[int64]
-		args          []string
+		expectedErr   error
 		envs          map[string]string
+		args          []string
+		flag          cli.GenericFlag[int64]
 		expectedValue int64
-		expectedErr   error
 	}{
 		{
-			cli.GenericFlag[int64]{Name: "foo", EnvVars: []string{"FOO"}},
-			[]string{"--foo", "10"},
-			map[string]string{"FOO": "20"},
-			10,
-			nil,
+			flag:          cli.GenericFlag[int64]{Name: "foo", EnvVars: []string{"FOO"}},
+			args:          []string{"--foo", "10"},
+			envs:          map[string]string{"FOO": "20"},
+			expectedValue: 10,
 		},
 		{
-			cli.GenericFlag[int64]{Name: "foo", EnvVars: []string{"FOO"}},
-			[]string{},
-			map[string]string{"FOO": "20"},
-			20,
-			nil,
+			flag:          cli.GenericFlag[int64]{Name: "foo", EnvVars: []string{"FOO"}},
+			args:          []string{},
+			envs:          map[string]string{"FOO": "20"},
+			expectedValue: 20,
 		},
 		{
-			cli.GenericFlag[int64]{Name: "foo", EnvVars: []string{"FOO"}},
-			[]string{},
-			map[string]string{"FOO": "monkey"},
-			0,
-			errors.New(`invalid value "monkey" for env var FOO: must be 64-bit integer`),
+			flag:        cli.GenericFlag[int64]{Name: "foo", EnvVars: []string{"FOO"}},
+			args:        []string{},
+			envs:        map[string]string{"FOO": "monkey"},
+			expectedErr: errors.New(`invalid value "monkey" for env var FOO: must be 64-bit integer`),
 		},
 		{
-			cli.GenericFlag[int64]{Name: "foo", Destination: mockDestValue(int64(55))},
-			nil,
-			nil,
-			55,
-			nil,
+			flag:          cli.GenericFlag[int64]{Name: "foo", Destination: mockDestValue(int64(55))},
+			expectedValue: 55,
 		},
 	}
 
diff --git a/internal/cli/map_flag_test.go b/internal/cli/map_flag_test.go
index 78e442d3..9dddd999 100644
--- a/internal/cli/map_flag_test.go
+++ b/internal/cli/map_flag_test.go
@@ -16,46 +16,36 @@ func TestMapFlagStringStringApply(t *testing.T) {
 	t.Parallel()
 
 	testCases := []struct {
-		flag          cli.MapFlag[string, string]
-		args          []string
+		expectedErr   error
 		envs          map[string]string
 		expectedValue map[string]string
-		expectedErr   error
+		args          []string
+		flag          cli.MapFlag[string, string]
 	}{
 		{
-			cli.MapFlag[string, string]{Name: "foo", EnvVars: []string{"FOO"}},
-			[]string{"--foo", "arg1-key=arg1-value", "--foo", "arg2-key = arg2-value"},
-			map[string]string{"FOO": "env1-key=env1-value,env2-key=env2-value"},
-			map[string]string{"arg1-key": "arg1-value", "arg2-key": "arg2-value"},
-			nil,
+			flag:          cli.MapFlag[string, string]{Name: "foo", EnvVars: []string{"FOO"}},
+			args:          []string{"--foo", "arg1-key=arg1-value", "--foo", "arg2-key = arg2-value"},
+			envs:          map[string]string{"FOO": "env1-key=env1-value,env2-key=env2-value"},
+			expectedValue: map[string]string{"arg1-key": "arg1-value", "arg2-key": "arg2-value"},
 		},
 		{
-			cli.MapFlag[string, string]{Name: "foo", EnvVars: []string{"FOO"}},
-			nil,
-			map[string]string{"FOO": "env1-key=env1-value,env2-key = env2-value"},
-			map[string]string{"env1-key": "env1-value", "env2-key": "env2-value"},
-			nil,
+			flag:          cli.MapFlag[string, string]{Name: "foo", EnvVars: []string{"FOO"}},
+			envs:          map[string]string{"FOO": "env1-key=env1-value,env2-key = env2-value"},
+			expectedValue: map[string]string{"env1-key": "env1-value", "env2-key": "env2-value"},
 		},
 		{
-			cli.MapFlag[string, string]{Name: "foo", EnvVars: []string{"FOO"}},
-			nil,
-			nil,
-			map[string]string{},
-			nil,
+			flag:          cli.MapFlag[string, string]{Name: "foo", EnvVars: []string{"FOO"}},
+			expectedValue: map[string]string{},
 		},
 		{
-			cli.MapFlag[string, string]{Name: "foo", EnvVars: []string{"FOO"}, Destination: mockDestValue(map[string]string{"default1-key": "default1-value", "default2-key": "default2-value"})},
-			[]string{"--foo", "arg1-key=arg1-value", "--foo", "arg2-key=arg2-value"},
-			map[string]string{"FOO": "env1-key=env1-value,env2-key=env2-value"},
-			map[string]string{"arg1-key": "arg1-value", "arg2-key": "arg2-value"},
-			nil,
+			flag:          cli.MapFlag[string, string]{Name: "foo", EnvVars: []string{"FOO"}, Destination: mockDestValue(map[string]string{"default1-key": "default1-value", "default2-key": "default2-value"})},
+			args:          []string{"--foo", "arg1-key=arg1-value", "--foo", "arg2-key=arg2-value"},
+			envs:          map[string]string{"FOO": "env1-key=env1-value,env2-key=env2-value"},
+			expectedValue: map[string]string{"arg1-key": "arg1-value", "arg2-key": "arg2-value"},
 		},
 		{
-			cli.MapFlag[string, string]{Name: "foo", Destination: mockDestValue(map[string]string{"default1-key": "default1-value", "default2-key": "default2-value"})},
-			nil,
-			nil,
-			map[string]string{"default1-key": "default1-value", "default2-key": "default2-value"},
-			nil,
+			flag:          cli.MapFlag[string, string]{Name: "foo", Destination: mockDestValue(map[string]string{"default1-key": "default1-value", "default2-key": "default2-value"})},
+			expectedValue: map[string]string{"default1-key": "default1-value", "default2-key": "default2-value"},
 		},
 	}
 
@@ -74,40 +64,33 @@ func TestMapFlagStringIntApply(t *testing.T) {
 	t.Parallel()
 
 	testCases := []struct {
-		flag          cli.MapFlag[string, int]
-		args          []string
+		expectedErr   error
 		envs          map[string]string
 		expectedValue map[string]int
-		expectedErr   error
+		args          []string
+		flag          cli.MapFlag[string, int]
 	}{
 		{
-			cli.MapFlag[string, int]{Name: "foo", EnvVars: []string{"FOO"}},
-			[]string{"--foo", "arg1-key=10", "--foo", "arg2-key=11"},
-			map[string]string{"FOO": "env1-key=20,env2-key=21"},
-			map[string]int{"arg1-key": 10, "arg2-key": 11},
-			nil,
+			flag:          cli.MapFlag[string, int]{Name: "foo", EnvVars: []string{"FOO"}},
+			args:          []string{"--foo", "arg1-key=10", "--foo", "arg2-key=11"},
+			envs:          map[string]string{"FOO": "env1-key=20,env2-key=21"},
+			expectedValue: map[string]int{"arg1-key": 10, "arg2-key": 11},
 		},
 		{
-			cli.MapFlag[string, int]{Name: "foo", EnvVars: []string{"FOO"}},
-			nil,
-			map[string]string{"FOO": "env1-key=20,env2-key=21"},
-			map[string]int{"env1-key": 20, "env2-key": 21},
-			nil,
+			flag:          cli.MapFlag[string, int]{Name: "foo", EnvVars: []string{"FOO"}},
+			envs:          map[string]string{"FOO": "env1-key=20,env2-key=21"},
+			expectedValue: map[string]int{"env1-key": 20, "env2-key": 21},
 		},
 
 		{
-			cli.MapFlag[string, int]{Name: "foo", EnvVars: []string{"FOO"}, Destination: mockDestValue(map[string]int{"default1-key": 50, "default2-key": 51})},
-			[]string{"--foo", "arg1-key=10", "--foo", "arg2-key=11"},
-			map[string]string{"FOO": "env1-key=20,env2-key=21"},
-			map[string]int{"arg1-key": 10, "arg2-key": 11},
-			nil,
+			flag:          cli.MapFlag[string, int]{Name: "foo", EnvVars: []string{"FOO"}, Destination: mockDestValue(map[string]int{"default1-key": 50, "default2-key": 51})},
+			args:          []string{"--foo", "arg1-key=10", "--foo", "arg2-key=11"},
+			envs:          map[string]string{"FOO": "env1-key=20,env2-key=21"},
+			expectedValue: map[string]int{"arg1-key": 10, "arg2-key": 11},
 		},
 		{
-			cli.MapFlag[string, int]{Name: "foo", Destination: mockDestValue(map[string]int{"default1-key": 50, "default2-key": 51})},
-			nil,
-			nil,
-			map[string]int{"default1-key": 50, "default2-key": 51},
-			nil,
+			flag:          cli.MapFlag[string, int]{Name: "foo", Destination: mockDestValue(map[string]int{"default1-key": 50, "default2-key": 51})},
+			expectedValue: map[string]int{"default1-key": 50, "default2-key": 51},
 		},
 	}
 
diff --git a/internal/cli/slice_flag_test.go b/internal/cli/slice_flag_test.go
index 8da40609..e20ce306 100644
--- a/internal/cli/slice_flag_test.go
+++ b/internal/cli/slice_flag_test.go
@@ -16,46 +16,35 @@ func TestSliceFlagStringApply(t *testing.T) {
 	t.Parallel()
 
 	testCases := []struct {
-		flag          cli.SliceFlag[string]
-		args          []string
+		expectedErr   error
 		envs          map[string]string
+		args          []string
 		expectedValue []string
-		expectedErr   error
+		flag          cli.SliceFlag[string]
 	}{
 		{
-			cli.SliceFlag[string]{Name: "foo", EnvVars: []string{"FOO"}},
-			[]string{"--foo", "arg-value1", "--foo", "arg-value2"},
-			map[string]string{"FOO": "env-value"},
-			[]string{"arg-value1", "arg-value2"},
-			nil,
+			flag:          cli.SliceFlag[string]{Name: "foo", EnvVars: []string{"FOO"}},
+			args:          []string{"--foo", "arg-value1", "--foo", "arg-value2"},
+			envs:          map[string]string{"FOO": "env-value"},
+			expectedValue: []string{"arg-value1", "arg-value2"},
 		},
 		{
-			cli.SliceFlag[string]{Name: "foo", EnvVars: []string{"FOO"}},
-			nil,
-			map[string]string{"FOO": "env-value1,env-value2"},
-			[]string{"env-value1", "env-value2"},
-			nil,
+			flag:          cli.SliceFlag[string]{Name: "foo", EnvVars: []string{"FOO"}},
+			envs:          map[string]string{"FOO": "env-value1,env-value2"},
+			expectedValue: []string{"env-value1", "env-value2"},
 		},
 		{
-			cli.SliceFlag[string]{Name: "foo", EnvVars: []string{"FOO"}},
-			nil,
-			nil,
-			nil,
-			nil,
+			flag: cli.SliceFlag[string]{Name: "foo", EnvVars: []string{"FOO"}},
 		},
 		{
-			cli.SliceFlag[string]{Name: "foo", EnvVars: []string{"FOO"}, Destination: mockDestValue([]string{"default-value1", "default-value2"})},
-			[]string{"--foo", "arg-value1", "--foo", "arg-value2"},
-			map[string]string{"FOO": "env-value1,env-value2"},
-			[]string{"arg-value1", "arg-value2"},
-			nil,
+			flag:          cli.SliceFlag[string]{Name: "foo", EnvVars: []string{"FOO"}, Destination: mockDestValue([]string{"default-value1", "default-value2"})},
+			args:          []string{"--foo", "arg-value1", "--foo", "arg-value2"},
+			envs:          map[string]string{"FOO": "env-value1,env-value2"},
+			expectedValue: []string{"arg-value1", "arg-value2"},
 		},
 		{
-			cli.SliceFlag[string]{Name: "foo", Destination: mockDestValue([]string{"default-value1", "default-value2"})},
-			nil,
-			nil,
-			[]string{"default-value1", "default-value2"},
-			nil,
+			flag:          cli.SliceFlag[string]{Name: "foo", Destination: mockDestValue([]string{"default-value1", "default-value2"})},
+			expectedValue: []string{"default-value1", "default-value2"},
 		},
 	}
 
@@ -74,32 +63,26 @@ func TestSliceFlagIntApply(t *testing.T) {
 	t.Parallel()
 
 	testCases := []struct {
-		flag          cli.SliceFlag[int]
-		args          []string
+		expectedErr   error
 		envs          map[string]string
+		args          []string
 		expectedValue []int
-		expectedErr   error
+		flag          cli.SliceFlag[int]
 	}{
 		{
-			cli.SliceFlag[int]{Name: "foo", EnvVars: []string{"FOO"}},
-			[]string{"--foo", "10", "--foo", "11"},
-			map[string]string{"FOO": "20,21"},
-			[]int{10, 11},
-			nil,
+			flag:          cli.SliceFlag[int]{Name: "foo", EnvVars: []string{"FOO"}},
+			args:          []string{"--foo", "10", "--foo", "11"},
+			envs:          map[string]string{"FOO": "20,21"},
+			expectedValue: []int{10, 11},
 		},
 		{
-			cli.SliceFlag[int]{Name: "foo", EnvVars: []string{"FOO"}},
-			[]string{},
-			map[string]string{"FOO": "20,21"},
-			[]int{20, 21},
-			nil,
+			flag:          cli.SliceFlag[int]{Name: "foo", EnvVars: []string{"FOO"}},
+			envs:          map[string]string{"FOO": "20,21"},
+			expectedValue: []int{20, 21},
 		},
 		{
-			cli.SliceFlag[int]{Name: "foo", Destination: mockDestValue([]int{50, 51})},
-			nil,
-			nil,
-			[]int{50, 51},
-			nil,
+			flag:          cli.SliceFlag[int]{Name: "foo", Destination: mockDestValue([]int{50, 51})},
+			expectedValue: []int{50, 51},
 		},
 	}
 
@@ -118,32 +101,26 @@ func TestSliceFlagInt64Apply(t *testing.T) {
 	t.Parallel()
 
 	testCases := []struct {
-		flag          cli.SliceFlag[int64]
-		args          []string
+		expectedErr   error
 		envs          map[string]string
+		args          []string
 		expectedValue []int64
-		expectedErr   error
+		flag          cli.SliceFlag[int64]
 	}{
 		{
-			cli.SliceFlag[int64]{Name: "foo", EnvVars: []string{"FOO"}},
-			[]string{"--foo", "10", "--foo", "11"},
-			map[string]string{"FOO": "20,21"},
-			[]int64{10, 11},
-			nil,
+			flag:          cli.SliceFlag[int64]{Name: "foo", EnvVars: []string{"FOO"}},
+			args:          []string{"--foo", "10", "--foo", "11"},
+			envs:          map[string]string{"FOO": "20,21"},
+			expectedValue: []int64{10, 11},
 		},
 		{
-			cli.SliceFlag[int64]{Name: "foo", EnvVars: []string{"FOO"}},
-			[]string{},
-			map[string]string{"FOO": "20,21"},
-			[]int64{20, 21},
-			nil,
+			flag:          cli.SliceFlag[int64]{Name: "foo", EnvVars: []string{"FOO"}},
+			envs:          map[string]string{"FOO": "20,21"},
+			expectedValue: []int64{20, 21},
 		},
 		{
-			cli.SliceFlag[int64]{Name: "foo", Destination: mockDestValue([]int64{50, 51})},
-			nil,
-			nil,
-			[]int64{50, 51},
-			nil,
+			flag:          cli.SliceFlag[int64]{Name: "foo", Destination: mockDestValue([]int64{50, 51})},
+			expectedValue: []int64{50, 51},
 		},
 	}
 
diff --git a/internal/experiment/experiment_test.go b/internal/experiment/experiment_test.go
index 28916fe7..ad787b59 100644
--- a/internal/experiment/experiment_test.go
+++ b/internal/experiment/experiment_test.go
@@ -31,11 +31,11 @@ func TestValidateExperiments(t *testing.T) {
 	t.Parallel()
 
 	testCases := []struct {
+		expectedError   error
 		name            string
+		expectedWarning string
 		experiments     experiment.Experiments
 		experimentNames []string
-		expectedWarning string
-		expectedError   error
 	}{
 		{
 			name: "no experiments",
diff --git a/internal/strict/control_test.go b/internal/strict/control_test.go
index 904a985b..bf09ec32 100644
--- a/internal/strict/control_test.go
+++ b/internal/strict/control_test.go
@@ -124,69 +124,60 @@ func TestEnableControl(t *testing.T) {
 	t.Parallel()
 
 	type testEnableControl struct {
-		controlName string
 		expectedErr error
+		controlName string
 	}
 
 	testCases := []struct {
+		expectedCompletedMsg    string
 		enableControls          []testEnableControl
 		expectedEnabledControls []string
-		expectedCompletedMsg    string
 	}{
 		{
-			[]testEnableControl{
+			enableControls: []testEnableControl{
 				{
-					testOngoingAName,
-					nil,
+					controlName: testOngoingAName,
 				},
 				{
-					testOngoingCName,
-					nil,
+					controlName: testOngoingCName,
 				},
 				{
-					testCompletedAName,
-					nil,
+					controlName: testCompletedAName,
 				},
 				{
-					testCompletedCName,
-					nil,
+					controlName: testCompletedCName,
 				},
 				{
-					"invalid",
-					strict.NewInvalidControlNameError([]string{testOngoingAName, testOngoingBName, testOngoingCName, testParentAName}),
+					controlName: "invalid",
+					expectedErr: strict.NewInvalidControlNameError([]string{testOngoingAName, testOngoingBName, testOngoingCName, testParentAName}),
 				},
 			},
-			[]string{testOngoingAName, testOngoingSubAName, testOngoingCName, testCompletedAName, testCompletedCName},
-			fmt.Sprintf(strict.CompletedControlsFmt, strict.ControlNames([]string{testCompletedAName, testCompletedCName})),
+			expectedEnabledControls: []string{testOngoingAName, testOngoingSubAName, testOngoingCName, testCompletedAName, testCompletedCName},
+			expectedCompletedMsg:    fmt.Sprintf(strict.CompletedControlsFmt, strict.ControlNames([]string{testCompletedAName, testCompletedCName})),
 		},
 		{
-			[]testEnableControl{
+			enableControls: []testEnableControl{
 				{
-					testOngoingBName,
-					nil,
+					controlName: testOngoingBName,
 				},
 				{
-					testCompletedBName,
-					nil,
+					controlName: testCompletedBName,
 				},
 			},
-			[]string{testOngoingBName, testCompletedBName},
-			fmt.Sprintf(strict.CompletedControlsFmt, strict.ControlNames([]string{testCompletedBName})),
+			expectedEnabledControls: []string{testOngoingBName, testCompletedBName},
+			expectedCompletedMsg:    fmt.Sprintf(strict.CompletedControlsFmt, strict.ControlNames([]string{testCompletedBName})),
 		},
 		{
-			[]testEnableControl{},
-			[]string{},
-			"",
+			enableControls:          []testEnableControl{},
+			expectedEnabledControls: []string{},
 		},
 		{
-			[]testEnableControl{
+			enableControls: []testEnableControl{
 				{
-					testParentAName,
-					nil,
+					controlName: testParentAName,
 				},
 			},
-			[]string{testParentAName, testOngoingSubAName},
-			"",
+			expectedEnabledControls: []string{testParentAName, testOngoingSubAName},
 		},
 	}
 
@@ -244,16 +235,16 @@ func TestEnableStrictMode(t *testing.T) {
 	t.Parallel()
 
 	testCases := []struct {
-		enableStrictMode        bool
 		expectedEnabledControls []string
+		enableStrictMode        bool
 	}{
 		{
-			true,
-			[]string{testParentAName, testOngoingSubAName, testOngoingAName, testOngoingSubAName, testOngoingBName, testOngoingCName},
+			enableStrictMode:        true,
+			expectedEnabledControls: []string{testParentAName, testOngoingSubAName, testOngoingAName, testOngoingSubAName, testOngoingBName, testOngoingCName},
 		},
 		{
-			false,
-			[]string{},
+			enableStrictMode:        false,
+			expectedEnabledControls: []string{},
 		},
 	}
 
@@ -294,8 +285,8 @@ func TestEvaluateControl(t *testing.T) {
 	t.Parallel()
 
 	type testEvaluateControl struct {
-		name        string
 		expectedErr error
+		name        string
 	}
 
 	testCases := []struct {
@@ -304,59 +295,55 @@ func TestEvaluateControl(t *testing.T) {
 		expectedWarns    []string
 	}{
 		{
-			[]string{testOngoingAName, testOngoingBName},
-			[]testEvaluateControl{
+			enableControls: []string{testOngoingAName, testOngoingBName},
+			evaluateControls: []testEvaluateControl{
 				{
-					testOngoingAName,
-					testOngoingA().Error,
+					name:        testOngoingAName,
+					expectedErr: testOngoingA().Error,
 				},
 			},
-			[]string{""},
+			expectedWarns: []string{""},
 		},
 		{
-			[]string{testOngoingBName},
-			[]testEvaluateControl{
+			enableControls: []string{testOngoingBName},
+			evaluateControls: []testEvaluateControl{
 				{
-					testOngoingBName,
-					testOngoingB().Error,
+					name:        testOngoingBName,
+					expectedErr: testOngoingB().Error,
 				},
 			},
-			[]string{""},
+			expectedWarns: []string{""},
 		},
 		{
 			// Testing output warning message once.
-			[]string{testOngoingBName},
-			[]testEvaluateControl{
+			enableControls: []string{testOngoingBName},
+			evaluateControls: []testEvaluateControl{
 				{
-					testOngoingAName,
-					nil,
+					name: testOngoingAName,
 				},
 				{
-					testOngoingAName,
-					nil,
+					name: testOngoingAName,
 				},
 			},
-			[]string{testOngoingA().Warning, testOngoingSubA().Warning},
+			expectedWarns: []string{testOngoingA().Warning, testOngoingSubA().Warning},
 		},
 		{
-			[]string{testCompletedAName},
-			[]testEvaluateControl{
+			enableControls: []string{testCompletedAName},
+			evaluateControls: []testEvaluateControl{
 				{
-					testOngoingAName,
-					nil,
+					name: testOngoingAName,
 				},
 			},
-			[]string{testOngoingA().Warning, testOngoingSubA().Warning},
+			expectedWarns: []string{testOngoingA().Warning, testOngoingSubA().Warning},
 		},
 		{
-			[]string{testCompletedAName},
-			[]testEvaluateControl{
+			enableControls: []string{testCompletedAName},
+			evaluateControls: []testEvaluateControl{
 				{
-					testCompletedAName,
-					nil,
+					name: testCompletedAName,
 				},
 			},
-			[]string{""},
+			expectedWarns: []string{""},
 		},
 	}
 
diff --git a/remote/remote_encryption_test.go b/remote/remote_encryption_test.go
index 0bde63ee..623ba2d5 100644
--- a/remote/remote_encryption_test.go
+++ b/remote/remote_encryption_test.go
@@ -12,9 +12,9 @@ func TestUnmarshalConfig(t *testing.T) {
 	t.Parallel()
 
 	tc := []struct {
+		encryptionConfig              map[string]any
 		name                          string
 		providerType                  string
-		encryptionConfig              map[string]any
 		expectedErrorCreatingProvider bool
 		expectedErrorFromProvider     bool
 	}{
@@ -142,10 +142,10 @@ func TestToMap(t *testing.T) {
 	t.Parallel()
 
 	tc := []struct {
-		name             string
-		providerType     string
 		encryptionConfig map[string]any
 		expectedMap      map[string]any
+		name             string
+		providerType     string
 		expectedError    bool
 	}{
 		{
diff --git a/remote/remote_state_test.go b/remote/remote_state_test.go
index 72ea1e67..d504a835 100644
--- a/remote/remote_state_test.go
+++ b/remote/remote_state_test.go
@@ -134,150 +134,153 @@ func TestDiffersFrom(t *testing.T) {
 	require.NoError(t, err, "Unexpected error creating NewTerragruntOptionsForTest: %v", err)
 
 	testCases := []struct {
-		name            string
 		existingBackend remote.TerraformBackend
+		name            string
 		stateFromConfig remote.RemoteState
 		shouldOverride  bool
 	}{
-		{"both empty", remote.TerraformBackend{}, remote.RemoteState{}, false},
-		{"same backend type value", remote.TerraformBackend{Type: "s3"}, remote.RemoteState{Backend: "s3"}, false},
-		{"different backend type values", remote.TerraformBackend{Type: "s3"}, remote.RemoteState{Backend: "atlas"}, true},
 		{
-			"identical S3 configs",
-			remote.TerraformBackend{
+			name:            "both empty",
+			existingBackend: remote.TerraformBackend{},
+			stateFromConfig: remote.RemoteState{},
+		},
+		{
+			name:            "same backend type value",
+			existingBackend: remote.TerraformBackend{Type: "s3"},
+			stateFromConfig: remote.RemoteState{Backend: "s3"},
+		}, {
+			name: "identical S3 configs",
+			existingBackend: remote.TerraformBackend{
 				Type:   "s3",
 				Config: map[string]any{"bucket": "foo", "key": "bar", "region": "us-east-1"},
 			},
-			remote.RemoteState{
+			stateFromConfig: remote.RemoteState{
 				Backend: "s3",
 				Config:  map[string]any{"bucket": "foo", "key": "bar", "region": "us-east-1"},
 			},
-			false,
 		}, {
-			"identical GCS configs",
-			remote.TerraformBackend{
+			name: "identical GCS configs",
+			existingBackend: remote.TerraformBackend{
 				Type:   "gcs",
 				Config: map[string]any{"project": "foo-123456", "location": "europe-west3", "bucket": "foo", "prefix": "bar"},
 			},
-			remote.RemoteState{
+			stateFromConfig: remote.RemoteState{
 				Backend: "gcs",
 				Config:  map[string]any{"project": "foo-123456", "location": "europe-west3", "bucket": "foo", "prefix": "bar"},
 			},
-			false,
+			shouldOverride: false,
 		}, {
-			"different s3 bucket values",
-			remote.TerraformBackend{
+			name: "different s3 bucket values",
+			existingBackend: remote.TerraformBackend{
 				Type:   "s3",
 				Config: map[string]any{"bucket": "foo", "key": "bar", "region": "us-east-1"},
 			},
-			remote.RemoteState{
+			stateFromConfig: remote.RemoteState{
 				Backend: "s3",
 				Config:  map[string]any{"bucket": "different", "key": "bar", "region": "us-east-1"},
 			},
-			true,
+			shouldOverride: true,
 		}, {
-			"different gcs bucket values",
-			remote.TerraformBackend{
+			name: "different gcs bucket values",
+			existingBackend: remote.TerraformBackend{
 				Type:   "gcs",
 				Config: map[string]any{"project": "foo-123456", "location": "europe-west3", "bucket": "foo", "prefix": "bar"},
 			},
-			remote.RemoteState{
+			stateFromConfig: remote.RemoteState{
 				Backend: "gcs",
 				Config:  map[string]any{"project": "foo-123456", "location": "europe-west3", "bucket": "different", "prefix": "bar"},
 			},
-			true,
+			shouldOverride: true,
 		}, {
-			"different s3 key values",
-			remote.TerraformBackend{
+			name: "different s3 key values",
+			existingBackend: remote.TerraformBackend{
 				Type:   "s3",
 				Config: map[string]any{"bucket": "foo", "key": "bar", "region": "us-east-1"},
 			},
-			remote.RemoteState{
+			stateFromConfig: remote.RemoteState{
 				Backend: "s3",
 				Config:  map[string]any{"bucket": "foo", "key": "different", "region": "us-east-1"},
 			},
-			true,
+			shouldOverride: true,
 		}, {
-			"different gcs prefix values",
-			remote.TerraformBackend{
+			name: "different gcs prefix values",
+			existingBackend: remote.TerraformBackend{
 				Type:   "gcs",
 				Config: map[string]any{"project": "foo-123456", "location": "europe-west3", "bucket": "foo", "prefix": "bar"},
 			},
-			remote.RemoteState{
+			stateFromConfig: remote.RemoteState{
 				Backend: "gcs",
 				Config:  map[string]any{"project": "foo-123456", "location": "europe-west3", "bucket": "foo", "prefix": "different"},
 			},
-			true,
+			shouldOverride: true,
 		}, {
-			"different s3 region values",
-			remote.TerraformBackend{
+			name: "different s3 region values",
+			existingBackend: remote.TerraformBackend{
 				Type:   "s3",
 				Config: map[string]any{"bucket": "foo", "key": "bar", "region": "us-east-1"},
 			},
-			remote.RemoteState{
+			stateFromConfig: remote.RemoteState{
 				Backend: "s3",
 				Config:  map[string]any{"bucket": "foo", "key": "bar", "region": "different"},
 			},
-			true,
+			shouldOverride: true,
 		}, {
-			"different gcs location values",
-			remote.TerraformBackend{
+			name: "different gcs location values",
+			existingBackend: remote.TerraformBackend{
 				Type:   "gcs",
 				Config: map[string]any{"project": "foo-123456", "location": "europe-west3", "bucket": "foo", "prefix": "bar"},
 			},
-			remote.RemoteState{
+			stateFromConfig: remote.RemoteState{
 				Backend: "gcs",
 				Config:  map[string]any{"project": "foo-123456", "location": "different", "bucket": "foo", "prefix": "bar"},
 			},
-			true,
+			shouldOverride: true,
 		},
 		{
-			"different boolean values and boolean conversion",
-			remote.TerraformBackend{
+			name: "different boolean values and boolean conversion",
+			existingBackend: remote.TerraformBackend{
 				Type:   "s3",
 				Config: map[string]any{"something": "true"},
 			},
-			remote.RemoteState{
+			stateFromConfig: remote.RemoteState{
 				Backend: "s3",
 				Config:  map[string]any{"something": false},
 			},
-			true,
+			shouldOverride: true,
 		},
 		{
-			"different gcs boolean values and boolean conversion",
-			remote.TerraformBackend{
+			name: "different gcs boolean values and boolean conversion",
+			existingBackend: remote.TerraformBackend{
 				Type:   "gcs",
 				Config: map[string]any{"something": "true"},
 			},
-			remote.RemoteState{
+			stateFromConfig: remote.RemoteState{
 				Backend: "gcs",
 				Config:  map[string]any{"something": false},
 			},
-			true,
+			shouldOverride: true,
 		},
 		{
-			"null values ignored",
-			remote.TerraformBackend{
+			name: "null values ignored",
+			existingBackend: remote.TerraformBackend{
 				Type:   "s3",
 				Config: map[string]any{"something": "foo", "set-to-nil-should-be-ignored": nil},
 			},
-			remote.RemoteState{
+			stateFromConfig: remote.RemoteState{
 				Backend: "s3",
 				Config:  map[string]any{"something": "foo"},
 			},
-			false,
 		},
 		{
-			"gcs null values ignored",
-			remote.TerraformBackend{
+			name: "gcs null values ignored",
+			existingBackend: remote.TerraformBackend{
 				Type:   "gcs",
 				Config: map[string]any{"something": "foo", "set-to-nil-should-be-ignored": nil},
 			},
-			remote.RemoteState{
+			stateFromConfig: remote.RemoteState{
 				Backend: "gcs",
 				Config:  map[string]any{"something": "foo"},
 			},
-			false,
 		},
 	}
 
diff --git a/telemetry/metrics_test.go b/telemetry/metrics_test.go
index 82d7305a..12f43053 100644
--- a/telemetry/metrics_test.go
+++ b/telemetry/metrics_test.go
@@ -24,10 +24,10 @@ func TestNewMetricsExporter(t *testing.T) {
 	require.NoError(t, err)
 
 	tests := []struct {
+		expectedType any
 		name         string
 		exporterType string
 		insecure     bool
-		expectedType any
 		expectNil    bool
 	}{
 		{
diff --git a/telemetry/traces_test.go b/telemetry/traces_test.go
index 5a4f4617..d93d4660 100644
--- a/telemetry/traces_test.go
+++ b/telemetry/traces_test.go
@@ -28,9 +28,9 @@ func TestNewTraceExporter(t *testing.T) {
 	require.NoError(t, err)
 
 	tests := []struct {
-		name             string
-		telemetryOptions *telemetry.TelemetryOptions
 		expectedType     any
+		telemetryOptions *telemetry.TelemetryOptions
+		name             string
 		expectError      bool
 	}{
 		{
diff --git a/test/fixtures/stacks/absolute-path/live/terragrunt.stack.hcl b/test/fixtures/stacks/errors/absolute-path/live/terragrunt.stack.hcl
similarity index 100%
rename from test/fixtures/stacks/absolute-path/live/terragrunt.stack.hcl
rename to test/fixtures/stacks/errors/absolute-path/live/terragrunt.stack.hcl
diff --git a/test/fixtures/stacks/absolute-path/units/app/main.tf b/test/fixtures/stacks/errors/absolute-path/units/app/main.tf
similarity index 100%
rename from test/fixtures/stacks/absolute-path/units/app/main.tf
rename to test/fixtures/stacks/errors/absolute-path/units/app/main.tf
diff --git a/test/fixtures/stacks/absolute-path/units/app/terragrunt.hcl b/test/fixtures/stacks/errors/absolute-path/units/app/terragrunt.hcl
similarity index 100%
rename from test/fixtures/stacks/absolute-path/units/app/terragrunt.hcl
rename to test/fixtures/stacks/errors/absolute-path/units/app/terragrunt.hcl
diff --git a/test/fixtures/stacks/errors/relative-path-outside-of-stack/live/terragrunt.stack.hcl b/test/fixtures/stacks/errors/relative-path-outside-of-stack/live/terragrunt.stack.hcl
new file mode 100644
index 00000000..07aac770
--- /dev/null
+++ b/test/fixtures/stacks/errors/relative-path-outside-of-stack/live/terragrunt.stack.hcl
@@ -0,0 +1,5 @@
+
+unit "app1" {
+	source = "../units/app1"
+	path   = "../project1/app1"
+}
diff --git a/test/fixtures/stacks/errors/relative-path-outside-of-stack/units/app1/main.tf b/test/fixtures/stacks/errors/relative-path-outside-of-stack/units/app1/main.tf
new file mode 100644
index 00000000..e69de29b
diff --git a/test/fixtures/stacks/errors/relative-path-outside-of-stack/units/app1/terragrunt.hcl b/test/fixtures/stacks/errors/relative-path-outside-of-stack/units/app1/terragrunt.hcl
new file mode 100644
index 00000000..5946e383
--- /dev/null
+++ b/test/fixtures/stacks/errors/relative-path-outside-of-stack/units/app1/terragrunt.hcl
@@ -0,0 +1,3 @@
+terraform {
+  source = "."
+}
\ No newline at end of file
diff --git a/test/helpers/package.go b/test/helpers/package.go
index 7120f7cd..18cb54f3 100644
--- a/test/helpers/package.go
+++ b/test/helpers/package.go
@@ -74,9 +74,9 @@ const (
 )
 
 type TerraformOutput struct {
-	Sensitive bool `json:"Sensitive"`
 	Type      any  `json:"Type"`
 	Value     any  `json:"Value"`
+	Sensitive bool `json:"Sensitive"`
 }
 
 func CopyEnvironment(t *testing.T, environmentPath string, includeInCopy ...string) string {
@@ -429,8 +429,8 @@ func (provider *FakeProvider) createVersionJSON(t *testing.T, providerDir string
 	t.Helper()
 
 	type VersionProvider struct {
-		Hashes []string `json:"hashes"`
 		URL    string   `json:"url"`
+		Hashes []string `json:"hashes"`
 	}
 
 	type Version struct {
diff --git a/test/integration_common_test.go b/test/integration_common_test.go
index 9b5ba682..f4a5e17f 100644
--- a/test/integration_common_test.go
+++ b/test/integration_common_test.go
@@ -159,8 +159,8 @@ func (provider *FakeProvider) createVersionJSON(t *testing.T, providerDir string
 	t.Helper()
 
 	type VersionProvider struct {
-		Hashes []string `json:"hashes"`
 		URL    string   `json:"url"`
+		Hashes []string `json:"hashes"`
 	}
 	type Version struct {
 		Archives map[string]VersionProvider `json:"archives"`
diff --git a/test/integration_find_test.go b/test/integration_find_test.go
index 5187eb81..7437e2cb 100644
--- a/test/integration_find_test.go
+++ b/test/integration_find_test.go
@@ -45,8 +45,8 @@ func TestFindHidden(t *testing.T) {
 
 	tc := []struct {
 		name     string
-		hidden   bool
 		expected string
+		hidden   bool
 	}{
 		{
 			name:     "visible",
diff --git a/test/integration_list_test.go b/test/integration_list_test.go
index cd0b87e5..057b9844 100644
--- a/test/integration_list_test.go
+++ b/test/integration_list_test.go
@@ -15,8 +15,8 @@ func TestListCommand(t *testing.T) {
 	testCases := []struct {
 		name           string
 		workingDir     string
-		args           []string
 		expectedOutput string
+		args           []string
 	}{
 		{
 			name:           "Basic list with default format",
@@ -70,8 +70,8 @@ func TestListCommandWithDependencies(t *testing.T) {
 	testCases := []struct {
 		name       string
 		workingDir string
-		args       []string
 		expected   string
+		args       []string
 	}{
 		{
 			name:       "List with dependencies in tree format",
diff --git a/test/integration_serial_test.go b/test/integration_serial_test.go
index e882902a..6cd9cae3 100644
--- a/test/integration_serial_test.go
+++ b/test/integration_serial_test.go
@@ -87,7 +87,7 @@ func TestTerragruntProviderCacheWithFilesystemMirror(t *testing.T) {
 
 	helpers.RunTerragrunt(t, fmt.Sprintf("terragrunt run-all init --terragrunt-provider-cache --terragrunt-provider-cache-registry-names example.com --terragrunt-provider-cache-registry-names registry.opentofu.org --terragrunt-provider-cache-registry-names registry.terraform.io --terragrunt-provider-cache-dir %s --terragrunt-log-level trace --terragrunt-non-interactive --terragrunt-working-dir %s", providerCacheDir, appPath))
 
-	expectedProviderInstallation := `provider_installation { "filesystem_mirror" { path = "%s" include = ["example.com/*/*"] exclude = ["example.com/*/*", "registry.opentofu.org/*/*", "registry.terraform.io/*/*"] } "filesystem_mirror" { path = "%s" include = ["example.com/*/*", "registry.opentofu.org/*/*", "registry.terraform.io/*/*"] } "direct" { } }`
+	expectedProviderInstallation := `provider_installation { "filesystem_mirror" { include = ["example.com/*/*"] exclude = ["example.com/*/*", "registry.opentofu.org/*/*", "registry.terraform.io/*/*"] path = "%s" } "filesystem_mirror" { include = ["example.com/*/*", "registry.opentofu.org/*/*", "registry.terraform.io/*/*"] path = "%s" } "direct" { } }`
 	expectedProviderInstallation = fmt.Sprintf(strings.Join(strings.Fields(expectedProviderInstallation), " "), providersMirrorPath, providerCacheDir)
 
 	terraformrcBytes, err := os.ReadFile(filepath.Join(appPath, ".terraformrc"))
@@ -193,7 +193,7 @@ func TestTerragruntProviderCacheWithNetworkMirror(t *testing.T) {
 
 	helpers.RunTerragrunt(t, fmt.Sprintf("terragrunt run-all init --terragrunt-provider-cache --terragrunt-provider-cache-registry-names example.com --terragrunt-provider-cache-registry-names registry.opentofu.org --terragrunt-provider-cache-registry-names registry.terraform.io --terragrunt-provider-cache-dir %s --terragrunt-log-level trace --terragrunt-non-interactive --terragrunt-working-dir %s", providerCacheDir, appsPath))
 
-	expectedProviderInstallation := `provider_installation { "filesystem_mirror" { path = "%s" include = ["example.com/hashicorp/azurerm", "example.com/hashicorp/aws"] exclude = ["example.com/*/*", "registry.opentofu.org/*/*", "registry.terraform.io/*/*"] } "network_mirror" { url = "%s" exclude = ["example.com/hashicorp/azurerm", "example.com/*/*", "registry.opentofu.org/*/*", "registry.terraform.io/*/*"] } "filesystem_mirror" { path = "%s" include = ["example.com/*/*", "registry.opentofu.org/*/*", "registry.terraform.io/*/*"] } "direct" { exclude = ["example.com/*/*", "registry.opentofu.org/*/*", "registry.terraform.io/*/*"] } }`
+	expectedProviderInstallation := `provider_installation { "filesystem_mirror" { include = ["example.com/hashicorp/azurerm", "example.com/hashicorp/aws"] exclude = ["example.com/*/*", "registry.opentofu.org/*/*", "registry.terraform.io/*/*"] path = "%s" } "network_mirror" { exclude = ["example.com/hashicorp/azurerm", "example.com/*/*", "registry.opentofu.org/*/*", "registry.terraform.io/*/*"] url = "%s" } "filesystem_mirror" { include = ["example.com/*/*", "registry.opentofu.org/*/*", "registry.terraform.io/*/*"] path = "%s" } "direct" { exclude = ["example.com/*/*", "registry.opentofu.org/*/*", "registry.terraform.io/*/*"] } }`
 	expectedProviderInstallation = fmt.Sprintf(strings.Join(strings.Fields(expectedProviderInstallation), " "), providersFilesystemMirrorPath, networkMirrorURL.String(), providerCacheDir)
 
 	for _, filename := range []string{"app0/.terraformrc", "app1/.terraformrc"} {
diff --git a/test/integration_stacks_test.go b/test/integration_stacks_test.go
index 51d0697b..9c0fa72d 100644
--- a/test/integration_stacks_test.go
+++ b/test/integration_stacks_test.go
@@ -19,24 +19,25 @@ import (
 )
 
 const (
-	testFixtureStacksBasic         = "fixtures/stacks/basic"
-	testFixtureStacksLocals        = "fixtures/stacks/locals"
-	testFixtureStacksRemote        = "fixtures/stacks/remote"
-	testFixtureStacksInputs        = "fixtures/stacks/inputs"
-	testFixtureStacksOutputs       = "fixtures/stacks/outputs"
-	testFixtureStacksUnitValues    = "fixtures/stacks/unit-values"
-	testFixtureStacksLocalsError   = "fixtures/stacks/errors/locals-error"
-	testFixtureStacksUnitEmptyPath = "fixtures/stacks/errors/unit-empty-path"
-	testFixtureStacksEmptyPath     = "fixtures/stacks/errors/stack-empty-path"
-	testFixtureNestedStacks        = "fixtures/stacks/nested"
-	testFixtureStackValues         = "fixtures/stacks/stack-values"
-	testFixtureStackDependencies   = "fixtures/stacks/dependencies"
-	testFixtureStackAbsolutePath   = "fixtures/stacks/absolute-path"
-	testFixtureStackSourceMap      = "fixtures/stacks/source-map"
-	testFixtureNoStack             = "fixtures/stacks/no-stack"
-	testFixtureStackCycles         = "fixtures/stacks/errors/cycles"
-	testFixtureNoStackNoDir        = "fixtures/stacks/no-stack-dir"
-	testFixtureMultipleStacks      = "fixtures/stacks/multiple-stacks"
+	testFixtureStacksBasic                     = "fixtures/stacks/basic"
+	testFixtureStacksLocals                    = "fixtures/stacks/locals"
+	testFixtureStacksRemote                    = "fixtures/stacks/remote"
+	testFixtureStacksInputs                    = "fixtures/stacks/inputs"
+	testFixtureStacksOutputs                   = "fixtures/stacks/outputs"
+	testFixtureStacksUnitValues                = "fixtures/stacks/unit-values"
+	testFixtureStacksLocalsError               = "fixtures/stacks/errors/locals-error"
+	testFixtureStacksUnitEmptyPath             = "fixtures/stacks/errors/unit-empty-path"
+	testFixtureStacksEmptyPath                 = "fixtures/stacks/errors/stack-empty-path"
+	testFixtureStackAbsolutePath               = "fixtures/stacks/errors/absolute-path"
+	testFixtureStackRelativePathOutsideOfStack = "fixtures/stacks/errors/relative-path-outside-of-stack"
+	testFixtureNoStack                         = "fixtures/stacks/no-stack"
+	testFixtureNestedStacks                    = "fixtures/stacks/nested"
+	testFixtureStackValues                     = "fixtures/stacks/stack-values"
+	testFixtureStackDependencies               = "fixtures/stacks/dependencies"
+	testFixtureStackSourceMap                  = "fixtures/stacks/source-map"
+	testFixtureStackCycles                     = "fixtures/stacks/errors/cycles"
+	testFixtureNoStackNoDir                    = "fixtures/stacks/no-stack-dir"
+	testFixtureMultipleStacks                  = "fixtures/stacks/multiple-stacks"
 )
 
 func TestStacksGenerateBasic(t *testing.T) {
@@ -46,7 +47,7 @@ func TestStacksGenerateBasic(t *testing.T) {
 	tmpEnvPath := helpers.CopyEnvironment(t, testFixtureStacksBasic)
 	rootPath := util.JoinPath(tmpEnvPath, testFixtureStacksBasic, "live")
 
-	helpers.RunTerragrunt(t, "terragrunt stack generate --experiment stacks --terragrunt-working-dir "+rootPath)
+	helpers.RunTerragrunt(t, "terragrunt stack generate --experiment stacks --working-dir "+rootPath)
 
 	path := util.JoinPath(rootPath, ".terragrunt-stack")
 	validateStackDir(t, path)
@@ -60,7 +61,7 @@ func TestNestedStacksGenerate(t *testing.T) {
 	gitPath := util.JoinPath(tmpEnvPath, testFixtureNestedStacks)
 	helpers.CreateGitRepo(t, gitPath)
 	rootPath := util.JoinPath(gitPath, "live")
-	helpers.RunTerragrunt(t, "terragrunt stack generate --experiment stacks --terragrunt-working-dir "+rootPath)
+	helpers.RunTerragrunt(t, "terragrunt stack generate --experiment stacks --working-dir "+rootPath)
 
 	path := util.JoinPath(rootPath, ".terragrunt-stack")
 	validateStackDir(t, path)
@@ -74,7 +75,7 @@ func TestStacksGenerateLocals(t *testing.T) {
 	helpers.CreateGitRepo(t, tmpEnvPath)
 	rootPath := util.JoinPath(tmpEnvPath, testFixtureStacksLocals, "live")
 
-	helpers.RunTerragrunt(t, "terragrunt stack generate --experiment stacks --terragrunt-working-dir "+rootPath)
+	helpers.RunTerragrunt(t, "terragrunt stack generate --experiment stacks --working-dir "+rootPath)
 }
 
 func TestStacksGenerateLocalsError(t *testing.T) {
@@ -84,7 +85,7 @@ func TestStacksGenerateLocalsError(t *testing.T) {
 	tmpEnvPath := helpers.CopyEnvironment(t, testFixtureStacksLocalsError)
 	rootPath := util.JoinPath(tmpEnvPath, testFixtureStacksLocalsError)
 
-	_, _, err := helpers.RunTerragruntCommandWithOutput(t, "terragrunt stack generate --experiment stacks --terragrunt-working-dir "+rootPath)
+	_, _, err := helpers.RunTerragruntCommandWithOutput(t, "terragrunt stack generate --experiment stacks --working-dir "+rootPath)
 	require.Error(t, err)
 }
 
@@ -95,7 +96,7 @@ func TestStacksGenerateRemote(t *testing.T) {
 	tmpEnvPath := helpers.CopyEnvironment(t, testFixtureStacksRemote)
 	rootPath := util.JoinPath(tmpEnvPath, testFixtureStacksRemote)
 
-	helpers.RunTerragrunt(t, "terragrunt stack generate --experiment stacks --terragrunt-working-dir "+rootPath)
+	helpers.RunTerragrunt(t, "terragrunt stack generate --experiment stacks --working-dir "+rootPath)
 
 	path := util.JoinPath(rootPath, ".terragrunt-stack")
 	validateStackDir(t, path)
@@ -108,7 +109,7 @@ func TestStacksBasic(t *testing.T) {
 	tmpEnvPath := helpers.CopyEnvironment(t, testFixtureStacksBasic)
 	rootPath := util.JoinPath(tmpEnvPath, testFixtureStacksBasic, "live")
 
-	helpers.RunTerragrunt(t, "terragrunt --experiment stacks stack run apply --terragrunt-non-interactive --terragrunt-working-dir "+rootPath)
+	helpers.RunTerragrunt(t, "terragrunt --experiment stacks stack run apply --non-interactive --working-dir "+rootPath)
 
 	path := util.JoinPath(rootPath, ".terragrunt-stack")
 	validateStackDir(t, path)
@@ -138,7 +139,7 @@ func TestStacksNoGenerate(t *testing.T) {
 	tmpEnvPath := helpers.CopyEnvironment(t, testFixtureStacksBasic)
 	rootPath := util.JoinPath(tmpEnvPath, testFixtureStacksBasic, "live")
 
-	helpers.RunTerragrunt(t, "terragrunt stack generate --experiment stacks --terragrunt-working-dir "+rootPath)
+	helpers.RunTerragrunt(t, "terragrunt stack generate --experiment stacks --working-dir "+rootPath)
 
 	path := util.JoinPath(rootPath, ".terragrunt-stack")
 	validateStackDir(t, path)
@@ -151,7 +152,7 @@ func TestStacksNoGenerate(t *testing.T) {
 		require.NoError(t, err)
 	}
 
-	_, _, err = helpers.RunTerragruntCommandWithOutput(t, "terragrunt --experiment stacks stack run apply --no-stack-generate --terragrunt-non-interactive --terragrunt-working-dir "+rootPath)
+	_, _, err = helpers.RunTerragruntCommandWithOutput(t, "terragrunt --experiment stacks stack run apply --no-stack-generate --non-interactive --working-dir "+rootPath)
 	require.Error(t, err)
 }
 
@@ -162,7 +163,7 @@ func TestStacksInputs(t *testing.T) {
 	tmpEnvPath := helpers.CopyEnvironment(t, testFixtureStacksInputs)
 	rootPath := util.JoinPath(tmpEnvPath, testFixtureStacksInputs, "live")
 
-	helpers.RunTerragrunt(t, "terragrunt stack run plan --experiment stacks --terragrunt-non-interactive --terragrunt-working-dir "+rootPath)
+	helpers.RunTerragrunt(t, "terragrunt stack run plan --experiment stacks --non-interactive --working-dir "+rootPath)
 
 	path := util.JoinPath(rootPath, ".terragrunt-stack")
 	validateStackDir(t, path)
@@ -175,7 +176,7 @@ func TestStacksPlan(t *testing.T) {
 	tmpEnvPath := helpers.CopyEnvironment(t, testFixtureStacksInputs)
 	rootPath := util.JoinPath(tmpEnvPath, testFixtureStacksInputs, "live")
 
-	stdout, _, err := helpers.RunTerragruntCommandWithOutput(t, "terragrunt stack run plan --experiment stacks --terragrunt-non-interactive --terragrunt-working-dir "+rootPath)
+	stdout, _, err := helpers.RunTerragruntCommandWithOutput(t, "terragrunt stack run plan --experiment stacks --non-interactive --working-dir "+rootPath)
 	require.NoError(t, err)
 
 	assert.Contains(t, stdout, "Plan: 1 to add, 0 to change, 0 to destroy")
@@ -189,7 +190,7 @@ func TestStacksApply(t *testing.T) {
 	tmpEnvPath := helpers.CopyEnvironment(t, testFixtureStacksInputs)
 	rootPath := util.JoinPath(tmpEnvPath, testFixtureStacksInputs, "live")
 
-	stdout, _, err := helpers.RunTerragruntCommandWithOutput(t, "terragrunt stack run apply --experiment stacks --terragrunt-non-interactive --terragrunt-working-dir "+rootPath)
+	stdout, _, err := helpers.RunTerragruntCommandWithOutput(t, "terragrunt stack run apply --experiment stacks --non-interactive --working-dir "+rootPath)
 	require.NoError(t, err)
 
 	assert.Contains(t, stdout, "Apply complete! Resources: 1 added, 0 changed, 0 destroyed")
@@ -203,7 +204,7 @@ func TestStacksApplyRemote(t *testing.T) {
 	tmpEnvPath := helpers.CopyEnvironment(t, testFixtureStacksRemote)
 	rootPath := util.JoinPath(tmpEnvPath, testFixtureStacksRemote)
 
-	stdout, stderr, err := helpers.RunTerragruntCommandWithOutput(t, "terragrunt stack run apply --terragrunt-log-level debug --experiment stacks --terragrunt-non-interactive --terragrunt-working-dir "+rootPath)
+	stdout, stderr, err := helpers.RunTerragruntCommandWithOutput(t, "terragrunt stack run apply --log-level debug --experiment stacks --non-interactive --working-dir "+rootPath)
 	require.NoError(t, err)
 
 	assert.Contains(t, stderr, "app1 (git::https://github.com/gruntwork-io/terragrunt.git//test/fixtures/stacks/basic/units/chick?ref=main&depth=1)")
@@ -221,12 +222,12 @@ func TestStacksApplyClean(t *testing.T) {
 	tmpEnvPath := helpers.CopyEnvironment(t, testFixtureStacksInputs)
 	rootPath := util.JoinPath(tmpEnvPath, testFixtureStacksInputs, "live")
 
-	helpers.RunTerragrunt(t, "terragrunt stack run apply --experiment stacks --terragrunt-non-interactive --terragrunt-working-dir "+rootPath)
+	helpers.RunTerragrunt(t, "terragrunt stack run apply --experiment stacks --non-interactive --working-dir "+rootPath)
 	path := util.JoinPath(rootPath, ".terragrunt-stack")
 	// check that path exists
 	assert.DirExists(t, path)
 
-	helpers.RunTerragrunt(t, "terragrunt stack clean --experiment stacks --terragrunt-working-dir "+rootPath)
+	helpers.RunTerragrunt(t, "terragrunt stack clean --experiment stacks --working-dir "+rootPath)
 	// check that path don't exist
 	assert.NoDirExists(t, path)
 }
@@ -238,9 +239,9 @@ func TestStacksDestroy(t *testing.T) {
 	tmpEnvPath := helpers.CopyEnvironment(t, testFixtureStacksInputs)
 	rootPath := util.JoinPath(tmpEnvPath, testFixtureStacksInputs, "live")
 
-	helpers.RunTerragrunt(t, "terragrunt stack run apply --experiment stacks --terragrunt-non-interactive --terragrunt-working-dir "+rootPath)
+	helpers.RunTerragrunt(t, "terragrunt stack run apply --experiment stacks --non-interactive --working-dir "+rootPath)
 
-	stdout, _, err := helpers.RunTerragruntCommandWithOutput(t, "terragrunt stack run destroy --experiment stacks --terragrunt-non-interactive --terragrunt-working-dir "+rootPath)
+	stdout, _, err := helpers.RunTerragruntCommandWithOutput(t, "terragrunt stack run destroy --experiment stacks --non-interactive --working-dir "+rootPath)
 	require.NoError(t, err)
 
 	assert.Contains(t, stdout, "Plan: 0 to add, 0 to change, 1 to destroy")
@@ -254,9 +255,9 @@ func TestStackOutputs(t *testing.T) {
 	tmpEnvPath := helpers.CopyEnvironment(t, testFixtureStacksOutputs)
 	rootPath := util.JoinPath(tmpEnvPath, testFixtureStacksOutputs, "live")
 
-	helpers.RunTerragrunt(t, "terragrunt stack run apply --experiment stacks --terragrunt-non-interactive --terragrunt-working-dir "+rootPath)
+	helpers.RunTerragrunt(t, "terragrunt stack run apply --experiment stacks --non-interactive --working-dir "+rootPath)
 
-	stdout, _, err := helpers.RunTerragruntCommandWithOutput(t, "terragrunt stack output --experiment stacks --terragrunt-non-interactive --terragrunt-working-dir "+rootPath)
+	stdout, _, err := helpers.RunTerragruntCommandWithOutput(t, "terragrunt stack output --experiment stacks --non-interactive --working-dir "+rootPath)
 
 	require.NoError(t, err)
 	assert.Contains(t, stdout, "custom_value2 = \"value2\"")
@@ -277,9 +278,9 @@ func TestStackOutputsIndex(t *testing.T) {
 	tmpEnvPath := helpers.CopyEnvironment(t, testFixtureStacksOutputs)
 	rootPath := util.JoinPath(tmpEnvPath, testFixtureStacksOutputs, "live")
 
-	helpers.RunTerragrunt(t, "terragrunt stack run apply --experiment stacks --terragrunt-non-interactive --terragrunt-working-dir "+rootPath)
+	helpers.RunTerragrunt(t, "terragrunt stack run apply --experiment stacks --non-interactive --working-dir "+rootPath)
 
-	stdout, _, err := helpers.RunTerragruntCommandWithOutput(t, "terragrunt stack output project2_app2 --experiment stacks --terragrunt-non-interactive --terragrunt-working-dir "+rootPath)
+	stdout, _, err := helpers.RunTerragruntCommandWithOutput(t, "terragrunt stack output project2_app2 --experiment stacks --non-interactive --working-dir "+rootPath)
 
 	require.NoError(t, err)
 	assert.NotContains(t, stdout, "filtered_app1 = {")
@@ -299,9 +300,9 @@ func TestStackOutputsJson(t *testing.T) {
 	tmpEnvPath := helpers.CopyEnvironment(t, testFixtureStacksOutputs)
 	rootPath := util.JoinPath(tmpEnvPath, testFixtureStacksOutputs, "live")
 
-	helpers.RunTerragrunt(t, "terragrunt stack run apply --experiment stacks --terragrunt-non-interactive --terragrunt-working-dir "+rootPath)
+	helpers.RunTerragrunt(t, "terragrunt stack run apply --experiment stacks --non-interactive --working-dir "+rootPath)
 
-	stdout, _, err := helpers.RunTerragruntCommandWithOutput(t, "terragrunt stack output --format json --experiment stacks --terragrunt-non-interactive --terragrunt-working-dir "+rootPath)
+	stdout, _, err := helpers.RunTerragruntCommandWithOutput(t, "terragrunt stack output --format json --experiment stacks --non-interactive --working-dir "+rootPath)
 	require.NoError(t, err)
 
 	var result map[string]any
@@ -318,9 +319,9 @@ func TestStackOutputsJsonIndex(t *testing.T) {
 	tmpEnvPath := helpers.CopyEnvironment(t, testFixtureStacksOutputs)
 	rootPath := util.JoinPath(tmpEnvPath, testFixtureStacksOutputs, "live")
 
-	helpers.RunTerragrunt(t, "terragrunt stack run apply --experiment stacks --terragrunt-non-interactive --terragrunt-working-dir "+rootPath)
+	helpers.RunTerragrunt(t, "terragrunt stack run apply --experiment stacks --non-interactive --working-dir "+rootPath)
 
-	stdout, _, err := helpers.RunTerragruntCommandWithOutput(t, "terragrunt stack output project2_app1 --format json --experiment stacks --terragrunt-non-interactive --terragrunt-working-dir "+rootPath)
+	stdout, _, err := helpers.RunTerragruntCommandWithOutput(t, "terragrunt stack output project2_app1 --format json --experiment stacks --non-interactive --working-dir "+rootPath)
 	require.NoError(t, err)
 
 	var result map[string]any
@@ -338,9 +339,9 @@ func TestStackOutputsRawError(t *testing.T) {
 	tmpEnvPath := helpers.CopyEnvironment(t, testFixtureStacksOutputs)
 	rootPath := util.JoinPath(tmpEnvPath, testFixtureStacksOutputs, "live")
 
-	helpers.RunTerragrunt(t, "terragrunt stack run apply --experiment stacks --terragrunt-non-interactive --terragrunt-working-dir "+rootPath)
+	helpers.RunTerragrunt(t, "terragrunt stack run apply --experiment stacks --non-interactive --working-dir "+rootPath)
 
-	_, _, err := helpers.RunTerragruntCommandWithOutput(t, "terragrunt stack output --format raw --experiment stacks --terragrunt-non-interactive --terragrunt-working-dir "+rootPath)
+	_, _, err := helpers.RunTerragruntCommandWithOutput(t, "terragrunt stack output --format raw --experiment stacks --non-interactive --working-dir "+rootPath)
 	require.Error(t, err)
 }
 
@@ -351,9 +352,9 @@ func TestStackOutputsRawIndex(t *testing.T) {
 	tmpEnvPath := helpers.CopyEnvironment(t, testFixtureStacksOutputs)
 	rootPath := util.JoinPath(tmpEnvPath, testFixtureStacksOutputs, "live")
 
-	helpers.RunTerragrunt(t, "terragrunt stack run apply --experiment stacks --terragrunt-non-interactive --terragrunt-working-dir "+rootPath)
+	helpers.RunTerragrunt(t, "terragrunt stack run apply --experiment stacks --non-interactive --working-dir "+rootPath)
 
-	stdout, _, err := helpers.RunTerragruntCommandWithOutput(t, "terragrunt stack output filtered_app1.custom_value1 --format raw --experiment stacks --terragrunt-non-interactive --terragrunt-working-dir "+rootPath)
+	stdout, _, err := helpers.RunTerragruntCommandWithOutput(t, "terragrunt stack output filtered_app1.custom_value1 --format raw --experiment stacks --non-interactive --working-dir "+rootPath)
 	require.NoError(t, err)
 
 	assert.Contains(t, stdout, "value1")
@@ -368,9 +369,9 @@ func TestStackOutputsRawFlag(t *testing.T) {
 	tmpEnvPath := helpers.CopyEnvironment(t, testFixtureStacksOutputs)
 	rootPath := util.JoinPath(tmpEnvPath, testFixtureStacksOutputs, "live")
 
-	helpers.RunTerragrunt(t, "terragrunt stack run apply --experiment stacks --terragrunt-non-interactive --terragrunt-working-dir "+rootPath)
+	helpers.RunTerragrunt(t, "terragrunt stack run apply --experiment stacks --non-interactive --working-dir "+rootPath)
 
-	stdout, _, err := helpers.RunTerragruntCommandWithOutput(t, "terragrunt stack output -raw filtered_app2.data --experiment stacks --terragrunt-non-interactive --terragrunt-working-dir "+rootPath)
+	stdout, _, err := helpers.RunTerragruntCommandWithOutput(t, "terragrunt stack output -raw filtered_app2.data --experiment stacks --non-interactive --working-dir "+rootPath)
 	require.NoError(t, err)
 
 	assert.Contains(t, stdout, "app2")
@@ -385,9 +386,9 @@ func TestStackOutputsJsonFlag(t *testing.T) {
 	tmpEnvPath := helpers.CopyEnvironment(t, testFixtureStacksOutputs)
 	rootPath := util.JoinPath(tmpEnvPath, testFixtureStacksOutputs, "live")
 
-	helpers.RunTerragrunt(t, "terragrunt stack run apply --experiment stacks --terragrunt-non-interactive --terragrunt-working-dir "+rootPath)
+	helpers.RunTerragrunt(t, "terragrunt stack run apply --experiment stacks --non-interactive --working-dir "+rootPath)
 
-	stdout, _, err := helpers.RunTerragruntCommandWithOutput(t, "terragrunt stack output -json --experiment stacks --terragrunt-non-interactive --terragrunt-working-dir "+rootPath)
+	stdout, _, err := helpers.RunTerragruntCommandWithOutput(t, "terragrunt stack output -json --experiment stacks --non-interactive --working-dir "+rootPath)
 	require.NoError(t, err)
 
 	var result map[string]any
@@ -404,7 +405,7 @@ func TestStacksUnitValues(t *testing.T) {
 	tmpEnvPath := helpers.CopyEnvironment(t, testFixtureStacksUnitValues)
 	rootPath := util.JoinPath(tmpEnvPath, testFixtureStacksUnitValues, "live")
 
-	stdout, _, err := helpers.RunTerragruntCommandWithOutput(t, "terragrunt stack run apply --experiment stacks --terragrunt-non-interactive --terragrunt-working-dir "+rootPath)
+	stdout, _, err := helpers.RunTerragruntCommandWithOutput(t, "terragrunt stack run apply --experiment stacks --non-interactive --working-dir "+rootPath)
 	require.NoError(t, err)
 
 	assert.Contains(t, stdout, "deployment = \"app1\"")
@@ -421,11 +422,11 @@ func TestStacksUnitValuesRunInApp1(t *testing.T) {
 	tmpEnvPath := helpers.CopyEnvironment(t, testFixtureStacksUnitValues)
 	rootPath := util.JoinPath(tmpEnvPath, testFixtureStacksUnitValues, "live")
 
-	helpers.RunTerragrunt(t, "terragrunt stack run apply --experiment stacks --terragrunt-non-interactive --terragrunt-working-dir "+rootPath)
+	helpers.RunTerragrunt(t, "terragrunt stack run apply --experiment stacks --non-interactive --working-dir "+rootPath)
 
 	// run apply in generated app1 directory
 	app1Path := util.JoinPath(rootPath, ".terragrunt-stack", "app1")
-	helpers.RunTerragrunt(t, "terragrunt apply --experiment stacks --terragrunt-non-interactive --terragrunt-working-dir "+app1Path)
+	helpers.RunTerragrunt(t, "terragrunt apply --experiment stacks --non-interactive --working-dir "+app1Path)
 
 	// Verify the expected outcomes
 	valuesPath := filepath.Join(app1Path, "terragrunt.values.hcl")
@@ -444,9 +445,9 @@ func TestStacksUnitValuesOutput(t *testing.T) {
 	tmpEnvPath := helpers.CopyEnvironment(t, testFixtureStacksUnitValues)
 	rootPath := util.JoinPath(tmpEnvPath, testFixtureStacksUnitValues, "live")
 
-	helpers.RunTerragrunt(t, "terragrunt stack run apply --experiment stacks --terragrunt-non-interactive --terragrunt-working-dir "+rootPath)
+	helpers.RunTerragrunt(t, "terragrunt stack run apply --experiment stacks --non-interactive --working-dir "+rootPath)
 
-	stdout, _, err := helpers.RunTerragruntCommandWithOutput(t, "terragrunt stack output -json --experiment stacks --terragrunt-non-interactive --terragrunt-working-dir "+rootPath)
+	stdout, _, err := helpers.RunTerragruntCommandWithOutput(t, "terragrunt stack output -json --experiment stacks --non-interactive --working-dir "+rootPath)
 	require.NoError(t, err)
 
 	var result map[string]any
@@ -466,7 +467,7 @@ func TestStacksUnitEmptyPathError(t *testing.T) {
 	tmpEnvPath := helpers.CopyEnvironment(t, testFixtureStacksUnitEmptyPath)
 	rootPath := util.JoinPath(tmpEnvPath, testFixtureStacksUnitEmptyPath, "live")
 
-	_, _, err := helpers.RunTerragruntCommandWithOutput(t, "terragrunt stack generate --experiment stacks --terragrunt-working-dir "+rootPath)
+	_, _, err := helpers.RunTerragruntCommandWithOutput(t, "terragrunt stack generate --experiment stacks --working-dir "+rootPath)
 	require.Error(t, err)
 
 	message := err.Error()
@@ -483,7 +484,7 @@ func TestStackStackEmptyPathError(t *testing.T) {
 	tmpEnvPath := helpers.CopyEnvironment(t, testFixtureStacksEmptyPath)
 	rootPath := util.JoinPath(tmpEnvPath, testFixtureStacksEmptyPath)
 
-	_, _, err := helpers.RunTerragruntCommandWithOutput(t, "terragrunt stack generate --experiment stacks --terragrunt-working-dir "+rootPath)
+	_, _, err := helpers.RunTerragruntCommandWithOutput(t, "terragrunt stack generate --experiment stacks --working-dir "+rootPath)
 	require.Error(t, err)
 
 	message := err.Error()
@@ -498,9 +499,9 @@ func TestNestedStackOutput(t *testing.T) {
 	gitPath := util.JoinPath(tmpEnvPath, testFixtureNestedStacks)
 	helpers.CreateGitRepo(t, gitPath)
 	rootPath := util.JoinPath(gitPath, "live")
-	helpers.RunTerragrunt(t, "terragrunt stack run apply --experiment stacks --terragrunt-non-interactive --terragrunt-working-dir "+rootPath)
+	helpers.RunTerragrunt(t, "terragrunt stack run apply --experiment stacks --non-interactive --working-dir "+rootPath)
 
-	stdout, _, err := helpers.RunTerragruntCommandWithOutput(t, "terragrunt stack output -json --experiment stacks --terragrunt-non-interactive --terragrunt-working-dir "+rootPath)
+	stdout, _, err := helpers.RunTerragruntCommandWithOutput(t, "terragrunt stack output -json --experiment stacks --non-interactive --working-dir "+rootPath)
 	require.NoError(t, err)
 
 	var result map[string]any
@@ -527,7 +528,7 @@ func TestNestedStacksApply(t *testing.T) {
 	gitPath := util.JoinPath(tmpEnvPath, testFixtureNestedStacks)
 	helpers.CreateGitRepo(t, gitPath)
 	rootPath := util.JoinPath(gitPath, "live")
-	stdout, _, err := helpers.RunTerragruntCommandWithOutput(t, "terragrunt stack run apply --experiment stacks --terragrunt-non-interactive --terragrunt-working-dir "+rootPath)
+	stdout, _, err := helpers.RunTerragruntCommandWithOutput(t, "terragrunt stack run apply --experiment stacks --non-interactive --working-dir "+rootPath)
 	require.NoError(t, err)
 
 	assert.Contains(t, stdout, "data = \"web dev-web 1.0.0\"")
@@ -547,7 +548,7 @@ func TestStackValuesGeneration(t *testing.T) {
 	gitPath := util.JoinPath(tmpEnvPath, testFixtureStackValues)
 	helpers.CreateGitRepo(t, gitPath)
 	rootPath := util.JoinPath(gitPath, "live")
-	helpers.RunTerragrunt(t, "terragrunt stack generate --experiment stacks --terragrunt-working-dir "+rootPath)
+	helpers.RunTerragrunt(t, "terragrunt stack generate --experiment stacks --working-dir "+rootPath)
 
 	path := util.JoinPath(rootPath, ".terragrunt-stack")
 	validateStackDir(t, path)
@@ -565,7 +566,7 @@ func TestStackValuesApply(t *testing.T) {
 	gitPath := util.JoinPath(tmpEnvPath, testFixtureStackValues)
 	helpers.CreateGitRepo(t, gitPath)
 	rootPath := util.JoinPath(gitPath, "live")
-	stdout, _, err := helpers.RunTerragruntCommandWithOutput(t, "terragrunt stack run apply --experiment stacks --terragrunt-non-interactive --terragrunt-working-dir "+rootPath)
+	stdout, _, err := helpers.RunTerragruntCommandWithOutput(t, "terragrunt stack run apply --experiment stacks --non-interactive --working-dir "+rootPath)
 	require.NoError(t, err)
 
 	assert.Contains(t, stdout, "project = \"dev-project\"")
@@ -594,9 +595,9 @@ func TestStackValuesOutput(t *testing.T) {
 	gitPath := util.JoinPath(tmpEnvPath, testFixtureStackValues)
 	helpers.CreateGitRepo(t, gitPath)
 	rootPath := util.JoinPath(gitPath, "live")
-	helpers.RunTerragrunt(t, "terragrunt stack run apply --experiment stacks --terragrunt-non-interactive --terragrunt-working-dir "+rootPath)
+	helpers.RunTerragrunt(t, "terragrunt stack run apply --experiment stacks --non-interactive --working-dir "+rootPath)
 
-	stdout, _, err := helpers.RunTerragruntCommandWithOutput(t, "terragrunt stack output -json --experiment stacks --terragrunt-non-interactive --terragrunt-working-dir "+rootPath)
+	stdout, _, err := helpers.RunTerragruntCommandWithOutput(t, "terragrunt stack output -json --experiment stacks --non-interactive --working-dir "+rootPath)
 	require.NoError(t, err)
 
 	var result map[string]any
@@ -619,7 +620,7 @@ func TestStacksGenerateParallelism(t *testing.T) {
 	tmpEnvPath := helpers.CopyEnvironment(t, testFixtureStackDependencies)
 	rootPath := util.JoinPath(tmpEnvPath, testFixtureStackDependencies, "live")
 
-	helpers.RunTerragrunt(t, "terragrunt stack generate --experiment stacks --parallelism 10 --terragrunt-working-dir "+rootPath)
+	helpers.RunTerragrunt(t, "terragrunt stack generate --experiment stacks --parallelism 10 --working-dir "+rootPath)
 
 	path := util.JoinPath(rootPath, ".terragrunt-stack")
 	validateStackDir(t, path)
@@ -632,7 +633,7 @@ func TestStackApplyWithDependency(t *testing.T) {
 	tmpEnvPath := helpers.CopyEnvironment(t, testFixtureStackDependencies)
 	rootPath := util.JoinPath(tmpEnvPath, testFixtureStackDependencies, "live")
 
-	_, stderr, err := helpers.RunTerragruntCommandWithOutput(t, "terragrunt stack run apply --experiment stacks --terragrunt-non-interactive --terragrunt-working-dir "+rootPath)
+	_, stderr, err := helpers.RunTerragruntCommandWithOutput(t, "terragrunt stack run apply --experiment stacks --non-interactive --working-dir "+rootPath)
 	require.NoError(t, err)
 
 	assert.Contains(t, stderr, "Module ./.terragrunt-stack/app-with-dependency")
@@ -649,7 +650,7 @@ func TestStackApplyWithDependencyParallelism(t *testing.T) {
 	tmpEnvPath := helpers.CopyEnvironment(t, testFixtureStackDependencies)
 	rootPath := util.JoinPath(tmpEnvPath, testFixtureStackDependencies, "live")
 
-	_, stderr, err := helpers.RunTerragruntCommandWithOutput(t, "terragrunt stack run apply --parallelism 10 --experiment stacks --terragrunt-non-interactive --terragrunt-working-dir "+rootPath)
+	_, stderr, err := helpers.RunTerragruntCommandWithOutput(t, "terragrunt stack run apply --parallelism 10 --experiment stacks --non-interactive --working-dir "+rootPath)
 	require.NoError(t, err)
 
 	assert.Contains(t, stderr, "Module ./.terragrunt-stack/app-with-dependency")
@@ -666,7 +667,7 @@ func TestStackApplyWithDependencyReducedParallelism(t *testing.T) {
 	tmpEnvPath := helpers.CopyEnvironment(t, testFixtureStackDependencies)
 	rootPath := util.JoinPath(tmpEnvPath, testFixtureStackDependencies, "live")
 
-	_, stderr, err := helpers.RunTerragruntCommandWithOutput(t, "terragrunt stack run apply --parallelism 1 --experiment stacks --terragrunt-non-interactive --terragrunt-working-dir "+rootPath)
+	_, stderr, err := helpers.RunTerragruntCommandWithOutput(t, "terragrunt stack run apply --parallelism 1 --experiment stacks --non-interactive --working-dir "+rootPath)
 	require.NoError(t, err)
 
 	assert.Contains(t, stderr, "Module ./.terragrunt-stack/app-with-dependency")
@@ -683,9 +684,9 @@ func TestStackApplyDestroyWithDependency(t *testing.T) {
 	tmpEnvPath := helpers.CopyEnvironment(t, testFixtureStackDependencies)
 	rootPath := util.JoinPath(tmpEnvPath, testFixtureStackDependencies, "live")
 
-	helpers.RunTerragrunt(t, "terragrunt stack run apply --experiment stacks --terragrunt-non-interactive --terragrunt-working-dir "+rootPath)
+	helpers.RunTerragrunt(t, "terragrunt stack run apply --experiment stacks --non-interactive --working-dir "+rootPath)
 
-	_, stderr, err := helpers.RunTerragruntCommandWithOutput(t, "terragrunt stack run destroy --experiment stacks --terragrunt-non-interactive --terragrunt-working-dir "+rootPath)
+	_, stderr, err := helpers.RunTerragruntCommandWithOutput(t, "terragrunt stack run destroy --experiment stacks --non-interactive --working-dir "+rootPath)
 	require.NoError(t, err)
 	assert.Contains(t, stderr, "Module ./.terragrunt-stack/app-with-dependency")
 
@@ -701,9 +702,9 @@ func TestStackOutputWithDependency(t *testing.T) {
 	tmpEnvPath := helpers.CopyEnvironment(t, testFixtureStackDependencies)
 	rootPath := util.JoinPath(tmpEnvPath, testFixtureStackDependencies, "live")
 
-	helpers.RunTerragrunt(t, "terragrunt stack run apply --experiment stacks --terragrunt-non-interactive --terragrunt-working-dir "+rootPath)
+	helpers.RunTerragrunt(t, "terragrunt stack run apply --experiment stacks --non-interactive --working-dir "+rootPath)
 
-	stdout, _, err := helpers.RunTerragruntCommandWithOutput(t, "terragrunt stack output -json --experiment stacks --terragrunt-non-interactive --terragrunt-working-dir "+rootPath)
+	stdout, _, err := helpers.RunTerragruntCommandWithOutput(t, "terragrunt stack output -json --experiment stacks --non-interactive --working-dir "+rootPath)
 	require.NoError(t, err)
 
 	var result map[string]any
@@ -733,9 +734,9 @@ func TestStackApplyStrictInclude(t *testing.T) {
 	tmpEnvPath := helpers.CopyEnvironment(t, testFixtureStackDependencies)
 	rootPath := util.JoinPath(tmpEnvPath, testFixtureStackDependencies, "live")
 
-	helpers.RunTerragrunt(t, "terragrunt stack generate --experiment stacks --terragrunt-non-interactive --terragrunt-working-dir "+rootPath)
+	helpers.RunTerragrunt(t, "terragrunt stack generate --experiment stacks --non-interactive --working-dir "+rootPath)
 
-	_, stderr, err := helpers.RunTerragruntCommandWithOutput(t, "terragrunt --experiment stacks stack run apply --queue-strict-include --queue-include-dir=./.terragrunt-stack/app1 --terragrunt-non-interactive --terragrunt-working-dir "+rootPath)
+	_, stderr, err := helpers.RunTerragruntCommandWithOutput(t, "terragrunt --experiment stacks stack run apply --queue-strict-include --queue-include-dir=./.terragrunt-stack/app1 --non-interactive --working-dir "+rootPath)
 	require.NoError(t, err)
 
 	assert.Contains(t, stderr, "Module ./.terragrunt-stack/app1")
@@ -770,7 +771,7 @@ func TestStacksSourceMap(t *testing.T) {
 	rootPath := util.JoinPath(tmpEnvPath, testFixtureStacksRemote)
 
 	// generate path with replacement of local source with local path
-	_, stderr, err := helpers.RunTerragruntCommandWithOutput(t, "terragrunt stack generate --experiment stacks --source-map git::https://github.com/gruntwork-io/terragrunt.git="+localTmpEnvPath+" --terragrunt-working-dir "+rootPath)
+	_, stderr, err := helpers.RunTerragruntCommandWithOutput(t, "terragrunt stack generate --experiment stacks --source-map git::https://github.com/gruntwork-io/terragrunt.git="+localTmpEnvPath+" --working-dir "+rootPath)
 	require.NoError(t, err)
 
 	assert.Contains(t, stderr, "Processing unit app1")
@@ -779,7 +780,7 @@ func TestStacksSourceMap(t *testing.T) {
 	path := util.JoinPath(rootPath, ".terragrunt-stack")
 	validateStackDir(t, path)
 
-	_, stderr, err = helpers.RunTerragruntCommandWithOutput(t, "terragrunt stack run apply --terragrunt-log-level debug --experiment stacks --source-map git::https://github.com/gruntwork-io/terragrunt.git="+localTmpEnvPath+" --terragrunt-non-interactive --terragrunt-working-dir "+rootPath)
+	_, stderr, err = helpers.RunTerragruntCommandWithOutput(t, "terragrunt stack run apply --log-level debug --experiment stacks --source-map git::https://github.com/gruntwork-io/terragrunt.git="+localTmpEnvPath+" --non-interactive --working-dir "+rootPath)
 	require.NoError(t, err)
 
 	// validate that the source map was used to replace the source
@@ -797,13 +798,13 @@ func TestStacksSourceMapModule(t *testing.T) {
 	tmpEnvPath := helpers.CopyEnvironment(t, testFixtureStackSourceMap)
 	rootPath := util.JoinPath(tmpEnvPath, testFixtureStackSourceMap, "live")
 
-	_, stderr, err := helpers.RunTerragruntCommandWithOutput(t, "terragrunt stack generate --experiment stacks --source-map git::https://git-host.com/not-existing-repo.git="+tmpEnvPath+" --terragrunt-log-level debug --terragrunt-working-dir "+rootPath)
+	_, stderr, err := helpers.RunTerragruntCommandWithOutput(t, "terragrunt stack generate --experiment stacks --source-map git::https://git-host.com/not-existing-repo.git="+tmpEnvPath+" --log-level debug --working-dir "+rootPath)
 	require.NoError(t, err)
 	assert.NotContains(t, stderr, "git-host.com/not-existing-repo.git")
 	path := util.JoinPath(rootPath, ".terragrunt-stack")
 	validateStackDir(t, path)
 
-	_, stderr, err = helpers.RunTerragruntCommandWithOutput(t, "terragrunt stack run apply --terragrunt-log-level debug --experiment stacks --source-map git::https://git-host.com/not-existing-repo.git="+tmpEnvPath+"  --terragrunt-non-interactive --terragrunt-working-dir "+rootPath)
+	_, stderr, err = helpers.RunTerragruntCommandWithOutput(t, "terragrunt stack run apply --log-level debug --experiment stacks --source-map git::https://git-host.com/not-existing-repo.git="+tmpEnvPath+"  --non-interactive --working-dir "+rootPath)
 	require.NoError(t, err)
 
 	assert.NotContains(t, stderr, "git-host.com/not-existing-repo.git")
@@ -811,30 +812,28 @@ func TestStacksSourceMapModule(t *testing.T) {
 	assert.Contains(t, stderr, "Module ./.terragrunt-stack/app2")
 }
 
-func TestStacksGenerateAbsolutePath(t *testing.T) {
+func TestStacksGenerateAbsolutePathError(t *testing.T) {
 	t.Parallel()
 
 	helpers.CleanupTerraformFolder(t, testFixtureStackAbsolutePath)
 	tmpEnvPath := helpers.CopyEnvironment(t, testFixtureStackAbsolutePath)
 	rootPath := util.JoinPath(tmpEnvPath, testFixtureStackAbsolutePath, "live")
 	helpers.CreateGitRepo(t, rootPath)
-	helpers.RunTerragrunt(t, "terragrunt stack generate --terragrunt-log-level debug --experiment stacks --terragrunt-working-dir "+rootPath)
+	_, _, err := helpers.RunTerragruntCommandWithOutput(t, "terragrunt stack generate --log-level debug --experiment stacks --working-dir "+rootPath)
 
-	path := util.JoinPath(rootPath, ".terragrunt-stack")
-	validateStackDir(t, path)
-
-	// check that apps directories are generated
-	app3 := util.JoinPath(rootPath, ".terragrunt-stack", "app3")
-	assert.DirExists(t, app3)
+	require.Error(t, err)
+}
 
-	app1 := util.JoinPath(rootPath, "app1")
-	assert.DirExists(t, app1)
+func TestStacksGenerateRelativePathError(t *testing.T) {
+	t.Parallel()
 
-	app2 := util.JoinPath(rootPath, "app2")
-	assert.DirExists(t, app2)
+	helpers.CleanupTerraformFolder(t, testFixtureStackRelativePathOutsideOfStack)
+	tmpEnvPath := helpers.CopyEnvironment(t, testFixtureStackRelativePathOutsideOfStack)
+	rootPath := util.JoinPath(tmpEnvPath, testFixtureStackRelativePathOutsideOfStack, "live")
+	helpers.CreateGitRepo(t, rootPath)
+	_, _, err := helpers.RunTerragruntCommandWithOutput(t, "terragrunt stack generate --log-level debug --experiment stacks --working-dir "+rootPath)
 
-	app1 = util.JoinPath(rootPath, ".terragrunt-stack", "app1")
-	assert.NoDirExists(t, app1)
+	require.Error(t, err)
 }
 
 func TestStacksGenerateNoStack(t *testing.T) {
@@ -846,7 +845,7 @@ func TestStacksGenerateNoStack(t *testing.T) {
 	helpers.CreateGitRepo(t, gitPath)
 	rootPath := util.JoinPath(gitPath, "live")
 
-	helpers.RunTerragrunt(t, "terragrunt stack generate --experiment stacks --terragrunt-working-dir "+rootPath)
+	helpers.RunTerragrunt(t, "terragrunt stack generate --experiment stacks --working-dir "+rootPath)
 
 	validateNoStackDirs(t, rootPath)
 }
@@ -860,7 +859,7 @@ func TestStacksApplyNoStack(t *testing.T) {
 	helpers.CreateGitRepo(t, gitPath)
 	rootPath := util.JoinPath(gitPath, "live")
 
-	helpers.RunTerragrunt(t, "terragrunt stack run apply --terragrunt-log-level debug --experiment stacks --terragrunt-non-interactive --terragrunt-working-dir "+rootPath)
+	helpers.RunTerragrunt(t, "terragrunt stack run apply --log-level debug --experiment stacks --non-interactive --working-dir "+rootPath)
 
 	validateNoStackDirs(t, rootPath)
 }
@@ -874,7 +873,7 @@ func TestStacksCyclesErrors(t *testing.T) {
 	helpers.CreateGitRepo(t, gitPath)
 	rootPath := util.JoinPath(gitPath, "live")
 
-	_, _, err := helpers.RunTerragruntCommandWithOutput(t, "terragrunt stack generate --experiment stacks --terragrunt-working-dir "+rootPath)
+	_, _, err := helpers.RunTerragruntCommandWithOutput(t, "terragrunt stack generate --experiment stacks --working-dir "+rootPath)
 	require.Error(t, err)
 	assert.Contains(t, err.Error(), "Cycle detected")
 }
@@ -886,7 +885,7 @@ func TestStacksNoStackDirNoTerragruntStackDirectoryCreated(t *testing.T) {
 	tmpEnvPath := helpers.CopyEnvironment(t, testFixtureNoStackNoDir)
 	rootPath := util.JoinPath(tmpEnvPath, testFixtureNoStackNoDir, "live")
 
-	helpers.RunTerragrunt(t, "terragrunt stack generate --experiment stacks --terragrunt-working-dir "+rootPath)
+	helpers.RunTerragrunt(t, "terragrunt stack generate --experiment stacks --working-dir "+rootPath)
 
 	path := util.JoinPath(rootPath, ".terragrunt-stack")
 	// validate that the stack directory is not created
@@ -900,7 +899,7 @@ func TestStacksGenerateMultipleStacks(t *testing.T) {
 	tmpEnvPath := helpers.CopyEnvironment(t, testFixtureMultipleStacks)
 	rootPath := util.JoinPath(tmpEnvPath, testFixtureMultipleStacks)
 
-	helpers.RunTerragrunt(t, "terragrunt stack generate --experiment stacks --terragrunt-working-dir "+rootPath)
+	helpers.RunTerragrunt(t, "terragrunt stack generate --experiment stacks --working-dir "+rootPath)
 
 	devStack := util.JoinPath(rootPath, "dev", ".terragrunt-stack")
 	validateStackDir(t, devStack)
diff --git a/test/integration_strict_test.go b/test/integration_strict_test.go
index 1d562481..b7891960 100644
--- a/test/integration_strict_test.go
+++ b/test/integration_strict_test.go
@@ -18,11 +18,11 @@ func TestStrictMode(t *testing.T) {
 	helpers.CleanupTerraformFolder(t, testFixtureEmptyState)
 
 	tc := []struct {
+		expectedError  error
 		name           string
+		expectedStderr string
 		controls       []string
 		strictMode     bool
-		expectedStderr string
-		expectedError  error
 	}{
 		{
 			name:           "plan-all",
@@ -83,11 +83,11 @@ func TestRootTerragruntHCLStrictMode(t *testing.T) {
 	helpers.CleanupTerraformFolder(t, testFixtureFindParentWithDeprecatedRoot)
 
 	tc := []struct {
+		expectedError  error
 		name           string
+		expectedStderr string
 		controls       []string
 		strictMode     bool
-		expectedStderr string
-		expectedError  error
 	}{
 		{
 			name:           "root terragrunt.hcl",
diff --git a/test/integration_test.go b/test/integration_test.go
index b355260d..a2b87ec7 100644
--- a/test/integration_test.go
+++ b/test/integration_test.go
@@ -124,16 +124,16 @@ func TestCLIFlagHints(t *testing.T) {
 	t.Parallel()
 
 	testCases := []struct {
-		args          string
 		expectedError error
+		args          string
 	}{
 		{
-			"-raw init",
-			flags.NewGlobalFlagHintError("raw", "stack output", "raw"),
+			expectedError: flags.NewGlobalFlagHintError("raw", "stack output", "raw"),
+			args:          "-raw init",
 		},
 		{
-			"run --no-include-root",
-			flags.NewCommandFlagHintError("run", "no-include-root", "catalog", "no-include-root"),
+			expectedError: flags.NewCommandFlagHintError("run", "no-include-root", "catalog", "no-include-root"),
+			args:          "run --no-include-root",
 		},
 	}
 
@@ -156,19 +156,18 @@ func TestExecCommand(t *testing.T) {
 	t.Parallel()
 
 	testCases := []struct {
-		args       []string
 		scriptPath string
 		runInDir   string
+		args       []string
 	}{
 		{
-			nil,
-			"./script.sh arg1 arg2",
-			"",
+			scriptPath: "./script.sh arg1 arg2",
+			runInDir:   "",
 		},
 		{
-			[]string{"--in-download-dir"},
-			"./script.sh arg1 arg2",
-			".terragrunt-cache",
+			args:       []string{"--in-download-dir"},
+			scriptPath: "./script.sh arg1 arg2",
+			runInDir:   ".terragrunt-cache",
 		},
 	}
 
@@ -283,94 +282,84 @@ func TestLogCustomFormatOutput(t *testing.T) {
 	)
 
 	testCases := []struct {
+		expectedErr        error
 		logCustomFormat    string
 		expectedStdOutRegs []*regexp.Regexp
 		expectedStdErrRegs []*regexp.Regexp
-		expectedErr        error
 	}{
 		{
-			"%time %level %prefix %msg",
-			[]*regexp.Regexp{},
-			[]*regexp.Regexp{
+			logCustomFormat:    "%time %level %prefix %msg",
+			expectedStdOutRegs: []*regexp.Regexp{},
+			expectedStdErrRegs: []*regexp.Regexp{
 				regexp.MustCompile(`\d{2}:\d{2}:\d{2}\.\d{3} debug ` + absPathReg + regexp.QuoteMeta(" Terragrunt Version:")),
 				regexp.MustCompile(`\d{2}:\d{2}:\d{2}\.\d{3} debug ` + absPathReg + `/dep Module ` + absPathReg + `/dep must wait for 0 dependencies to finish`),
 				regexp.MustCompile(`\d{2}:\d{2}:\d{2}\.\d{3} debug ` + absPathReg + `/app Module ` + absPathReg + `/app must wait for 1 dependencies to finish`),
 			},
-			nil,
 		},
 		{
-			"%interval %level(case=upper) %prefix(path=short-relative,prefix='[',suffix='] ')%msg(path=relative)",
-			[]*regexp.Regexp{},
-			[]*regexp.Regexp{
+			logCustomFormat:    "%interval %level(case=upper) %prefix(path=short-relative,prefix='[',suffix='] ')%msg(path=relative)",
+			expectedStdOutRegs: []*regexp.Regexp{},
+			expectedStdErrRegs: []*regexp.Regexp{
 				regexp.MustCompile(`\d{4}` + regexp.QuoteMeta(" DEBUG Terragrunt Version:")),
 				regexp.MustCompile(`\d{4}` + regexp.QuoteMeta(" DEBUG [dep] Module ./dep must wait for 0 dependencies to finish")),
 				regexp.MustCompile(`\d{4}` + regexp.QuoteMeta(" DEBUG [app] Module ./app must wait for 1 dependencies to finish")),
 			},
-			nil,
 		},
 		{
-			"%interval%(content=' plain-text ')%level(case=upper,width=6) %prefix(path=short-relative,suffix=' ')%tf-path(suffix=' ')%tf-command-args(suffix=': ')%msg(path=relative)",
-			[]*regexp.Regexp{
+			logCustomFormat: "%interval%(content=' plain-text ')%level(case=upper,width=6) %prefix(path=short-relative,suffix=' ')%tf-path(suffix=' ')%tf-command-args(suffix=': ')%msg(path=relative)",
+			expectedStdOutRegs: []*regexp.Regexp{
 				regexp.MustCompile(`\d{4}` + regexp.QuoteMeta(" plain-text STDOUT dep "+wrappedBinary()+" init -input=false -no-color: Initializing the backend...")),
 				regexp.MustCompile(`\d{4}` + regexp.QuoteMeta(" plain-text STDOUT app "+wrappedBinary()+" init -input=false -no-color: Initializing the backend...")),
 			},
-			[]*regexp.Regexp{
+			expectedStdErrRegs: []*regexp.Regexp{
 				regexp.MustCompile(`\d{4}` + regexp.QuoteMeta(" plain-text DEBUG  Terragrunt Version:")),
 			},
-			nil,
 		},
 		{
-			"%interval%(content=' plain-text ')%level(case=upper,width=6) %prefix(path=short-relative,suffix=' ')%tf-path(suffix=' ')%tf-command(suffix=': ')%msg(path=relative)",
-			[]*regexp.Regexp{
+			logCustomFormat: "%interval%(content=' plain-text ')%level(case=upper,width=6) %prefix(path=short-relative,suffix=' ')%tf-path(suffix=' ')%tf-command(suffix=': ')%msg(path=relative)",
+			expectedStdOutRegs: []*regexp.Regexp{
 				regexp.MustCompile(`\d{4}` + regexp.QuoteMeta(" plain-text STDOUT dep "+wrappedBinary()+" init: Initializing the backend...")),
 				regexp.MustCompile(`\d{4}` + regexp.QuoteMeta(" plain-text STDOUT app "+wrappedBinary()+" init: Initializing the backend...")),
 			},
-			[]*regexp.Regexp{
+			expectedStdErrRegs: []*regexp.Regexp{
 				regexp.MustCompile(`\d{4}` + regexp.QuoteMeta(" plain-text DEBUG  Terragrunt Version:")),
 			},
-			nil,
 		},
 		{
-			"%interval%(content=' plain-text ')%level(case=upper,width=6) %prefix(path=short-relative,suffix=' ')%tf-path(suffix=' ')%tf-command()-args %msg(path=relative)",
-			[]*regexp.Regexp{
+			logCustomFormat: "%interval%(content=' plain-text ')%level(case=upper,width=6) %prefix(path=short-relative,suffix=' ')%tf-path(suffix=' ')%tf-command()-args %msg(path=relative)",
+			expectedStdOutRegs: []*regexp.Regexp{
 				regexp.MustCompile(`\d{4}` + regexp.QuoteMeta(" plain-text STDOUT dep "+wrappedBinary()+" init-args Initializing the backend...")),
 				regexp.MustCompile(`\d{4}` + regexp.QuoteMeta(" plain-text STDOUT app "+wrappedBinary()+" init-args Initializing the backend...")),
 			},
-			[]*regexp.Regexp{
+			expectedStdErrRegs: []*regexp.Regexp{
 				regexp.MustCompile(`\d{4}` + regexp.QuoteMeta(" plain-text DEBUG  -args Terragrunt Version:")),
 			},
-			nil,
 		},
 		{
-			"%interval%(content=' plain-text ')%level(case=upper,width=6) %prefix(path=short-relative,suffix=' ')%tf-path(suffix=' ')%tf-command()-args % aaa %msg(path=relative) %%bbb % ccc",
-			[]*regexp.Regexp{
+			logCustomFormat: "%interval%(content=' plain-text ')%level(case=upper,width=6) %prefix(path=short-relative,suffix=' ')%tf-path(suffix=' ')%tf-command()-args % aaa %msg(path=relative) %%bbb % ccc",
+			expectedStdOutRegs: []*regexp.Regexp{
 				regexp.MustCompile(`\d{4}` + regexp.QuoteMeta(" plain-text STDOUT dep "+wrappedBinary()+" init-args % aaa Initializing the backend... %bbb % ccc")),
 				regexp.MustCompile(`\d{4}` + regexp.QuoteMeta(" plain-text STDOUT app "+wrappedBinary()+" init-args % aaa Initializing the backend... %bbb % ccc")),
 			},
-			[]*regexp.Regexp{
+			expectedStdErrRegs: []*regexp.Regexp{
 				regexp.MustCompile(`\d{4}` + regexp.QuoteMeta(" plain-text DEBUG  -args % aaa Terragrunt Version:")),
 			},
-			nil,
 		},
 		{
-			"%time(color=green) %level %wrong",
-			nil, nil,
-			errors.Errorf(`invalid value "\"%%time(color=green) %%level %%wrong\"" for flag -terragrunt-log-custom-format: invalid placeholder name "wrong", available names: %s`, strings.Join(placeholders.NewPlaceholderRegister().Names(), ",")),
+			logCustomFormat: "%time(color=green) %level %wrong",
+			expectedErr:     errors.Errorf(`invalid value "\"%%time(color=green) %%level %%wrong\"" for flag -terragrunt-log-custom-format: invalid placeholder name "wrong", available names: %s`, strings.Join(placeholders.NewPlaceholderRegister().Names(), ",")),
 		},
 		{
-			"%time(colorr=green) %level",
-			nil, nil,
-			errors.Errorf(`invalid value "\"%%time(colorr=green) %%level\"" for flag -terragrunt-log-custom-format: placeholder "time", invalid option name "colorr", available names: %s`, strings.Join(placeholders.Time().Options().Names(), ",")),
+			logCustomFormat: "%time(colorr=green) %level",
+			expectedErr:     errors.Errorf(`invalid value "\"%%time(colorr=green) %%level\"" for flag -terragrunt-log-custom-format: placeholder "time", invalid option name "colorr", available names: %s`, strings.Join(placeholders.Time().Options().Names(), ",")),
 		},
 		{
-			"%time(color=green) %level(format=tinyy)",
-			nil, nil,
-			errors.New(`invalid value "\"%time(color=green) %level(format=tinyy)\"" for flag -terragrunt-log-custom-format: placeholder "level", option "format", invalid value "tinyy", available values: full,short,tiny`),
+			logCustomFormat: "%time(color=green) %level(format=tinyy)",
+			expectedErr:     errors.New(`invalid value "\"%time(color=green) %level(format=tinyy)\"" for flag -terragrunt-log-custom-format: placeholder "level", option "format", invalid value "tinyy", available values: full,short,tiny`),
 		},
 		{
-			"%time(=green) %level(format=tiny)",
-			nil, nil,
-			errors.New(`invalid value "\"%time(=green) %level(format=tiny)\"" for flag -terragrunt-log-custom-format: placeholder "time", empty option name "=green) %level(format=tiny)\""`),
+			logCustomFormat: "%time(=green) %level(format=tiny)",
+			expectedErr:     errors.New(`invalid value "\"%time(=green) %level(format=tiny)\"" for flag -terragrunt-log-custom-format: placeholder "time", empty option name "=green) %level(format=tiny)\""`),
 		},
 	}
 
@@ -469,8 +458,8 @@ func TestLogWithRelPath(t *testing.T) {
 	rootPath := util.JoinPath(tmpEnvPath, testFixtureLogRelPaths)
 
 	testCases := []struct {
-		workingDir string
 		assertFn   func(t *testing.T, stdout, stderr string)
+		workingDir string
 	}{
 		{
 			workingDir: "duplicate-dir-names/workspace/one/two/aaa", // dir `workspace` duplicated twice in path
@@ -1074,44 +1063,38 @@ func TestTerraformCommandCliArgs(t *testing.T) {
 	t.Parallel()
 
 	testCases := []struct {
-		command     []string
-		expected    string
 		expectedErr error
+		expected    string
+		command     []string
 	}{
 		{
-			[]string{"--", "version"},
-			wrappedBinary() + " version",
-			nil,
+			command:  []string{"--", "version"},
+			expected: wrappedBinary() + " version",
 		},
 		{
-			[]string{"--", "version", "foo"},
-			wrappedBinary() + " version",
-			nil,
+			command:  []string{"--", "version", "foo"},
+			expected: wrappedBinary() + " version",
 		},
 		{
-			[]string{"--", "version", "foo", "bar", "baz"},
-			wrappedBinary() + " version",
-			nil,
+			command:  []string{"--", "version", "foo", "bar", "baz"},
+			expected: wrappedBinary() + " version",
 		},
 		{
-			[]string{"--", "version", "foo", "bar", "baz", "foobar"},
-			wrappedBinary() + " version",
-			nil,
+			command:  []string{"--", "version", "foo", "bar", "baz", "foobar"},
+			expected: wrappedBinary() + " version",
 		},
 		{
-			[]string{"--", "graph"},
-			"digraph",
-			nil,
+			command:  []string{"--", "graph"},
+			expected: "digraph",
 		},
 		{
-			[]string{"--", "paln"}, //codespell:ignore
-			"",
-			expectedWrongCommandErr("paln"), //codespell:ignore
+			command:     []string{"--", "paln"}, //codespell:ignore
+			expected:    "",
+			expectedErr: expectedWrongCommandErr("paln"), //codespell:ignore
 		},
 		{
-			[]string{"--terragrunt-disable-command-validation", "--", "paln"}, //codespell:ignore
-			wrappedBinary() + " invocation failed",                            // error caused by running terraform with the wrong command
-			nil,
+			command:  []string{"--terragrunt-disable-command-validation", "--", "paln"}, //codespell:ignore
+			expected: wrappedBinary() + " invocation failed",                            // error caused by running terraform with the wrong command
 		},
 	}
 
@@ -1140,24 +1123,24 @@ func TestTerraformSubcommandCliArgs(t *testing.T) {
 	t.Parallel()
 
 	testCases := []struct {
-		command  []string
 		expected string
+		command  []string
 	}{
 		{
-			[]string{"force-unlock"},
-			wrappedBinary() + " force-unlock",
+			command:  []string{"force-unlock"},
+			expected: wrappedBinary() + " force-unlock",
 		},
 		{
-			[]string{"force-unlock", "foo"},
-			wrappedBinary() + " force-unlock foo",
+			command:  []string{"force-unlock", "foo"},
+			expected: wrappedBinary() + " force-unlock foo",
 		},
 		{
-			[]string{"force-unlock", "foo", "bar", "baz"},
-			wrappedBinary() + " force-unlock foo bar baz",
+			command:  []string{"force-unlock", "foo", "bar", "baz"},
+			expected: wrappedBinary() + " force-unlock foo bar baz",
 		},
 		{
-			[]string{"force-unlock", "foo", "bar", "baz", "foobar"},
-			wrappedBinary() + " force-unlock foo bar baz foobar",
+			command:  []string{"force-unlock", "foo", "bar", "baz", "foobar"},
+			expected: wrappedBinary() + " force-unlock foo bar baz foobar",
 		},
 	}
 
diff --git a/tf/cache/handlers/provider_test.go b/tf/cache/handlers/provider_test.go
index c01a5e9b..27686cec 100644
--- a/tf/cache/handlers/provider_test.go
+++ b/tf/cache/handlers/provider_test.go
@@ -14,16 +14,16 @@ func TestIsOfflineError(t *testing.T) {
 	t.Parallel()
 	testCases := []struct {
 		err      error
-		expected bool
 		desc     string
+		expected bool
 	}{
-		{syscall.ECONNREFUSED, true, "connection refused"},
-		{syscall.ECONNRESET, true, "connection reset by peer"},
-		{syscall.ECONNABORTED, true, "connection aborted"},
-		{syscall.ENETUNREACH, true, "network is unreachable"},
-		{errors.New("get \"https://registry.terraform.io/.well-known/terraform.json\": dial tcp: lookup registry.terraform.io on 185.12.64.1:53: dial udp 185.12.64.1:53: connect: network is unreachable"), true, "network is unreachable"},
-		{errors.New("get \"https://registry.terraform.io/.well-known/terraform.json\": read tcp 10.10.230.10:58328->10.245.10.15:443: read: connection reset by peer"), true, "network is unreachable"},
-		{errors.New("random error"), false, "a random error that should not be offline"},
+		{err: syscall.ECONNREFUSED, desc: "connection refused", expected: true},
+		{err: syscall.ECONNRESET, desc: "connection reset by peer", expected: true},
+		{err: syscall.ECONNABORTED, desc: "connection aborted", expected: true},
+		{err: syscall.ENETUNREACH, desc: "network is unreachable", expected: true},
+		{err: errors.New("get \"https://registry.terraform.io/.well-known/terraform.json\": dial tcp: lookup registry.terraform.io on 185.12.64.1:53: dial udp 185.12.64.1:53: connect: network is unreachable"), desc: "network is unreachable", expected: true},
+		{err: errors.New("get \"https://registry.terraform.io/.well-known/terraform.json\": read tcp 10.10.230.10:58328->10.245.10.15:443: read: connection reset by peer"), desc: "network is unreachable", expected: true},
+		{err: errors.New("random error"), desc: "a random error that should not be offline", expected: false},
 	}
 
 	for _, tc := range testCases {
diff --git a/tf/cliconfig/config_test.go b/tf/cliconfig/config_test.go
index f9d9f93d..18344759 100644
--- a/tf/cliconfig/config_test.go
+++ b/tf/cliconfig/config_test.go
@@ -22,10 +22,10 @@ func TestConfig(t *testing.T) {
 	tempCacheDir := t.TempDir()
 
 	testCases := []struct {
+		expectedHCL                 string
 		providerInstallationMethods []cliconfig.ProviderInstallationMethod
 		hosts                       []cliconfig.ConfigHost
 		config                      cliconfig.Config
-		expectedHCL                 string
 	}{
 		{
 			providerInstallationMethods: []cliconfig.ProviderInstallationMethod{
@@ -34,39 +34,41 @@ func TestConfig(t *testing.T) {
 				cliconfig.NewProviderInstallationDirect(include, exclude),
 			},
 			hosts: []cliconfig.ConfigHost{
-				{"registry.terraform.io", map[string]string{"providers.v1": "http://localhost:5758/v1/providers/registry.terraform.io/"}},
+				{Name: "registry.terraform.io", Services: map[string]string{"providers.v1": "http://localhost:5758/v1/providers/registry.terraform.io/"}},
 			},
 			config: cliconfig.Config{
 				DisableCheckpoint: true,
 				PluginCacheDir:    "path/to/plugin/cache/dir1",
 			},
-			expectedHCL: `disable_checkpoint           = true
-disable_checkpoint_signature = false
-plugin_cache_dir             = "path/to/plugin/cache/dir1"
-
-host "registry.terraform.io" {
-  services = {
-    "providers.v1" = "http://localhost:5758/v1/providers/registry.terraform.io/"
-  }
-}
-
+			expectedHCL: `
 provider_installation {
 
    "filesystem_mirror" {
-    path    = "` + tempCacheDir + `"
     include = ["registry.terraform.io/*/*"]
     exclude = ["registry.opentofu.org/*/*"]
+    path    = "` + tempCacheDir + `"
   }
    "network_mirror" {
-    url     = "https://network-mirror.io/providers/"
     include = ["registry.terraform.io/*/*"]
     exclude = ["registry.opentofu.org/*/*"]
+    url     = "https://network-mirror.io/providers/"
   }
    "direct" {
     include = ["registry.terraform.io/*/*"]
     exclude = ["registry.opentofu.org/*/*"]
   }
 }
+
+plugin_cache_dir = "path/to/plugin/cache/dir1"
+
+host "registry.terraform.io" {
+  services = {
+    "providers.v1" = "http://localhost:5758/v1/providers/registry.terraform.io/"
+  }
+}
+
+disable_checkpoint           = true
+disable_checkpoint_signature = false
 `,
 		},
 		{
@@ -74,12 +76,13 @@ provider_installation {
 				DisableCheckpoint: false,
 				PluginCacheDir:    tempCacheDir,
 			},
-			expectedHCL: `disable_checkpoint           = false
-disable_checkpoint_signature = false
-plugin_cache_dir             = "` + tempCacheDir + `"
-
+			expectedHCL: `
 provider_installation {
 }
+
+plugin_cache_dir             = "` + tempCacheDir + `"
+disable_checkpoint           = false
+disable_checkpoint_signature = false
 `,
 		},
 	}
diff --git a/tf/getproviders/package_authentication_test.go b/tf/getproviders/package_authentication_test.go
index 4fb70e34..07b2b36b 100644
--- a/tf/getproviders/package_authentication_test.go
+++ b/tf/getproviders/package_authentication_test.go
@@ -56,50 +56,45 @@ func TestArchiveChecksumAuthentication(t *testing.T) {
 	t.Parallel()
 
 	testCases := []struct {
+		expectedErr    error
+		expectedResult *getproviders.PackageAuthenticationResult
 		path           string
 		wantSHA256Sum  [sha256.Size]byte
-		expectedResult *getproviders.PackageAuthenticationResult
-		expectedErr    error
 	}{
 		{
-			"testdata/filesystem-mirror/registry.terraform.io/hashicorp/null/terraform-provider-null_2.1.0_linux_amd64.zip",
-			[sha256.Size]byte{
+			path: "testdata/filesystem-mirror/registry.terraform.io/hashicorp/null/terraform-provider-null_2.1.0_linux_amd64.zip",
+			wantSHA256Sum: [sha256.Size]byte{
 				0x4f, 0xb3, 0x98, 0x49, 0xf2, 0xe1, 0x38, 0xeb,
 				0x16, 0xa1, 0x8b, 0xa0, 0xc6, 0x82, 0x63, 0x5d,
 				0x78, 0x1c, 0xb8, 0xc3, 0xb2, 0x59, 0x01, 0xdd,
 				0x5a, 0x79, 0x2a, 0xde, 0x97, 0x11, 0xf5, 0x01,
 			},
-			getproviders.NewPackageAuthenticationResult(getproviders.VerifiedChecksum),
-			nil,
+			expectedResult: getproviders.NewPackageAuthenticationResult(getproviders.VerifiedChecksum),
 		},
 		{
-			"testdata/filesystem-mirror/registry.terraform.io/hashicorp/null/terraform-provider-null_invalid.zip",
-			[sha256.Size]byte{
+			path: "testdata/filesystem-mirror/registry.terraform.io/hashicorp/null/terraform-provider-null_invalid.zip",
+			wantSHA256Sum: [sha256.Size]byte{
 				0x4f, 0xb3, 0x98, 0x49, 0xf2, 0xe1, 0x38, 0xeb,
 				0x16, 0xa1, 0x8b, 0xa0, 0xc6, 0x82, 0x63, 0x5d,
 				0x78, 0x1c, 0xb8, 0xc3, 0xb2, 0x59, 0x01, 0xdd,
 				0x5a, 0x79, 0x2a, 0xde, 0x97, 0x11, 0xf5, 0x01,
 			},
-			nil,
-			errors.New("archive has incorrect checksum zh:8610a6d93c01e05a0d3920fe66c79b3c7c3b084f1f5c70715afd919fee1d978e (expected zh:4fb39849f2e138eb16a18ba0c682635d781cb8c3b25901dd5a792ade9711f501)"),
+			expectedErr: errors.New("archive has incorrect checksum zh:8610a6d93c01e05a0d3920fe66c79b3c7c3b084f1f5c70715afd919fee1d978e (expected zh:4fb39849f2e138eb16a18ba0c682635d781cb8c3b25901dd5a792ade9711f501)"),
 		},
 		{
-			"testdata/no-package-here.zip",
-			[sha256.Size]byte{},
-			nil,
-			errors.New("stat testdata/no-package-here.zip: no such file or directory"),
+			path:          "testdata/no-package-here.zip",
+			wantSHA256Sum: [sha256.Size]byte{},
+			expectedErr:   errors.New("stat testdata/no-package-here.zip: no such file or directory"),
 		},
 		{
-			"testdata/filesystem-mirror/registry.terraform.io/hashicorp/null/terraform-provider-null_2.1.0_linux_amd64.zip",
-			[sha256.Size]byte{},
-			nil,
-			errors.New("archive has incorrect checksum zh:4fb39849f2e138eb16a18ba0c682635d781cb8c3b25901dd5a792ade9711f501 (expected zh:0000000000000000000000000000000000000000000000000000000000000000)"),
+			path:          "testdata/filesystem-mirror/registry.terraform.io/hashicorp/null/terraform-provider-null_2.1.0_linux_amd64.zip",
+			wantSHA256Sum: [sha256.Size]byte{},
+			expectedErr:   errors.New("archive has incorrect checksum zh:4fb39849f2e138eb16a18ba0c682635d781cb8c3b25901dd5a792ade9711f501 (expected zh:0000000000000000000000000000000000000000000000000000000000000000)"),
 		},
 		{
-			"testdata/filesystem-mirror/tfe.example.com/AwesomeCorp/happycloud/0.1.0-alpha.2/darwin_amd64",
-			[sha256.Size]byte{},
-			nil,
-			errors.New("cannot check archive hash for non-archive location testdata/filesystem-mirror/tfe.example.com/AwesomeCorp/happycloud/0.1.0-alpha.2/darwin_amd64"),
+			path:          "testdata/filesystem-mirror/tfe.example.com/AwesomeCorp/happycloud/0.1.0-alpha.2/darwin_amd64",
+			wantSHA256Sum: [sha256.Size]byte{},
+			expectedErr:   errors.New("cannot check archive hash for non-archive location testdata/filesystem-mirror/tfe.example.com/AwesomeCorp/happycloud/0.1.0-alpha.2/darwin_amd64"),
 		},
 	}
 
@@ -127,51 +122,39 @@ func TestNewMatchingChecksumAuthentication(t *testing.T) {
 	t.Parallel()
 
 	testCases := []struct {
+		expectedErr   error
 		path          string
 		filename      string
 		document      []byte
 		wantSHA256Sum [sha256.Size]byte
-		expectedErr   error
 	}{
 		{
-			"testdata/my-package.zip",
-			"my-package.zip",
-			fmt.Appendf(nil, "%x README.txt\n%x my-package.zip\n", [sha256.Size]byte{0xc0, 0xff, 0xee}, [sha256.Size]byte{0xde, 0xca, 0xde}),
-			[sha256.Size]byte{0xde, 0xca, 0xde},
-			nil,
+			path:          "testdata/my-package.zip",
+			filename:      "my-package.zip",
+			document:      fmt.Appendf(nil, "%x README.txt\n%x my-package.zip\n", [sha256.Size]byte{0xc0, 0xff, 0xee}, [sha256.Size]byte{0xde, 0xca, 0xde}),
+			wantSHA256Sum: [sha256.Size]byte{0xde, 0xca, 0xde},
 		},
 
 		{
-			"testdata/my-package.zip",
-			"my-package.zip",
-			fmt.Appendf(nil,
-				"%x README.txt",
-				[sha256.Size]byte{0xbe, 0xef},
-			),
-			[sha256.Size]byte{0xde, 0xca, 0xde},
-			errors.New(`checksum list has no SHA-256 hash for "my-package.zip"`),
+			path:          "testdata/my-package.zip",
+			filename:      "my-package.zip",
+			document:      fmt.Appendf(nil, "%x README.txt", [sha256.Size]byte{0xbe, 0xef}),
+			wantSHA256Sum: [sha256.Size]byte{0xde, 0xca, 0xde},
+			expectedErr:   errors.New(`checksum list has no SHA-256 hash for "my-package.zip"`),
 		},
 		{
-			"testdata/my-package.zip",
-			"my-package.zip",
-			fmt.Appendf(nil,
-				"%s README.txt\n%s my-package.zip",
-				"horses",
-				"chickens",
-			),
-			[sha256.Size]byte{0xde, 0xca, 0xde},
-			errors.New(`checksum list has invalid SHA256 hash "chickens": encoding/hex: invalid byte: U+0068 'h'`),
+			path:          "testdata/my-package.zip",
+			filename:      "my-package.zip",
+			document:      fmt.Appendf(nil, "%s README.txt\n%s my-package.zip", "horses", "chickens"),
+			wantSHA256Sum: [sha256.Size]byte{0xde, 0xca, 0xde},
+			expectedErr:   errors.New(`checksum list has invalid SHA256 hash "chickens": encoding/hex: invalid byte: U+0068 'h'`),
 		},
 		{
-			"testdata/my-package.zip",
-			"my-package.zip",
-			fmt.Appendf(nil,
-				"%x README.txt\n%x my-package.zip",
-				[sha256.Size]byte{0xbe, 0xef},
-				[sha256.Size]byte{0xc0, 0xff, 0xee},
-			),
-			[sha256.Size]byte{0xde, 0xca, 0xde},
-			errors.New("checksum list has unexpected SHA-256 hash c0ffee0000000000000000000000000000000000000000000000000000000000 (expected decade0000000000000000000000000000000000000000000000000000000000)"),
+			path:          "testdata/my-package.zip",
+			filename:      "my-package.zip",
+			document:      fmt.Appendf(nil, "%x README.txt\n%x my-package.zip", [sha256.Size]byte{0xbe, 0xef}, [sha256.Size]byte{0xc0, 0xff, 0xee}),
+			wantSHA256Sum: [sha256.Size]byte{0xde, 0xca, 0xde},
+			expectedErr:   errors.New("checksum list has unexpected SHA-256 hash c0ffee0000000000000000000000000000000000000000000000000000000000 (expected decade0000000000000000000000000000000000000000000000000000000000)"),
 		},
 	}
 
@@ -251,60 +234,54 @@ func TestSignatureAuthenticate(t *testing.T) {
 	t.Parallel()
 
 	testCases := []struct {
-		path           string
-		document       []byte
-		signature      string
+		expectedErr    error
 		keys           map[string]string
 		expectedResult *getproviders.PackageAuthenticationResult
-		expectedErr    error
+		path           string
+		signature      string
+		document       []byte
 	}{
 		{
-			"testdata/my-package.zip",
-			[]byte(testProviderShaSums),
-			testHashicorpSignatureGoodBase64,
-			map[string]string{getproviders.HashicorpPublicKey: ""},
-			getproviders.NewPackageAuthenticationResult(getproviders.OfficialProvider),
-			nil,
+			path:           "testdata/my-package.zip",
+			document:       []byte(testProviderShaSums),
+			signature:      testHashicorpSignatureGoodBase64,
+			keys:           map[string]string{getproviders.HashicorpPublicKey: ""},
+			expectedResult: getproviders.NewPackageAuthenticationResult(getproviders.OfficialProvider),
 		},
 		{
-			"testdata/my-package.zip",
-			[]byte("example shasums data"),
-			testHashicorpSignatureGoodBase64,
-			map[string]string{"invalid PGP armor value": ""},
-			nil,
-			errors.New("error decoding signing key: openpgp: invalid argument: no armored data found"),
+			path:        "testdata/my-package.zip",
+			document:    []byte("example shasums data"),
+			signature:   testHashicorpSignatureGoodBase64,
+			keys:        map[string]string{"invalid PGP armor value": ""},
+			expectedErr: errors.New("error decoding signing key: openpgp: invalid argument: no armored data found"),
 		},
 		{
-			"testdata/my-package.zip",
-			[]byte("example shasums data"),
-			testSignatureBadBase64,
-			map[string]string{testAuthorKeyArmor: ""},
-			nil,
-			errors.New("error checking signature: openpgp: invalid data: signature subpacket truncated"),
+			path:        "testdata/my-package.zip",
+			document:    []byte("example shasums data"),
+			signature:   testSignatureBadBase64,
+			keys:        map[string]string{testAuthorKeyArmor: ""},
+			expectedErr: errors.New("error checking signature: openpgp: invalid data: signature subpacket truncated"),
 		},
 		{
-			"testdata/my-package.zip",
-			[]byte("example shasums data"),
-			testAuthorSignatureGoodBase64,
-			map[string]string{getproviders.HashicorpPublicKey: ""},
-			nil,
-			errors.New("authentication signature from unknown issuer"),
+			path:        "testdata/my-package.zip",
+			document:    []byte("example shasums data"),
+			signature:   testAuthorSignatureGoodBase64,
+			keys:        map[string]string{getproviders.HashicorpPublicKey: ""},
+			expectedErr: errors.New("authentication signature from unknown issuer"),
 		},
 		{
-			"testdata/my-package.zip",
-			[]byte("example shasums data"),
-			testAuthorSignatureGoodBase64,
-			map[string]string{testAuthorKeyArmor: "invalid PGP armor value"},
-			nil,
-			errors.New("error decoding trust signature: EOF"),
+			path:        "testdata/my-package.zip",
+			document:    []byte("example shasums data"),
+			signature:   testAuthorSignatureGoodBase64,
+			keys:        map[string]string{testAuthorKeyArmor: "invalid PGP armor value"},
+			expectedErr: errors.New("error decoding trust signature: EOF"),
 		},
 		{
-			"testdata/my-package.zip",
-			[]byte("example shasums data"),
-			testAuthorSignatureGoodBase64,
-			map[string]string{testAuthorKeyArmor: testOtherKeyTrustSignatureArmor},
-			nil,
-			errors.New("error verifying trust signature: openpgp: invalid signature: RSA verification failure"),
+			path:        "testdata/my-package.zip",
+			document:    []byte("example shasums data"),
+			signature:   testAuthorSignatureGoodBase64,
+			keys:        map[string]string{testAuthorKeyArmor: testOtherKeyTrustSignatureArmor},
+			expectedErr: errors.New("error verifying trust signature: openpgp: invalid signature: RSA verification failure"),
 		},
 	}
 
diff --git a/util/collections_test.go b/util/collections_test.go
index b19dedc5..12a128e2 100644
--- a/util/collections_test.go
+++ b/util/collections_test.go
@@ -18,19 +18,19 @@ func TestMatchesAny(t *testing.T) {
 	}
 
 	tc := []struct {
-		list     []string
 		element  string
+		list     []string
 		expected bool
 	}{
-		{nil, "", false},
-		{[]string{}, "", false},
-		{[]string{}, "foo", false},
-		{[]string{"foo"}, "kafoot", true},
-		{[]string{"bar", "foo", ".*Failed to load backend.*TLS handshake timeout.*"}, "Failed to load backend: Error...:...  TLS handshake timeout", true},
-		{[]string{"bar", "foo", ".*Failed to load backend.*TLS handshake timeout.*"}, "Failed to load backend: Error...:...  TLxS handshake timeout", false},
-		{[]string{"(?s).*Failed to load state.*dial tcp.*timeout.*"}, realWorldErrorMessages[0], true},
-		{[]string{"(?s).*Creating metric alarm failed.*request to update this alarm is in progress.*"}, realWorldErrorMessages[1], true},
-		{[]string{"(?s).*Error configuring the backend.*TLS handshake timeout.*"}, realWorldErrorMessages[2], true},
+		{list: nil, element: "", expected: false},
+		{list: []string{}, element: "", expected: false},
+		{list: []string{}, element: "foo", expected: false},
+		{list: []string{"foo"}, element: "kafoot", expected: true},
+		{list: []string{"bar", "foo", ".*Failed to load backend.*TLS handshake timeout.*"}, element: "Failed to load backend: Error...:...  TLS handshake timeout", expected: true},
+		{list: []string{"bar", "foo", ".*Failed to load backend.*TLS handshake timeout.*"}, element: "Failed to load backend: Error...:...  TLxS handshake timeout", expected: false},
+		{list: []string{"(?s).*Failed to load state.*dial tcp.*timeout.*"}, element: realWorldErrorMessages[0], expected: true},
+		{list: []string{"(?s).*Creating metric alarm failed.*request to update this alarm is in progress.*"}, element: realWorldErrorMessages[1], expected: true},
+		{list: []string{"(?s).*Error configuring the backend.*TLS handshake timeout.*"}, element: realWorldErrorMessages[2], expected: true},
 	}
 
 	for i, tt := range tc {
@@ -49,16 +49,16 @@ func TestListContainsElement(t *testing.T) {
 	t.Parallel()
 
 	tc := []struct {
-		list     []string
 		element  string
+		list     []string
 		expected bool
 	}{
-		{[]string{}, "", false},
-		{[]string{}, "foo", false},
-		{[]string{"foo"}, "foo", true},
-		{[]string{"bar", "foo", "baz"}, "foo", true},
-		{[]string{"bar", "foo", "baz"}, "nope", false},
-		{[]string{"bar", "foo", "baz"}, "", false},
+		{list: []string{}, element: "", expected: false},
+		{list: []string{}, element: "foo", expected: false},
+		{list: []string{"foo"}, element: "foo", expected: true},
+		{list: []string{"bar", "foo", "baz"}, element: "foo", expected: true},
+		{list: []string{"bar", "foo", "baz"}, element: "nope", expected: false},
+		{list: []string{"bar", "foo", "baz"}, element: "", expected: false},
 	}
 
 	for i, tt := range tc {
@@ -245,12 +245,12 @@ func TestCommaSeparatedStrings(t *testing.T) {
 	t.Parallel()
 
 	tc := []struct {
-		list     []string
 		expected string
+		list     []string
 	}{
-		{[]string{}, ``},
-		{[]string{"foo"}, `"foo"`},
-		{[]string{"foo", "bar"}, `"foo", "bar"`},
+		{list: []string{}, expected: ``},
+		{list: []string{"foo"}, expected: `"foo"`},
+		{list: []string{"foo", "bar"}, expected: `"foo", "bar"`},
 	}
 
 	for i, tt := range tc {
@@ -269,15 +269,15 @@ func TestStringListInsert(t *testing.T) {
 	t.Parallel()
 
 	tc := []struct {
-		list     []string
 		element  string
-		index    int
+		list     []string
 		expected []string
+		index    int
 	}{
-		{[]string{}, "foo", 0, []string{"foo"}},
-		{[]string{"a", "c", "d"}, "b", 1, []string{"a", "b", "c", "d"}},
-		{[]string{"b", "c", "d"}, "a", 0, []string{"a", "b", "c", "d"}},
-		{[]string{"a", "b", "d"}, "c", 2, []string{"a", "b", "c", "d"}},
+		{list: []string{}, element: "foo", index: 0, expected: []string{"foo"}},
+		{list: []string{"a", "c", "d"}, element: "b", index: 1, expected: []string{"a", "b", "c", "d"}},
+		{list: []string{"b", "c", "d"}, element: "a", index: 0, expected: []string{"a", "b", "c", "d"}},
+		{list: []string{"a", "b", "d"}, element: "c", index: 2, expected: []string{"a", "b", "c", "d"}},
 	}
 
 	for i, tt := range tc {
diff --git a/util/prefix-writer_test.go b/util/prefix-writer_test.go
index aa4ad91b..d15201de 100644
--- a/util/prefix-writer_test.go
+++ b/util/prefix-writer_test.go
@@ -16,30 +16,84 @@ func TestPrefixWriter(t *testing.T) {
 
 	tc := []struct {
 		prefix   string
-		values   []string
 		expected string
+		values   []string
 	}{
-		{"p1 ", []string{"a", "b"}, "p1 ab"},
-		{"p2 ", []string{"a", "b"}, "p2 ab"},
-
-		{"", []string{"a", "b"}, "ab"},
-
-		{"p1 ", []string{"a", "b\n"}, "p1 ab\n"},
-		{"p1 ", []string{"a\n", "b"}, "p1 a\np1 b"},
-		{"p1 ", []string{"a\n", "b\n"}, "p1 a\np1 b\n"},
-		{"p1 ", []string{"a", "b", "c", "def"}, "p1 abcdef"},
-		{"p1 ", []string{"a", "b\n", "c", "def"}, "p1 ab\np1 cdef"},
-		{"p1 ", []string{"a", "b\nc", "def"}, "p1 ab\np1 cdef"},
-		{"p1 ", []string{"ab", "cd", "ef", "gh\n"}, "p1 abcdefgh\n"},
-		{"p1 ", []string{"ab", "cd\n", "ef", "gh\n"}, "p1 abcd\np1 efgh\n"},
-		{"p1 ", []string{"ab", "cd", "e\nf", "gh\n"}, "p1 abcde\np1 fgh\n"},
-		{"p1 ", []string{"ab", "cd", "ef\n", "gh\n"}, "p1 abcdef\np1 gh\n"},
-		{"p1 ", []string{"ab\ncd\nef\ngh\n"}, "p1 ab\np1 cd\np1 ef\np1 gh\n"},
-		{"p1 ", []string{"ab\n\n\ngh\n"}, "p1 ab\np1 \np1 \np1 gh\n"},
-
-		{"p1 ", []string{""}, ""},
-		{"p1 ", []string{"\n"}, "p1 \n"},
-		{"p1\n", []string{"\n"}, "p1\n\n"},
+		{
+			prefix:   "p1 ",
+			expected: "p1 ab",
+			values:   []string{"a", "b"},
+		},
+		{
+			prefix:   "p2 ",
+			expected: "p2 ab",
+			values:   []string{"a", "b"},
+		},
+		{
+			prefix:   "",
+			expected: "ab",
+			values:   []string{"a", "b"},
+		},
+		{
+			prefix:   "p1 ",
+			expected: "p1 ab\n",
+			values:   []string{"a", "b\n"},
+		},
+		{
+			prefix:   "p1 ",
+			expected: "p1 a\np1 b",
+			values:   []string{"a\n", "b"},
+		},
+		{
+			prefix:   "p1 ",
+			expected: "p1 a\np1 b\n",
+			values:   []string{"a\n", "b\n"},
+		},
+		{
+			prefix:   "p1 ",
+			expected: "p1 abcdef",
+			values:   []string{"a", "b", "c", "def"},
+		},
+		{
+			prefix:   "p1 ",
+			expected: "p1 abcdefgh\n",
+			values:   []string{"ab", "cd", "ef", "gh\n"},
+		},
+		{
+			prefix:   "p1 ",
+			expected: "p1 abcd\np1 efgh\n",
+			values:   []string{"ab", "cd\n", "ef", "gh\n"},
+		},
+		{
+			prefix:   "p1 ",
+			expected: "p1 abcde\np1 fgh\n",
+			values:   []string{"ab", "cd", "e\nf", "gh\n"},
+		},
+		{
+			prefix:   "p1 ",
+			expected: "p1 abcdef\np1 gh\n",
+			values:   []string{"ab", "cd", "ef\n", "gh\n"},
+		},
+		{
+			prefix:   "p1 ",
+			expected: "p1 ab\np1 cd\np1 ef\np1 gh\n",
+			values:   []string{"ab\ncd\nef\ngh\n"},
+		},
+		{
+			prefix:   "p1 ",
+			expected: "p1 ab\np1 \np1 \np1 gh\n",
+			values:   []string{"ab\n\n\ngh\n"},
+		},
+		{
+			prefix:   "p1 ",
+			expected: "",
+			values:   []string{""},
+		},
+		{
+			prefix:   "p1 ",
+			expected: "p1 \n",
+			values:   []string{"\n"},
+		},
 	}
 
 	for i, tt := range tc {
@@ -71,10 +125,14 @@ func TestPrefixWriterFail(t *testing.T) {
 
 	tc := []struct {
 		prefix   string
-		values   []string
 		expected string
+		values   []string
 	}{
-		{"p1 ", []string{"a", "b"}, "p1 ab"},
+		{
+			prefix:   "p1 ",
+			expected: "p1 ab",
+			values:   []string{"a", "b"},
+		},
 	}
 
 	for i, tt := range tc {
diff --git a/util/reflect_test.go b/util/reflect_test.go
index 97c508fc..e8694e02 100644
--- a/util/reflect_test.go
+++ b/util/reflect_test.go
@@ -46,8 +46,8 @@ func TestMustWalkTerraformOutput(t *testing.T) {
 
 	tc := []struct {
 		value    any
-		path     []string
 		expected any
+		path     []string
 	}{
 		{
 			value: map[string]map[string]string{