google::compute-resource-policy

Creates a resource policy.

Example

google::compute-resource-policy example-policy-alpha
    name: "example-policy-alpha"
    region: "us-central1"
    description: "Resource policy example alpha"

    snapshot-schedule-policy
        schedule
            weekly-schedule
                day-of-weeks
                    day: "FRIDAY"
                    start-time: "00:00"
                end
                day-of-weeks
                    day: "MONDAY"
                    start-time: "00:00"
                end
            end
        end

        retention-policy
            max-retention-days: 7
            on-source-disk-delete: "KEEP_AUTO_SNAPSHOTS"
        end

        snapshot-properties
            guest-flush: false
            labels: {
                "foo": "bar"
            }
             storage-locations: ["us-central1"]
        end
    end
end

Attributes

Attribute Description
region Name of the region.
name The name of the resource policy. Must be 1-63 characters, first character must be a lowercase letter and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
description Description for the resource policy.
snapshot-schedule-policy Resource policy for persistent disks for creating snapshots.

Outputs

Attribute Description
self-link Server-defined fully-qualified URL for this resource.