Azure App Service with SQL Database and Application Insights | Java

View Code

Starting point for building web application hosted in Azure App Service.

Provisions Azure SQL Database and Azure Application Insights to be used in combination with App Service.

Running the App

  1. Create a new stack:

    $ pulumi stack init dev
  2. Login to Azure CLI (you will be prompted to do this during deployment if you forget this step):

    $ az login
  3. Set the Azure region location and sql password to use:

    $ pulumi config set azure-native:location westus
    $ pulumi config set azure-java-appservice-sql:sqlPassword <value> --secret
  4. Run pulumi up to preview and deploy changes:

    $ pulumi up
    Previewing changes:
    Performing changes:
        + 9 created
    Duration: 2m52s
  5. Check the deployed website endpoint:

    $ pulumi stack output endpoint
    $ curl "$(pulumi stack output endpoint)"
            <h1>This file is served from Blob Storage (courtesy of Pulumi!)</h1>