question

NaveenBegurnagaraj-6327 avatar image
0 Votes"
NaveenBegurnagaraj-6327 asked sikumars answered

To know the azure policy alias/type name for Azure key vault certificate activities

Some built-in azure policies are available to work on Azure key vault certificates, but all are in Preview and some limitation to use in Azure devops pipeline, due to this Am unable to use in Azure devops pipeline.

I need your support to create a new custom azure policies to monitor Azure key vault certificates for that I need the vault certificate azure policy alias names


Example:

In built-in azure policy type has used is

"field": "type",
"equals": "Microsoft.KeyVault.Data/vaults/certificates"

When I try to use the same type while creating custom azure policies it shows error message type is not exists.
Error message while creating custom azure policies for certificates:

The policy definition '19cdee8d-b052-41de-9f13-d584f0ed5c37' rule is invalid. The provider 'Microsoft.KeyVault.Data' referenced by the 'field' property 'Microsoft.KeyVault.Data/vaults/certificates/properties.validityInMonths' of the policy rule doesn't exist.


Please let me know the proper custom type for certificate

azure-key-vault
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

NaveenBegurnagaraj-6327 avatar image
0 Votes"
NaveenBegurnagaraj-6327 answered

I tried to duplicate the built-in function, but it failed with mentioned error message

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

sikumars avatar image
0 Votes"
sikumars answered

Hello @NaveenBegurnagaraj-6327,

Thanks for reaching out and apologize for delayed response.

Data plane policies such as Microsoft.KeyVault.Data PR (resource provider) modes only supported as a preview and can not be used with custom policy at the moment.

More information:
https://docs.microsoft.com/en-us/azure/governance/policy/concepts/definition-structure#resource-provider-modes


Please "Accept the answer" if the information helped you. This will help us and others in the community as well.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.