Azure / Azure/bicep-registry-modules
[AVM Module Issue]: Unable to set 'secureBootEnabled' and 'vTpmEnabled' parameters to 'true' for Azure Virtual Machines with 'securityType' of 'ConfidentialVM'
- Dominant language
- Bicep
- Stars
- 736
- Forks
- 564
- Avg merge
- 3d 15h
- Merged PRs (30d)
- 30
Description
### Check for previous/existing GitHub issues
- [x] I have checked for previous/existing GitHub issues
### Issue Type?
Bug
### Module Name
avm/res/compute/virtual-machine
### (Optional) Module Version
0.16
### Description
Azure Virtual Machines (VMs) using the `'ConfidentialVM'` `securityType` require both `secureBootEnabled` and `vTpmEnabled` parameters to be set to `true` for a VM's `uefiSettings`.
Currently, this is only possible for VMs with `securityType` `'TrustedLaunch'`, see reference:
https://github.com/Azure/bicep-registry-modules/blob/b82aee5cc4bd0f8ca9097db802b8baf3d1bd6320/avm/res/compute/virtual-machine/main.bicep#L561-L567
A change must be applied to enable the creation of VMs with the `'ConfidentialVM'` `securityType` with both `secureBootEnabled` and `vTpmEnabled` set to `true` for the VM's `uefiSettings`, e.g.
```
uefiSettings: (securityType == 'TrustedLaunch' || securityType == 'ConfidentialVM')
? {
secureBootEnabled: secureBootEnabled
vTpmEnabled: vTpmEnabled
}
: null
}
```
### (Optional) Correlation Id
_No response_
Contributor guide
Assessment
This issue has not been assessed yet.