gcp.spanner-instance

Filters

Actions

delete

The action is used for spanner instances delete.

GCP action is https://cloud.google.com/spanner/docs/reference/rest/v1/projects.instances/delete

Example

policies:
  - name: gcp-spanner-instances-delete
    resource: gcp.spanner-instance
    filters:
      - type: value
        key: nodeCount
        op: gte
        value: 2
    actions:
      - type: delete
properties:
  type:
    enum:
    - delete
required:
- type

set

The action is used for spanner instances nodeCount patch.

GCP action is https://cloud.google.com/spanner/docs/reference/rest/v1/projects.instances/patch

Example

policies:
  - name: gcp-spanner-instances-change-node-count
    resource: gcp.spanner-instance
    filters:
      - type: value
        key: nodeCount
        op: gte
        value: 2
    actions:
      - type: set
        nodeCount: 1
properties:
  nodeCount:
    type: number
  type:
    enum:
    - set
required:
- nodeCount
- type