azure.resourcegroup

Resource Group Resource

example

Finds all Resource Groups in the subscription.

policies:
    - name: find-all-resource-groups
      resource: azure.resourcegroup
example

Find all Resource Groups that have no resources in the subscription.

policies:
  - name: test - azure
    resource: azure.resourcegroup
    filters:
      - type: empty-group
example

Delete all Resource Groups in the subscription tagged with ‘ShouldBeDeleted’.

Warning: Deleting a resource group will delete all resources inside the resource group.

policies:
  - name: test - azure
    resource: azure.resourcegroup
    filters:
        - tag:ShouldBeDeleted: present
    actions:
        - type: delete

Filters

empty-group

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

Actions

delete

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