Azure / Azure/bicep-registry-modules
[AVM Module Issue]: Enhance documentation and input validation of Intune-enrollment property
- 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.11.0
### Description
I was assisting in a scenario where there was issues getting AVD session hosts enrolled into Intune when deploying them using Bicep.
After testing the Bicep-template being used (which leverages the res/compute/virtual-machine module), I found that the mdmId-property was not specified at the correct location - which is this:
```
extensionAadJoinConfig: {
enabled: true
settings: {
mdmId: '0000000a-0000-0000-c000-000000000000'
}
}
```
It was defined like this:
```
extensionAadJoinConfig: {
enabled: true
mdmId: '0000000a-0000-0000-c000-000000000000'
}
```
The invalid syntax did not produce any errors, but the Intune-enrollment simply didn`t work.
Looking at the documentation for the module, the syntax which was being leveraged seemed correct:
| Parameter | Type | Description |
| :-- | :-- | :-- |
| [`extensionAadJoinConfig`](#parameter-extensionaadjoinconfig) | object | The configuration for the [AAD Join] extension. Must at least contain the ["enabled": true] property to be executed. To enroll in Intune, add the setting mdmId: "0000000a-0000-0000-c000-000000000000". |
However, looking at the code for the module, I noticed that the setting needs to be defined inside of a settings-block.
Any thoughts on how we could enhance the user experience?
In addition to updating the documentation, would leveraging user defined types for input validation be an option?
### (Optional) Correlation Id
_No response_
Contributor guide
Assessment
This issue has not been assessed yet.