Repository for Azure Resource Policy built-in definitions and samples
MIT License
1.5k
stars
1.09k
forks
source link
Built-in policy "Configure Windows virtual machines to run Azure Monitor Agent with user-assigned managed identity-based authentication" does not accept values for "bringYourOwnUserAssignedManagedIdentity" #1259
Problem with Policy: "built-in-policies/policyDefinitions/Monitoring/AzureMonitor_Agent_Windows_VM_UAI_Deploy.json"
When I am trying to assign this policy with parameter "-bringYourOwnUserAssignedManagedIdentity" via the PowerShell Az Module (Version 11.1.0) and the command New-AzPolicyAssignment I always end up with the error "InvalidPolicyParameterType" - "The expected policy parameter type: 'Boolean'. The actual policy parameter type 'String'".
The error persists even if I try to cast the variable to boolean before. I tried the following variants in my code:
Problem with Policy: "built-in-policies/policyDefinitions/Monitoring/AzureMonitor_Agent_Windows_VM_UAI_Deploy.json"
When I am trying to assign this policy with parameter
"-bringYourOwnUserAssignedManagedIdentity"
via the PowerShell Az Module (Version 11.1.0) and the commandNew-AzPolicyAssignment
I always end up with the error"InvalidPolicyParameterType" - "The expected policy parameter type: 'Boolean'. The actual policy parameter type 'String'"
.The error persists even if I try to cast the variable to boolean before. I tried the following variants in my code:
[bool]::Parse("true")
[System.Convert]::ToBoolean("true")