Warning
You're browsing the documentation for an old version of Webiny. Consider upgrading your project to Webiny 5.35.x.
What you’ll learn
  • how to preview cloud infrastructure deployment for your project application

Introduction
anchor

During the project development, there is a chance that the deployed cloud infrastructure needs to change. New resources might be added, existing resources configured differently, and some may even need to be destroyed.

When doing more significant changes, it might be helpful to preview the deployment process that you’re about to execute. More specifically, you would certainly like to know if the deployment you’re about to execute destroys a mission-critical resource, e.g. a database or a file storage resource.

The Preview Flag
anchor

In order to avoid performing unintended cloud infrastructure changes, you can use the preview flag upon executing the deploy command. Consider the following examples:
yarn webiny deploy apps/api --env dev --preview
yarn webiny deploy apps/admin --env dev --preview
yarn webiny deploy apps/website --env dev --preview

Executing these commands won’t perform any changes to your cloud infrastructure resources. They would just list all of the changes that would be applied, for example:

Previewing Deploy CommandPreviewing Deploy Command
(click to enlarge)

Debugging
anchor

If you run into an error while running a deployment preview, to get additional information and logs about it, you can append the --debug argument to the webiny deploy command. For example:

yarn webiny deploy apps/api --env dev --preview --debug
This can significantly help in debugging underlying deployment (Pulumi) errors, since without it, in some cases the returned error report doesn’t contain enough useful information. We’ve also seen cases in which the report would actually be misleading and even incorrect, making the debugging process much harder for the user.