Skip to content

Add Aure Policy Metadata Version Support #869

Closed
@CZM89

Description

@CZM89

"Microsoft.Authorization/policyAssignments": "2020-03-01",

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

  •                 & $deploymentCommand @parameters
    
  •                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
  • CategoryInfo : NotSpecified: (:) [New-AzManagementGroupDeployment], Exception
  • FullyQualifiedErrorId : Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation.NewAzureManagementGroupDeploymentCmdlet

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"
},
......

Metadata

Metadata

Assignees

Labels

enhancementNew feature or requestresource-providerissue with resource schema for pulled resources

Type

No type

Projects

Status

Done

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions