Resource Groups

Filters

  • Standard Value Filter (see Generic Filters)
  • ARM Resource Filters (see Generic Filters)
    • Tag Filter - Filter on tag presence and/or values

    • Marked-For-Op Filter - Filter on tag that indicates a scheduled operation for a resource

  • empty-group Filter based on empty resource groups

    properties:
      type:
        enum:
        - empty-group
    required:
    - type
    

Actions

  • ARM Resource Actions (see Generic Actions)

  • delete Delete a resource group

    properties:
      type:
        enum:
        - delete
    required:
    - type
    

Example Policies

This policy will delete all empty resource groups

policies:
  - name: delete-empty-groups
    resource: azure.resourcegroup
    filters:
     - type: empty-group
    actions:
     - type: delete