google::compute-security-policy

Creates a security policy.

Example

google::compute-security-policy security-policy-example
    name: "security-policy-example"
    description: "security-policy-example-desc"

    rule
        description: "security-policy-example-rule-desc"
        priority: 2
        action: 'allow'
        preview: true

        match
            versioned-expr: 'SRC_IPS_V1'
            config
                src-ip-ranges: ['*']
            end
        end
    end
end

Attributes

Attribute Description
name The name of the security policy. The name must be 1-63 characters long and the 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. (Required)
description The description of the security policy.
rule list The rule of the security policy.
fingerprint The fingerprint for this security policy.

Outputs

Attribute Description
self-link The fully-qualified URL of the security policy.
default-rule The default rule for this security policy.