library
turbot/gcp
Get Involved
Version
Pipeline: Create VPC Firewall Rule
This pipeline is used to create firewall rules to allow/deny incoming/outgoing traffic.
Run the pipeline
To run this pipeline from your terminal:
flowpipe pipeline run gcp.pipeline.create_vpc_firewall_rule \ --arg 'project_id=<string>' \ --arg 'firewall_rule_name=<string>' \ --arg 'network_name=<string>'
Use this pipeline
To call this pipeline from your pipeline, use a step:
step "pipeline" "step_name" { pipeline = gcp.pipeline.create_vpc_firewall_rule args = { project_id = <string> firewall_rule_name = <string> network_name = <string> }}
Params
Name | Type | Required | Description | Default |
---|---|---|---|---|
conn | connection.gcp | Yes | Name of GCP connection to use. If not provided, the default GCP connection will be used. | connection.gcp.default |
project_id | string | Yes | The GCP project ID. | - |
firewall_rule_name | string | Yes | The name of the firewall rule to create. | - |
network_name | string | Yes | The name of the network to which the rule applies. | - |
allowed_ports | list(string) | No | Comma-separated list of allowed ports and protocols (e.g., tcp:80,udp:53). | - |
source_ranges | list(string) | No | Comma-separated list of source IP ranges (CIDR format) allowed by the rule. | - |
priority | string | No | Priority for the firewall rule. | - |
rules | list(string) | No | A list of protocols and ports to which the firewall rule will apply. | - |
action | string | No | The action for the firewall rule: whether to allow or deny matching traffic. | - |
direction | string | No | The direction of traffic to which the firewall rule applies. | - |
Outputs
Name | Description |
---|---|
firewall_rule | Information about the created firewall rule. |