Skip to content

Rename run-all functions to use Tg prefix for consistency #1618

@james00012

Description

@james00012

Problem

The terragrunt module has inconsistent function naming:

  • Stack commands: TgStackGenerate, TgStackRun, TgStackClean
  • Init command: TgInit
  • Run-all commands: ApplyAll, DestroyAll, PlanAllExitCode (missing Tg prefix)

This inconsistency is confusing and makes the API less discoverable.

Proposal

Rename run-all functions to use the Tg prefix:

  • ApplyAllTgApplyAll
  • ApplyAllETgApplyAllE
  • DestroyAllTgDestroyAll
  • DestroyAllETgDestroyAllE
  • PlanAllExitCodeTgPlanAllExitCode
  • PlanAllExitCodeETgPlanAllExitCodeE

Keep old function names as deprecated aliases for backward compatibility:

// Deprecated: Use TgApplyAll instead.
func ApplyAll(t testing.TestingT, options *Options) string {
    return TgApplyAll(t, options)
}

Benefits

  • Consistent naming across all terragrunt module functions
  • Better API discoverability
  • Clearer distinction from terraform module functions
  • Easier to identify terragrunt-specific functions in code

Breaking Change

This would be a breaking change requiring a major version bump. The deprecation period would give users time to migrate.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions