We recommend using Azure Native.
Azure Classic v5.70.0 published on Wednesday, Mar 27, 2024 by Pulumi
Azure VM Scale Sets
We recommend using Azure Native.
Azure Classic v5.70.0 published on Wednesday, Mar 27, 2024 by Pulumi
This example provisions a Scale Set of Linux web servers with nginx deployed, configured the auto-scaling based on CPU load, puts a Load Balancer in front of them, and gives it a public IP address.
Prerequisites
- Node.js
- Download and install the Pulumi CLI
- Connect Pulumi with your Azure account (if your
az
CLI is configured, no further changes are required)
Running the App
Create a new stack:
$ pulumi stack init dev
Configure the app deployment.
$ pulumi config set azure:location westus # any valid Azure region will do
Optionally, configure the username and password for the admin user. Otherwise, they will be auto-generated.
$ pulumi config set adminUser webmaster $ pulumi config set adminPassword <your-password> --secret
Note that
--secret
ensures your password is encrypted safely.Login to Azure CLI (you will be prompted to do this during deployment if you forget this step):
$ az login
Restore NPM dependencies:
$ npm install
Run
pulumi up
to preview and deploy changes:$ pulumi up Previewing update: ... Updating: ... Resources: 13 created Update duration: 2m19s
Check the domain name of the PIP:
$ pulumi stack output publicAddress dsuv3vqbgi.westeurope.cloudapp.azure.com $ curl http://$(pulumi stack output publicAddress) #nginx welcome screen HTML is returned
We recommend using Azure Native.
Azure Classic v5.70.0 published on Wednesday, Mar 27, 2024 by Pulumi