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:
ApplyAll → TgApplyAll
ApplyAllE → TgApplyAllE
DestroyAll → TgDestroyAll
DestroyAllE → TgDestroyAllE
PlanAllExitCode → TgPlanAllExitCode
PlanAllExitCodeE → TgPlanAllExitCodeE
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.
Problem
The terragrunt module has inconsistent function naming:
TgStackGenerate,TgStackRun,TgStackCleanTgInitApplyAll,DestroyAll,PlanAllExitCode(missingTgprefix)This inconsistency is confusing and makes the API less discoverable.
Proposal
Rename run-all functions to use the
Tgprefix:ApplyAll→TgApplyAllApplyAllE→TgApplyAllEDestroyAll→TgDestroyAllDestroyAllE→TgDestroyAllEPlanAllExitCode→TgPlanAllExitCodePlanAllExitCodeE→TgPlanAllExitCodeEKeep old function names as deprecated aliases for backward compatibility:
Benefits
Breaking Change
This would be a breaking change requiring a major version bump. The deprecation period would give users time to migrate.