Skip to content

Instantly share code, notes, and snippets.

@macroramesh6
Created January 9, 2026 05:52
Show Gist options
  • Select an option

  • Save macroramesh6/6271f596cef61ae45846c0c3950dddb8 to your computer and use it in GitHub Desktop.

Select an option

Save macroramesh6/6271f596cef61ae45846c0c3950dddb8 to your computer and use it in GitHub Desktop.
ADF SHIR Bicep
// ******************
// Virtual Machine //
// ******************
// Create Public IP
resource publicIP 'Microsoft.Network/publicIPAddresses@2021-05-01' = {
name: vmPublicIPName
location: location
properties: {
publicIPAllocationMethod: 'Static'
}
sku: {
name: 'Standard'
tier:'Regional'
}
tags: tags
}
// Create Network Interface
resource nic 'Microsoft.Network/networkInterfaces@2021-05-01' = {
name: vmNicName
location: location
properties: {
ipConfigurations: [
{
name: 'ipconfig1'
properties: {
privateIPAllocationMethod: 'Dynamic'
subnet: {
id: vnetSubnetId
}
publicIPAddress: {
id: publicIP.id
}
}
}
]
}
tags:tags
}
// Create Windows VM
resource vm 'Microsoft.Compute/virtualMachines@2021-07-01' = {
name: vmName
location: location
properties: {
hardwareProfile: {
vmSize: vmSize
}
osProfile: {
computerName: vmName
adminUsername: adminUsername
adminPassword: adminPassword
}
storageProfile: {
imageReference: {
publisher: 'microsoftwindowsdesktop'
offer: 'windows-11'
sku: 'win11-22h2-entn'
version: 'latest'
}
osDisk: {
caching: 'ReadWrite'
createOption: 'FromImage'
}
}
networkProfile: {
networkInterfaces: [
{
id: nic.id
}
]
}
}
tags: tags
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment