diff --git a/shared/workspace_repo/workspace.go b/shared/workspace_repo/workspace.go index 8de291ef20..36b4fded1b 100644 --- a/shared/workspace_repo/workspace.go +++ b/shared/workspace_repo/workspace.go @@ -395,9 +395,11 @@ func (s *TFEWorkspace) WaitWithOptions(ctx context.Context, waitOptions options. if err != nil { logrus.Errorf("failed to get events: %s", err.Error()) } - err = waitOptions.Orchestrator.PrintLogs(ctx, waitOptions.StackName, waitOptions.Services) - if err != nil { - logrus.Errorf("failed to retrieve logs: %s", err.Error()) + if options.DebugLogsDuringDeploymentFromCtx(ctx) { + err = waitOptions.Orchestrator.PrintLogs(ctx, waitOptions.StackName, waitOptions.Services) + if err != nil { + logrus.Errorf("failed to retrieve logs: %s", err.Error()) + } } } }