azure.appserviceplan

Application Service Plan

example

Find all App Service Plans that are of the Basic sku tier.

policies:
  - name: basic-tier-plans
    resource: azure.appserviceplan
    filters:
      - type: value
        key: sku.tier
        op: eq
        value: Basic

Actions

resize-plan

Resize App Service Plans

example

Resize App Service Plan to F1 plan with 1 instance.

policies:
- name: azure-resize-plan
  resource: azure.appserviceplan
  actions:
   - type: resize-plan
     size: F1
     count: 1
example

Resize app service plans with on/off hours and resource tagging

policies:
  - name: on-hours
    resource: azure.appserviceplan
    filters:
      - type: onhour
        default_tz: pt
        onhour: 8
        tag: onoffhour_schedule
    actions:
      - type: resize-plan
        size:
            type: resource
            key: tags.on_hour_sku
            default-value: P1

  - name: off-hours
    resource: azure.appserviceplan
    filters:
      - type: offhour
        default_tz: pt
        offhour: 19
        tag: onoffhour_schedule
    actions:
      - type: tag
        tag: on_hour_sku
        value:
            type: resource
            key: sku.name
      - type: resize-plan
        size:
            size: S1
properties:
  count:
    oneOf:
    - oneOf:
      - additionalProperties: false
        properties:
          default-value: &id001
            type: integer
          key:
            type: string
          type:
            enum:
            - resource
            type: string
        required:
        - type
        - key
      type: object
    - *id001
  size:
    oneOf:
    - oneOf:
      - additionalProperties: false
        properties:
          default-value: &id002
            enum:
            - F1
            - B1
            - B2
            - B3
            - D1
            - S1
            - S2
            - S3
            - P1
            - P2
            - P3
            - P1V2
            - P2V2
            - P3v2
            - PC2
            - PC3
            - PC4
            type: string
          key:
            type: string
          type:
            enum:
            - resource
            type: string
        required:
        - type
        - key
      type: object
    - *id002
  type:
    enum:
    - resize-plan
required:
- type