azure.networkinterface

Network Interface Resource

example

This policy will get Network Interfaces that have User added routes.

policies:
  - name: get-nic-with-user-routes
    resource: azure.networkinterface
    filters:
      - type: effective-route-table
        key: routes.value[].source
        op: in
        value_type: swap
        value: User

Filters

effective-route-table

Filters network interfaces by the Effective Route Table

example

This policy will get Network Interfaces that have VirtualNetworkGateway and VNet hops.

policies:
  - name: virtual-network-gateway-hop
    resource: azure.networkinterface
    filters:
      - type: effective-route-table
        key: routes.value[?source == 'User'].nextHopType
        op: difference
        value:
          - Internet
          - None
          - VirtualAppliance
properties:
  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
  type:
    enum:
    - effective-route-table
  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
      url:
        type: string
    required:
    - url
    type: object
  value_regex:
    type: string
  value_type:
    enum:
    - age
    - integer
    - expiration
    - normalize
    - size
    - cidr
    - cidr_size
    - swap
    - resource_count
    - expr
    - unique_size
    - date
    - version
required:
- type