-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Not using mode when redeploying #10
Comments
They. Thanks for posting. The reason it is not set on redeployment is, because the cmdlet Set-AzureRmPolicyDefinition does not support the parameter "Mode" in version 5.7.0 for AzureRM. And at the time of writing the agents did not support a newer Version. I need to check, how I can improve this. |
Thanks! Maybe you can give it a rating if you like it. :-D Do you have any improvement ideas that you would like to have? |
Currently updating(PR: #12) the extension to support the Az module instead of AzureRM. Also splitting up definitions and initiatives. |
Describe the bug
When re-deploying policies spliited deployment, mode is not used.
When policy initially is deployed mode is set to all, this setting is not used when redeployed.
In the DeploySplittedPolicyDefinition.ps1 i found the following contruct:
if($policy){
Write-Output "Policy '$Name' exists and will be updated."
$policy = Set-AzureRmPolicyDefinition @scope @policyParameter
}else{
Write-Output "Policy '$Name' does not exist and will be created."
$policyParameter.Mode = $Mode
$policy = New-AzureRmPolicyDefinition @scope @policyParameter
}
I think mode is not set, when policy exists?
The text was updated successfully, but these errors were encountered: