An Azure service that is used to automate, configure, and install updates across hybrid environments.
protectedSettings.configurationArguments
he issue is most likely the DSC extension schema, not the Automation Account URL/key.
In your Bicep, you are putting these values inside:
settings.configuration
But settings.configuration is not where RegistrationUrl, RegistrationKey or NodeConfigurationName should go. That block must define the DSC configuration package to execute, using fields like url, script and function. DSC extension schema shows configuration.url, configuration.script and configuration.function while parameters go under configurationArguments.
https://learn.microsoft.com/en-us/azure/virtual-machines/extensions/dsc-template
Because your configuration block does not contain a valid script/package, the handler logs a DSC configuration was not provided, so it enables DSC locally and exits without registering the node.
resource resDcDscExtension 'Microsoft.Compute/virtualMachines/extensions@2023-09-01' = {
parent: resDcVm
name: 'Dsc-Extension-Dc01'
location: parLocation
properties: {
publisher: 'Microsoft.Powershell'
type: 'DSC'
typeHandlerVersion: '2.77'
autoUpgradeMinorVersion: true
settings: {
wmfVersion: 'latest'
configuration: {
url: parRegistrationMetaConfigZipUrl
script: 'RegistrationMetaConfigV2.ps1'
function: 'RegistrationMetaConfigV2'
}
configurationArguments: {
RegistrationUrl: varRegistrationUrl
NodeConfigurationName: 'createDomain.Localhost'
ConfigurationMode: 'ApplyAndMonitor'
ConfigurationModeFrequencyMins: 15
RefreshFrequencyMins: 30
RebootNodeIfNeeded: false
ActionAfterReboot: 'ContinueConfiguration'
AllowModuleOverwrite: true
}
privacy: {
dataCollection: 'disable'
}
}
protectedSettings: {
configurationArguments: {
RegistrationKey: {
userName: 'NOT_USED'
password: varRegistrationKey
}
}
}
}
}
The important change is:
RegistrationUrl
NodeConfigurationName
ConfigurationMode
RefreshFrequencyMins
should be under:
settings.configurationArguments
and the registration key should be under:
protectedSettings.configurationArguments