Using bicep to create a virtual machine, however from the research I have done, I believe I have made the right change however when the virtual machine is created, the security type remains as standard.
resource create_virtual_machine 'Microsoft.Compute/virtualMachines@2023-03-01' = {
name: vmName
location: location
tags: vmTags
identity: {
type: 'SystemAssigned'
}
properties: {
hardwareProfile: {
vmSize: vmSize
}
storageProfile: {
osDisk: {
createOption: 'fromImage'
managedDisk: {
storageAccountType: osDiskType
diskEncryptionSet: {
id: disk_encryption_set.id
}
}
deleteOption: osDiskDeleteOption
diskSizeGB: diskSizeGB
}
imageReference: {
publisher: 'MicrosoftWindowsServer'
offer: 'WindowsServer'
sku: OSVersion
version: 'latest'
}
}
networkProfile: {
networkInterfaces: [
{
id: networkInterface.id
properties: {
deleteOption: nicDeleteOption
}
}
]
}
osProfile: {
computerName: vmName
adminUsername: adminUsername
adminPassword: adminPassword
requireGuestProvisionSignal: true
allowExtensionOperations: allowExtensionOperations
windowsConfiguration: {
enableAutomaticUpdates: enableAutomaticUpdates
provisionVMAgent: true
patchSettings: {
enableHotpatching: enableHotpatching
patchMode: patchMode
}
}
}
diagnosticsProfile: {
bootDiagnostics: {
enabled: true
storageUri: storageUri
}
}
licenseType: 'Windows_Server'
priority: 'Regular'
extensionsTimeBudget: 'PT1H30M'
securityProfile: {
uefiSettings: {
secureBootEnabled: true
vTpmEnabled: true
}
encryptionAtHost: true
securityType: 'TrustedLaunch'
}
}
}
Not sure what is being done incorrectly here.
The setting below is supposed to set the security type, however its not working for me.
securityProfile: {
uefiSettings: {
secureBootEnabled: true
vTpmEnabled: true
}
encryptionAtHost: true
securityType: 'TrustedLaunch'
}
}