diff --git a/server/events/templates/multi_project_apply.tmpl b/server/events/templates/multi_project_apply.tmpl index 2e2b2baa30..fb13f4fb97 100644 --- a/server/events/templates/multi_project_apply.tmpl +++ b/server/events/templates/multi_project_apply.tmpl @@ -2,7 +2,10 @@ {{ template "multiProjectHeader" . -}} {{ range $i, $result := .Results -}} ### {{ add $i 1 }}. {{ if $result.ProjectName }}project: `{{ $result.ProjectName }}` {{ end }}dir: `{{ $result.RepoRelDir }}` workspace: `{{ $result.Workspace }}` -{{ $result.Rendered }} +{{ if (le (len $result.Rendered) 500000) }}{{$result.Rendered}}{{ else }}[..] +{{trunc -100 $result.Rendered}} + +:warning: The apply summary is large to render; open the atlantis job page.{{ end }} --- {{ end -}} diff --git a/server/events/templates/multi_project_plan.tmpl b/server/events/templates/multi_project_plan.tmpl index f57e96794a..9bfcb7cbe3 100644 --- a/server/events/templates/multi_project_plan.tmpl +++ b/server/events/templates/multi_project_plan.tmpl @@ -5,8 +5,10 @@ {{ range $i, $result := .Results -}} {{ if (and $hideUnchangedPlans $result.NoChanges) }}{{continue}}{{end -}} ### {{ add $i 1 }}. {{ if $result.ProjectName }}project: `{{ $result.ProjectName }}` {{ end }}dir: `{{ $result.RepoRelDir }}` workspace: `{{ $result.Workspace }}` -{{ $result.Rendered }} +{{ if (le (len $result.Rendered) 500000) }}{{$result.Rendered}}{{ else }}[..] +{{trunc -100 $result.Rendered}} +:warning: The plan is too large to render; run `terraform plan` locally, or open the atlantis job page.{{ end }} --- {{ end -}} {{ template "multiProjectPlanFooter" . -}} diff --git a/server/events/templates/single_project_apply.tmpl b/server/events/templates/single_project_apply.tmpl index 173bb46847..ae51847c15 100644 --- a/server/events/templates/single_project_apply.tmpl +++ b/server/events/templates/single_project_apply.tmpl @@ -2,6 +2,9 @@ {{ $result := index .Results 0 -}} Ran {{ .Command }} for {{ if $result.ProjectName }}project: `{{ $result.ProjectName }}` {{ end }}dir: `{{ $result.RepoRelDir }}` workspace: `{{ $result.Workspace }}` -{{ $result.Rendered }} +{{ if (le (len $result.Rendered) 500000) }}{{$result.Rendered}}{{ else }}[..] +{{trunc -100 $result.Rendered}} + +:warning: The apply summary is large to render; open the atlantis job page.{{ end }} {{ template "log" . -}} {{ end -}} diff --git a/server/events/templates/single_project_plan_success.tmpl b/server/events/templates/single_project_plan_success.tmpl index 77f6e13d64..33e54ec02f 100644 --- a/server/events/templates/single_project_plan_success.tmpl +++ b/server/events/templates/single_project_plan_success.tmpl @@ -2,7 +2,10 @@ {{ $result := index .Results 0 -}} Ran {{ .Command }} for {{ if $result.ProjectName }}project: `{{ $result.ProjectName }}` {{ end }}dir: `{{ $result.RepoRelDir }}` workspace: `{{ $result.Workspace }}` -{{ $result.Rendered }} +{{ if (le (len $result.Rendered) 500000) }}{{$result.Rendered}}{{ else }}[..] +{{trunc -100 $result.Rendered}} + +:warning: The plan is too large to render; run `terraform plan` locally, or open the atlantis job page.{{ end }} {{ if ne .DisableApplyAll true }} --- * :fast_forward: To **apply** all unapplied plans from this {{ .VcsRequestType }}, comment: diff --git a/server/events/templates/single_project_plan_unsuccessful.tmpl b/server/events/templates/single_project_plan_unsuccessful.tmpl index 1dd0cd9643..526e242c2c 100644 --- a/server/events/templates/single_project_plan_unsuccessful.tmpl +++ b/server/events/templates/single_project_plan_unsuccessful.tmpl @@ -2,6 +2,9 @@ {{ $result := index .Results 0 -}} Ran {{ .Command }} for dir: `{{ $result.RepoRelDir }}` workspace: `{{ $result.Workspace }}` -{{ $result.Rendered }} +{{ if (le (len $result.Rendered) 500000) }}{{$result.Rendered}}{{ else }}[..] +{{trunc -100 $result.Rendered}} + +:warning: The plan is too large to render; run `terraform plan` locally, or open the atlantis job page.{{ end }} {{ template "log" . -}} {{ end -}}