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.
- .Net6
- Download and install the Pulumi CLI
- Connect Pulumi with your Azure account (if your
az
CLI is configured, no further changes are required)
-
Create a new stack:
$ pulumi stack init dev
-
Configure the app deployment.
$ pulumi config set azure-native:location australiaeast # any valid Azure region will do
-
Login to Azure CLI (you will be prompted to do this during deployment if you forget this step):
$ az login
-
Build .Net dependencies:
$ dotnet build
-
Run
pulumi up
to preview and deploy changes:$ pulumi up Previewing changes: ... Performing changes: ... info: 7 changes performed: + 7 resources created Update duration: 2m38s
-
Clean up
$ pulumi destory