/pulumi-101

Playground for Pulumi

Primary LanguageC#

Web Server Using Azure Virtual Machine with health check

This example provisions a Linux web server in an Azure Virtual Machine and gives it a public IP address. It also creates an application insights instance with a web test against the public IP address.

Prerequisites

Running the App

  1. Create a new stack:

    $ pulumi stack init dev
    
  2. Configure the app deployment.

    $ pulumi config set azure-native:location australiaeast    # any valid Azure region will do
    
  3. Login to Azure CLI (you will be prompted to do this during deployment if you forget this step):

    $ az login
    
  4. Build .Net dependencies:

    $ dotnet build
    
  5. Run pulumi up to preview and deploy changes:

    $ pulumi up
    Previewing changes:
    ...
    
    Performing changes:
    ...
    info: 7 changes performed:
        + 7 resources created
    Update duration: 2m38s
    
  6. Clean up

    $ pulumi destory