Expand description
§Example Usage
§Region Security Policy Basic
resources:
region-sec-policy-basic:
type: gcp:compute:RegionSecurityPolicy
properties:
name: my-sec-policy-basic
description: basic region security policy
type: CLOUD_ARMOR
§Region Security Policy With Ddos Protection Config
resources:
region-sec-policy-ddos-protection:
type: gcp:compute:RegionSecurityPolicy
properties:
name: my-sec-policy-ddos-protection
description: with ddos protection config
type: CLOUD_ARMOR_NETWORK
ddosProtectionConfig:
ddosProtection: ADVANCED_PREVIEW
§Region Security Policy With User Defined Fields
resources:
region-sec-policy-user-defined-fields:
type: gcp:compute:RegionSecurityPolicy
properties:
name: my-sec-policy-user-defined-fields
description: with user defined fields
type: CLOUD_ARMOR_NETWORK
userDefinedFields:
- name: SIG1_AT_0
base: UDP
offset: 8
size: 2
mask: 0x8F00
- name: SIG2_AT_8
base: UDP
offset: 16
size: 4
mask: 0xFFFFFFFF
§Region Security Policy With Rules
resources:
region-sec-policy-with-rules:
type: gcp:compute:RegionSecurityPolicy
properties:
name: my-sec-policy-with-rules
description: basic region security policy with multiple rules
type: CLOUD_ARMOR
rules:
- action: deny
priority: '1000'
match:
expr:
expression: request.path.matches("/login.html") && token.recaptcha_session.score < 0.2
- action: deny
priority: '2147483647'
match:
versionedExpr: SRC_IPS_V1
config:
srcIpRanges:
- '*'
description: default rule
§Import
RegionSecurityPolicy can be imported using any of these accepted formats:
-
projects/{{project}}/regions/{{region}}/securityPolicies/{{name}}
-
{{project}}/{{region}}/{{name}}
-
{{region}}/{{name}}
-
{{name}}
When using the pulumi import
command, RegionSecurityPolicy can be imported using one of the formats above. For example:
$ pulumi import gcp:compute/regionSecurityPolicy:RegionSecurityPolicy default projects/{{project}}/regions/{{region}}/securityPolicies/{{name}}
$ pulumi import gcp:compute/regionSecurityPolicy:RegionSecurityPolicy default {{project}}/{{region}}/{{name}}
$ pulumi import gcp:compute/regionSecurityPolicy:RegionSecurityPolicy default {{region}}/{{name}}
$ pulumi import gcp:compute/regionSecurityPolicy:RegionSecurityPolicy default {{name}}
Structs§
- Use builder syntax to set the inputs and finish with
build_struct()
.
Functions§
- Registers a new resource with the given unique name and arguments