I figured this out.
Name, is the deployment name itself and does not reference the module
name: 'deploy_automanage_${machineName}'
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Hi,
I converted the arm template into bicep from the link below, entered the machinename & configurationprofilename parameters and it works and I am able to deploy things.
https://learn.microsoft.com/en-us/azure/automanage/arm-deploy.
I'm struggling to understand how to create a module from this.
How would I go about referencing the name from the automanage module, I'm not really sure.
Any assistance would be appreciated
name: '${machineName}/Microsoft.Automanage/default'
Environment
/modules/automanage.bicep
param machineName string
param configurationProfileName string
resource machineName_Microsoft_Automanage_default 'Microsoft.Compute/virtualMachines/providers/configurationProfileAssignments@2022-05-04' = {
name: '${machineName}/Microsoft.Automanage/default'
properties: {
configurationProfile: configurationProfileName
}
}
/env/automanage/automanage.bicep
param machineName string
param configurationProfileName string
module automanage 'modules/automanage.bicep' = {
name:
params: {
configurationProfileName: configurationProfileName
machineName: machineName
}
}
/env/automanage/parameters.json
{
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentParameters.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"machineName": {
"value": "avddc01"
},
"configurationProfileName": {
"value": "/providers/Microsoft.Automanage/bestPractices/AzureBestPracticesDevTest"
}
}
}
I figured this out.
Name, is the deployment name itself and does not reference the module
name: 'deploy_automanage_${machineName}'