Skip to content

Instantly share code, notes, and snippets.

@Panzerbjrn
Created October 20, 2022 08:46
Show Gist options
  • Save Panzerbjrn/15c6c3535cbfc2ba70255f748430966c to your computer and use it in GitHub Desktop.
Save Panzerbjrn/15c6c3535cbfc2ba70255f748430966c to your computer and use it in GitHub Desktop.
var environmentConfigurationMap = {
Trial: {
StorageAccount: {
sku: {
name: 'Standard_B1ms'
}
}
}
}
resource vm 'Microsoft.Compute/virtualMachines@2021-11-01' = {
name: vmName
location: location
properties: {
hardwareProfile: {
vmSize: environmentConfigurationMap[environmentType].StorageAccount.sku
}
storageProfile: {
osDisk: {
createOption: 'FromImage'
managedDisk: {
storageAccountType: osDiskType
}
}
imageReference: {
publisher: 'Canonical'
offer: 'UbuntuServer'
sku: ubuntuOSVersion
version: 'latest'
}
}
networkProfile: {
networkInterfaces: [
{
id: nic.id
}
]
}
osProfile: {
computerName: vmName
adminUsername: adminUsername
adminPassword: password
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment