azure.keyvault-secret
Key Vault Secret Resource
- example:
This policy will find all secrets that don’t have expiration date set
policies:
- name: keyvault-secrets
description:
List all secrets that don't have expiration date set
resource: azure.keyvault-secret
filters:
- type: value
key: attributes.expires
value: null
Filters
advisor-recommendation
Filter resources by Azure Advisor Recommendations
Select all categories with ‘all’
- example:
policies:
- name: disks-with-cost-recommendations
resource: azure.disk
filters:
- type: advisor-recommendation
category: Cost
key: '[].properties.recommendationTypeId'
op: contains
value: '48eda464-1485-4dcf-a674-d0905df5054a'
properties:
category:
type: string
default:
type: object
key:
type: string
op:
enum:
- eq
- equal
- ne
- not-equal
- gt
- greater-than
- ge
- gte
- le
- lte
- lt
- less-than
- glob
- regex
- regex-case
- in
- ni
- not-in
- contains
- difference
- intersect
- mod
tag_key_transforms:
items:
type: string
type: array
type:
enum:
- advisor-recommendation
value:
oneOf:
- type: array
- type: string
- type: boolean
- type: number
- type: 'null'
value_from:
additionalProperties: 'False'
properties:
expr:
oneOf:
- type: integer
- type: string
format:
enum:
- csv
- json
- txt
- csv2dict
headers:
patternProperties:
? ''
: type: string
type: object
query:
type: string
url:
type: string
required:
- url
type: object
value_path:
type: string
value_regex:
type: string
value_type:
enum:
- age
- integer
- expiration
- normalize
- size
- cidr
- cidr_size
- swap
- resource_count
- expr
- unique_size
- date
- version
- float
- duration
required:
- category
- type
Actions
update
Update a secret’s properties. This does not change the secret’s value.
expires_on and not_before require ISO formatted dates.
expires_in_days sets the expiration date relative to the time
the policy runs, and cannot be combined with expires_on.
tags are merged into the secret’s existing tags.
- example:
Set an expiration date one year out on all secrets without one
policies:
- name: keyvault-secret-set-expiration
resource: azure.keyvault-secret
filters:
- type: value
key: attributes.expires
value: null
actions:
- type: update
expires_in_days: 365
properties:
content_type:
type: string
enabled:
type: boolean
expires_in_days:
minimum: 1
type: integer
expires_on:
format: date-time
type: string
not_before:
format: date-time
type: string
tags:
type: object
type:
enum:
- update
required:
- type