Expand description
§Example Usage
§Router Route Policy Export
resources:
net:
type: gcp:compute:Network
properties:
name: my-network
autoCreateSubnetworks: false
subnet:
type: gcp:compute:Subnetwork
properties:
name: my-subnetwork
network: ${net.id}
ipCidrRange: 10.0.0.0/16
region: us-central1
router:
type: gcp:compute:Router
properties:
name: my-router
region: ${subnet.region}
network: ${net.id}
rp-export:
type: gcp:compute:RouterRoutePolicy
properties:
router: ${router.name}
region: ${router.region}
name: my-rp1
type: ROUTE_POLICY_TYPE_EXPORT
terms:
- priority: 1
match:
expression: destination == '10.0.0.0/12'
actions:
- expression: accept()
§Router Route Policy Import
resources:
net:
type: gcp:compute:Network
properties:
name: my-network
autoCreateSubnetworks: false
subnet:
type: gcp:compute:Subnetwork
properties:
name: my-subnetwork
network: ${net.id}
ipCidrRange: 10.0.0.0/16
region: us-central1
router:
type: gcp:compute:Router
properties:
name: my-router
region: ${subnet.region}
network: ${net.id}
rp-import:
type: gcp:compute:RouterRoutePolicy
properties:
name: my-rp2
router: ${router.name}
region: ${router.region}
type: ROUTE_POLICY_TYPE_IMPORT
terms:
- priority: 2
match:
expression: destination == '10.0.0.0/12'
actions:
- expression: accept()
§Import
RouterRoutePolicy can be imported using any of these accepted formats:
-
{{project}}/{{region}}/{{router}}/routePolicies/{{name}}
-
{{project}}/{{region}}/{{router}}/{{name}}
-
{{region}}/{{router}}/{{name}}
-
{{router}}/{{name}}
When using the pulumi import
command, RouterRoutePolicy can be imported using one of the formats above. For example:
$ pulumi import gcp:compute/routerRoutePolicy:RouterRoutePolicy default {{project}}/{{region}}/{{router}}/routePolicies/{{name}}
$ pulumi import gcp:compute/routerRoutePolicy:RouterRoutePolicy default {{project}}/{{region}}/{{router}}/{{name}}
$ pulumi import gcp:compute/routerRoutePolicy:RouterRoutePolicy default {{region}}/{{router}}/{{name}}
$ pulumi import gcp:compute/routerRoutePolicy:RouterRoutePolicy default {{router}}/{{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