gcp.compute resources

gcp.disk

Filters

Actions

snapshot

Invoke an api call on each resource.

Quite a number of procedural actions are simply invoking an api call on a filtered set of resources. The exact handling is mostly boilerplate at that point following an 80/20 rule. This class is an encapsulation of the 80%.

properties:
  type:
    enum:
    - snapshot
required:
- type

gcp.image

Filters

Actions

delete

Invoke an api call on each resource.

Quite a number of procedural actions are simply invoking an api call on a filtered set of resources. The exact handling is mostly boilerplate at that point following an 80/20 rule. This class is an encapsulation of the 80%.

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

gcp.instance

Actions

delete

Invoke an api call on each resource.

Quite a number of procedural actions are simply invoking an api call on a filtered set of resources. The exact handling is mostly boilerplate at that point following an 80/20 rule. This class is an encapsulation of the 80%.

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

start

Invoke an api call on each resource.

Quite a number of procedural actions are simply invoking an api call on a filtered set of resources. The exact handling is mostly boilerplate at that point following an 80/20 rule. This class is an encapsulation of the 80%.

properties:
  type:
    enum:
    - start
required:
- type

stop

Invoke an api call on each resource.

Quite a number of procedural actions are simply invoking an api call on a filtered set of resources. The exact handling is mostly boilerplate at that point following an 80/20 rule. This class is an encapsulation of the 80%.

properties:
  type:
    enum:
    - stop
required:
- type

gcp.loadbalancer-backend-bucket

GCP resource: https://cloud.google.com/compute/docs/reference/rest/v1/backendBuckets

Filters

Actions

delete

The action is used for Load Balancing Backend Buckets delete. GCP action is https://cloud.google.com/compute/docs/reference/rest/v1/backendBuckets/delete.

Example:

policies:
  - name: gcp-loadbalancer-backend-buckets-delete
    resource: gcp.loadbalancer-backend-bucket
    filters:
      - type: value
        key: bucketName
        op: eq
        value: custodian-bucket-0
    actions:
      - type: delete
properties:
  type:
    enum:
    - delete
required:
- type

gcp.loadbalancer-global-forwarding-rule

GCP resource: https://cloud.google.com/compute/docs/reference/rest/v1/forwardingRules

Filters

gcp.router

GCP resource: https://cloud.google.com/compute/docs/reference/rest/v1/routers

Filters

Actions

delete

Deletes a router

Example

policies:
  - name: gcp-network-unattached-routers
    description: Deletes unattached Cloud Routers
    resource: gcp.router
    filters:
       - type: value
         key: interfaces
         value: absent
    actions:
       - delete
properties:
  type:
    enum:
    - delete
required:
- type

gcp.snapshot

Filters

Actions

delete

Invoke an api call on each resource.

Quite a number of procedural actions are simply invoking an api call on a filtered set of resources. The exact handling is mostly boilerplate at that point following an 80/20 rule. This class is an encapsulation of the 80%.

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

gcp.subnet

GCP resource: https://cloud.google.com/compute/docs/reference/rest/v1/subnetworks

Filters

Actions

set-flow-log

Enable vpc flow logs on a subnet.

example

Enable flow logs on all subnets

properties:
  state:
    default: true
    type: boolean
  type:
    enum:
    - set-flow-log
required:
- type

set-gcp-private

Enable/Disable GCP Private IP Access for a subnet

properties:
  state:
    default: true
    type: boolean
  type:
    enum:
    - set-gcp-private
required:
- type