Skip to content

alzahedi/CloudInfra

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

overview

This repository contains bicep templates for deploying a azure vm scale set.

The template azurevmss-custom-script.bicep deploys an azure vmss and runs a custom script downloaded from github. We can then fetch output of the script using az vmss commands

Run deployment

  • Git clone the repo
  • Do an az login in a powershell terminal
  • Navigate to ./templates directory
  • Run az deployment group create --resource-group <your-resource-group-name> --template-file azurevmss-custom-script.bicep

Get Output

In order to get the output of the script run the below command

az vmss run-command invoke `
  --resource-group <your resource group name> `
  --name <your vmss name> `
  --instance-id <your vmss instance id> `
  --command-id RunPowerShellScript `
  --scripts "Get-Content C:\Scripts\script_output.log"

About

Small project to POC azure vmss with bicep

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors