diff --git a/cli/templatepush.go b/cli/templatepush.go index 7b3cec06a7353..6f8edf61b5085 100644 --- a/cli/templatepush.go +++ b/cli/templatepush.go @@ -137,8 +137,9 @@ func (r *RootCmd) templatePush() *serpent.Command { UserVariableValues: userVariableValues, } + // This ensures the version name is set in the request arguments regardless of whether you're creating a new template or updating an existing one. + args.Name = versionName if !createTemplate { - args.Name = versionName args.Template = &template args.ReuseParameters = !alwaysPrompt }