ForwardingRule
A resource of the GCP provider, version 0.2.0, in its Load Balancing group. Import it with:
import ForwardingRule from "gcp/loadbalancing"Example
resource ForwardingRule example {
name = "example-value"
target = "example-value"
portRange = "example-value"
ipProtocol = "TCP"
loadBalancingScheme = "EXTERNAL"
network = "example-value"
subnetwork = "example-value"
region = "example-value"
labels = "..."
description = "example-value"
}Properties
Set by your code in the resource block. A required one must be set; any other you leave out takes the value under Default, if it has one.
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
name | string | — | No | The name of the forwarding rule |
target | string | — | No | The target resource URL (target pool, proxy, or backend service) |
portRange | string | — | No | The port range for this forwarding rule (e.g., '80', '8080-8090') |
ipProtocol | string | "TCP" | No | The IP protocol for this forwarding rule Allowed: "TCP", "UDP", "ESP", "AH", "SCTP", "ICMP" |
loadBalancingScheme | string | "EXTERNAL" | No | The load balancing scheme Allowed: "EXTERNAL", "EXTERNAL_MANAGED", "INTERNAL", "INTERNAL_MANAGED", "INTERNAL_SELF_MANAGED" |
network | string | — | No | The VPC network for internal load balancers |
subnetwork | string | — | No | The subnetwork for internal load balancers |
region | string | — | No | The GCP region for this forwarding rule (regional rules only) |
labels | object | — | No | Labels to apply to the forwarding rule |
description | string | — | No | An optional description |
Set by GCP after the resource is created: your code can read them but not set them. An importable one identifies an existing resource.
| Name | Type | Importable | Description |
|---|---|---|---|
forwardingRuleId | string | Yes | The unique ID of the forwarding rule |
selfLink | string | No | The self-link URL of the forwarding rule |
ipAddress | string | No | The IP address assigned to this forwarding rule |