-
Notifications
You must be signed in to change notification settings - Fork 166
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
Add Aure Policy Metadata Version Support #869
Comments
Hi @CZM89, thanks for reporting this. Lets see if I understand your ask. You would like to use the version property in the metadata field like this: And if you attempt to do that currently with AzOps you get an error during Push like below: Just like the error points out currently AzOps is utilizing a API version I will add this item as a feature request. |
Hi @JenniferKlaveren, the This behavior is not related to AzOps but a constraint of the resource provider. Re-produce the error by following the referenced link and test out the API However as mentioned in my earlier response the |
Hi @Jefajers ... we have been running into this same issue as the API version is '2020-03-01'. After a pull the role definition has been updated to include the version information from the current API version of '2023-04-01'. With a modification to the role definition and a subsequent push ARM fails with a similar error mentioned in the original post
I think your suggestion of bumping the API version might help to address this issue. I believe the title of the issue suggests a different problem (or the one we are experiencing is different ;-) ). I am learning more about AzOps and was wondering about the effort involved in modifying the API version to '2023-04-01'? |
Hi @Jefajers , As my colleague stated I was away for a while. I'm back and and although I agree that indeed this is also an issue with the resource provider (not being able to manipulate that property even with using the correct API version) it would really be helpful to not have the API version hardcoded in the AzOps module, but rather make that a usable parameter when we use Invoke-AzOpsPush. I hope this ends up on a roadmap somewhere. 🤞 |
Hi @bkeyser, weclome. The updated api version that this issue relates to, has been addressed recently in AzOps 2.6.1 and is referenced in PR #872. If you are running |
Thanks @CZM89 for confirming the situation, I agree it would be an improvement to avoid this hardcoded parameter. There is already a suggested feature improvement #776 to the policy templates that would address this part. I will close this issue for now and we can track it in #776. |
AzOps/src/data/template/template.json
Line 90 in 2451859
During a deployment using Invoke-AzOpsPush for a policy definition we get this error:
New-AzManagementGroupDeployment : 3:52:48 PM - The deployment 'AzOps-microsoft.authorization_policydefinitions-aab-logic-a-16FA' failed with error(s). Showing 1 out of 1 error(s).
Status Message: The property 'version' is not supported in API version '2020-03-01'. Please use API version '2023-04-01' or higher. (Code:UnsupportedApiVersion)
CorrelationId: 6a557bf5-b5ed-4ea4-8ef0-165ff0e56e8a
At C:\a\1\Modules\AzOps\2.4.0\AzOps.psm1:2886 char:21
Some more information, in our Policy definition we want to use a property called 'version' that we have nested under metadata. We use these properties for internal management and additional actions.
.....
properties": {
"description": ".",
"displayName": "",
"metadata": {
"category": "",
"validation": "true",
"version": "1.1.1"
},
......
The text was updated successfully, but these errors were encountered: