Deploying to the App Engine Flexible Environment

This document describes how to deploy an App Engine flexible application to the App Engine flexible environment from within IntelliJ IDEA.

Before you begin

  • Follow the Quickstart to install and set up IntelliJ IDEA if you have not already. Then return to this document.

  • Make sure you have the latest version of Java installed on your system.

  • To deploy to the flexible environment, you can use either IntelliJ IDEA Community Edition or Ultimate Edition.

Selecting an App Engine flexible app to deploy

You can create a new project or import an existing project to deploy to the App Engine flexible environment.

Creating a new project

To create a new project, you can use the IntelliJ New Project wizard to generate a template application that you can use as the start for your own application.

To create a new project:

  1. Choose File > New > Project to display the New Project wizard.

  2. Choose a project type in the left panel.

  3. Follow each step of the wizard.

  4. Enter a Project name.

  5. Enter a Project location if you do not want to keep the default.

  6. Update the fields in the More Settings section if you do not want to keep the defaults.

  7. Click Finish.

Checking out an existing project

You can check out your existing project in Cloud Source Repositories as follows:

  1. Choose VCS > Checkout from Version Control > Google Cloud.

  2. Screenshot showing the navigation to the
Source Code checkout menu option.
  3. In the Clone from Google Cloud dialog, select the Cloud Project associated with your project.
  4. Screenshot showing the dialog to checkout
source code.
  5. Select your Cloud Repository.
  6. Select the Parent Directory.
  7. Enter the Directory Name.
  8. Click Clone.

Downloading the Spring Boot app

If you do not have a project, you can download a Spring Boot sample app to complete the rest of these deployment procedures.

The rest of these instructions assume you are deploying the Spring Boot sample, but you can use the same steps to deploy your app.

To get the Spring Boot sample app repository, clone it to your local machine.

Open a new terminal on your machine and type:

git clone

To view the sample code, change to the directory that contains it:

cd gs-spring-boot/complete/

Deploying to the flexible environment

Deploy an App Engine project to the flexible environment:

  1. Configure the App Engine framework if you haven't done so already.

    IntelliJ should detect that you opened an App Engine application and prompt you to configure the framework.

    1. Right click the project.

    2. Choose Add Framework Support.

    3. Select the Google App Engine Flexible checkbox.

    4. Verify that the Cloud SDK directory field displays the correct path to where you installed the Cloud SDK.

    5. If the path is incorrect, click the ellipsis (...) to navigate to the correct location.

    6. If needed, select the Create app.yaml checkbox.

    7. Click OK.

      Now, your project is an App Engine flexible project.

  2. Choose Tools > Google Cloud Tools > Deploy to App Engine....

    The create Deployment Configuration dialog. Has fields for Name,
Server, Deployment, Project, Version, and app.yaml.

  3. Verify the server configuration:

    1. Click the ellipsis (...) next to the Server field.

    2. Verify Google App Engine displays.

    3. Verify that the Cloud SDK directory field displays the correct path to where you installed the Cloud SDK.

showing the available frameworks in the left panel. The right panel
shows the Name of the framework and directory to the Cloud SDK.

    4. Click OK.

  4. Select the Deployment type.

    If the project is a Maven project, specify Maven build as a deployment source, indicating that Maven will build the project and that output of this build deploys to Google Cloud Platform.

  5. Select a project in the Project field.

    The first time you configure the deployment, Intellij prompts you to sign in to the account associated with the Cloud Platform Console project that you want to deploy.

  6. In the App Engine Flexible Configuration section, select an app.yaml file from the drop-down menu.

    The drop-down menu to select an app.yaml file. An
Edit button is available to select a valid app.yaml file. An error appears
at the bottom of the dialog indicating that the selected app.yaml is not

    1. Click Edit if you don't have a valid app.yaml file.

    2. In the Project Structure dialog, you can navigate to a valid file or click the link to generate a new one.

      Dialog that shows the name of the project and
the framework associated with the project. There is a field with the
path to the app.yaml file. An error messages indicates that the selected
app.yaml file is not valid. A button with an ellipse is available to
select a new path. A link is available to create a new app.yaml file.
The drop-down menu to select an app.yaml file.

    3. Click OK when finished.

  7. Fill in other fields as needed to configure the deployment.

  8. Click Run to build and deploy your app.

  9. In the Application Servers window, click the name of your project to monitor its deployment progress. If the window is not displaying, click View > Tool Windows > Application Servers.

    After deployment completes, you can view your app's URL in the console output.

Deleting the server

If you ever want to delete the server you configured for your project, you can do so as follows:

  1. Choose File > Settings > Build, Execution, Deployment > Clouds.

    On Mac OS X, this is IntelliJ IDEA > Preferences > Build, Execution, Deployment > Clouds.

  2. Select your server (Google App Engine) and click the minus sign (-) at the top of the window to remove it.

  3. Click OK.

What's next

Monitor your resources on the go

Get the Google Cloud Console app to help you manage your projects.

Send feedback about...

Cloud Tools for IntelliJ