1. Packages
  2. Google Cloud (GCP) Classic
  3. API Docs
  4. compute
  5. getForwardingRule
Google Cloud Classic v7.28.0 published on Friday, Jun 21, 2024 by Pulumi

gcp.compute.getForwardingRule

Explore with Pulumi AI

gcp logo
Google Cloud Classic v7.28.0 published on Friday, Jun 21, 2024 by Pulumi

    Get a forwarding rule within GCE from its name.

    Example Usage

    data "google_compute_forwarding_rule" "my-forwarding-rule" {
      name = "forwarding-rule-us-east1"
    }
    

    Using getForwardingRule

    Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

    function getForwardingRule(args: GetForwardingRuleArgs, opts?: InvokeOptions): Promise<GetForwardingRuleResult>
    function getForwardingRuleOutput(args: GetForwardingRuleOutputArgs, opts?: InvokeOptions): Output<GetForwardingRuleResult>
    def get_forwarding_rule(name: Optional[str] = None,
                            project: Optional[str] = None,
                            region: Optional[str] = None,
                            opts: Optional[InvokeOptions] = None) -> GetForwardingRuleResult
    def get_forwarding_rule_output(name: Optional[pulumi.Input[str]] = None,
                            project: Optional[pulumi.Input[str]] = None,
                            region: Optional[pulumi.Input[str]] = None,
                            opts: Optional[InvokeOptions] = None) -> Output[GetForwardingRuleResult]
    func LookupForwardingRule(ctx *Context, args *LookupForwardingRuleArgs, opts ...InvokeOption) (*LookupForwardingRuleResult, error)
    func LookupForwardingRuleOutput(ctx *Context, args *LookupForwardingRuleOutputArgs, opts ...InvokeOption) LookupForwardingRuleResultOutput

    > Note: This function is named LookupForwardingRule in the Go SDK.

    public static class GetForwardingRule 
    {
        public static Task<GetForwardingRuleResult> InvokeAsync(GetForwardingRuleArgs args, InvokeOptions? opts = null)
        public static Output<GetForwardingRuleResult> Invoke(GetForwardingRuleInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetForwardingRuleResult> getForwardingRule(GetForwardingRuleArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: gcp:compute/getForwardingRule:getForwardingRule
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Name string
    The name of the forwarding rule.


    Project string
    The project in which the resource belongs. If it is not provided, the provider project is used.
    Region string
    The region in which the resource belongs. If it is not provided, the project region is used.
    Name string
    The name of the forwarding rule.


    Project string
    The project in which the resource belongs. If it is not provided, the provider project is used.
    Region string
    The region in which the resource belongs. If it is not provided, the project region is used.
    name String
    The name of the forwarding rule.


    project String
    The project in which the resource belongs. If it is not provided, the provider project is used.
    region String
    The region in which the resource belongs. If it is not provided, the project region is used.
    name string
    The name of the forwarding rule.


    project string
    The project in which the resource belongs. If it is not provided, the provider project is used.
    region string
    The region in which the resource belongs. If it is not provided, the project region is used.
    name str
    The name of the forwarding rule.


    project str
    The project in which the resource belongs. If it is not provided, the provider project is used.
    region str
    The region in which the resource belongs. If it is not provided, the project region is used.
    name String
    The name of the forwarding rule.


    project String
    The project in which the resource belongs. If it is not provided, the provider project is used.
    region String
    The region in which the resource belongs. If it is not provided, the project region is used.

    getForwardingRule Result

    The following output properties are available:

    AllPorts bool
    AllowGlobalAccess bool
    AllowPscGlobalAccess bool
    BackendService string
    BaseForwardingRule string
    CreationTimestamp string
    Description string
    EffectiveLabels Dictionary<string, string>
    Id string
    The provider-assigned unique ID for this managed resource.
    IpAddress string
    IpProtocol string
    IpVersion string
    IsMirroringCollector bool
    LabelFingerprint string
    Labels Dictionary<string, string>
    LoadBalancingScheme string
    Name string
    Network string
    NetworkTier string
    NoAutomateDnsZone bool
    PortRange string
    Ports List<string>
    PscConnectionId string
    PscConnectionStatus string
    PulumiLabels Dictionary<string, string>
    RecreateClosedPsc bool
    SelfLink string
    ServiceDirectoryRegistrations List<GetForwardingRuleServiceDirectoryRegistration>
    ServiceLabel string
    ServiceName string
    SourceIpRanges List<string>
    Subnetwork string
    Target string
    Project string
    Region string
    AllPorts bool
    AllowGlobalAccess bool
    AllowPscGlobalAccess bool
    BackendService string
    BaseForwardingRule string
    CreationTimestamp string
    Description string
    EffectiveLabels map[string]string
    Id string
    The provider-assigned unique ID for this managed resource.
    IpAddress string
    IpProtocol string
    IpVersion string
    IsMirroringCollector bool
    LabelFingerprint string
    Labels map[string]string
    LoadBalancingScheme string
    Name string
    Network string
    NetworkTier string
    NoAutomateDnsZone bool
    PortRange string
    Ports []string
    PscConnectionId string
    PscConnectionStatus string
    PulumiLabels map[string]string
    RecreateClosedPsc bool
    SelfLink string
    ServiceDirectoryRegistrations []GetForwardingRuleServiceDirectoryRegistration
    ServiceLabel string
    ServiceName string
    SourceIpRanges []string
    Subnetwork string
    Target string
    Project string
    Region string
    allPorts Boolean
    allowGlobalAccess Boolean
    allowPscGlobalAccess Boolean
    backendService String
    baseForwardingRule String
    creationTimestamp String
    description String
    effectiveLabels Map<String,String>
    id String
    The provider-assigned unique ID for this managed resource.
    ipAddress String
    ipProtocol String
    ipVersion String
    isMirroringCollector Boolean
    labelFingerprint String
    labels Map<String,String>
    loadBalancingScheme String
    name String
    network String
    networkTier String
    noAutomateDnsZone Boolean
    portRange String
    ports List<String>
    pscConnectionId String
    pscConnectionStatus String
    pulumiLabels Map<String,String>
    recreateClosedPsc Boolean
    selfLink String
    serviceDirectoryRegistrations List<GetForwardingRuleServiceDirectoryRegistration>
    serviceLabel String
    serviceName String
    sourceIpRanges List<String>
    subnetwork String
    target String
    project String
    region String
    allPorts boolean
    allowGlobalAccess boolean
    allowPscGlobalAccess boolean
    backendService string
    baseForwardingRule string
    creationTimestamp string
    description string
    effectiveLabels {[key: string]: string}
    id string
    The provider-assigned unique ID for this managed resource.
    ipAddress string
    ipProtocol string
    ipVersion string
    isMirroringCollector boolean
    labelFingerprint string
    labels {[key: string]: string}
    loadBalancingScheme string
    name string
    network string
    networkTier string
    noAutomateDnsZone boolean
    portRange string
    ports string[]
    pscConnectionId string
    pscConnectionStatus string
    pulumiLabels {[key: string]: string}
    recreateClosedPsc boolean
    selfLink string
    serviceDirectoryRegistrations GetForwardingRuleServiceDirectoryRegistration[]
    serviceLabel string
    serviceName string
    sourceIpRanges string[]
    subnetwork string
    target string
    project string
    region string
    allPorts Boolean
    allowGlobalAccess Boolean
    allowPscGlobalAccess Boolean
    backendService String
    baseForwardingRule String
    creationTimestamp String
    description String
    effectiveLabels Map<String>
    id String
    The provider-assigned unique ID for this managed resource.
    ipAddress String
    ipProtocol String
    ipVersion String
    isMirroringCollector Boolean
    labelFingerprint String
    labels Map<String>
    loadBalancingScheme String
    name String
    network String
    networkTier String
    noAutomateDnsZone Boolean
    portRange String
    ports List<String>
    pscConnectionId String
    pscConnectionStatus String
    pulumiLabels Map<String>
    recreateClosedPsc Boolean
    selfLink String
    serviceDirectoryRegistrations List<Property Map>
    serviceLabel String
    serviceName String
    sourceIpRanges List<String>
    subnetwork String
    target String
    project String
    region String

    Supporting Types

    GetForwardingRuleServiceDirectoryRegistration

    Namespace string
    Service Directory namespace to register the forwarding rule under.
    Service string
    Service Directory service to register the forwarding rule under.
    Namespace string
    Service Directory namespace to register the forwarding rule under.
    Service string
    Service Directory service to register the forwarding rule under.
    namespace String
    Service Directory namespace to register the forwarding rule under.
    service String
    Service Directory service to register the forwarding rule under.
    namespace string
    Service Directory namespace to register the forwarding rule under.
    service string
    Service Directory service to register the forwarding rule under.
    namespace str
    Service Directory namespace to register the forwarding rule under.
    service str
    Service Directory service to register the forwarding rule under.
    namespace String
    Service Directory namespace to register the forwarding rule under.
    service String
    Service Directory service to register the forwarding rule under.

    Package Details

    Repository
    Google Cloud (GCP) Classic pulumi/pulumi-gcp
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the google-beta Terraform Provider.
    gcp logo
    Google Cloud Classic v7.28.0 published on Friday, Jun 21, 2024 by Pulumi