gcp.compute.getGlobalForwardingRule
Explore with Pulumi AI
Get a global forwarding rule within GCE from its name.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const my_forwarding_rule = gcp.compute.getGlobalForwardingRule({
    name: "forwarding-rule-global",
});
import pulumi
import pulumi_gcp as gcp
my_forwarding_rule = gcp.compute.get_global_forwarding_rule(name="forwarding-rule-global")
package main
import (
	"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/compute"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := compute.LookupGlobalForwardingRule(ctx, &compute.LookupGlobalForwardingRuleArgs{
			Name: "forwarding-rule-global",
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;
return await Deployment.RunAsync(() => 
{
    var my_forwarding_rule = Gcp.Compute.GetGlobalForwardingRule.Invoke(new()
    {
        Name = "forwarding-rule-global",
    });
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.compute.ComputeFunctions;
import com.pulumi.gcp.compute.inputs.GetGlobalForwardingRuleArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }
    public static void stack(Context ctx) {
        final var my-forwarding-rule = ComputeFunctions.getGlobalForwardingRule(GetGlobalForwardingRuleArgs.builder()
            .name("forwarding-rule-global")
            .build());
    }
}
variables:
  my-forwarding-rule:
    fn::invoke:
      function: gcp:compute:getGlobalForwardingRule
      arguments:
        name: forwarding-rule-global
Using getGlobalForwardingRule
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 getGlobalForwardingRule(args: GetGlobalForwardingRuleArgs, opts?: InvokeOptions): Promise<GetGlobalForwardingRuleResult>
function getGlobalForwardingRuleOutput(args: GetGlobalForwardingRuleOutputArgs, opts?: InvokeOptions): Output<GetGlobalForwardingRuleResult>def get_global_forwarding_rule(name: Optional[str] = None,
                               project: Optional[str] = None,
                               opts: Optional[InvokeOptions] = None) -> GetGlobalForwardingRuleResult
def get_global_forwarding_rule_output(name: Optional[pulumi.Input[str]] = None,
                               project: Optional[pulumi.Input[str]] = None,
                               opts: Optional[InvokeOptions] = None) -> Output[GetGlobalForwardingRuleResult]func LookupGlobalForwardingRule(ctx *Context, args *LookupGlobalForwardingRuleArgs, opts ...InvokeOption) (*LookupGlobalForwardingRuleResult, error)
func LookupGlobalForwardingRuleOutput(ctx *Context, args *LookupGlobalForwardingRuleOutputArgs, opts ...InvokeOption) LookupGlobalForwardingRuleResultOutput> Note: This function is named LookupGlobalForwardingRule in the Go SDK.
public static class GetGlobalForwardingRule 
{
    public static Task<GetGlobalForwardingRuleResult> InvokeAsync(GetGlobalForwardingRuleArgs args, InvokeOptions? opts = null)
    public static Output<GetGlobalForwardingRuleResult> Invoke(GetGlobalForwardingRuleInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetGlobalForwardingRuleResult> getGlobalForwardingRule(GetGlobalForwardingRuleArgs args, InvokeOptions options)
public static Output<GetGlobalForwardingRuleResult> getGlobalForwardingRule(GetGlobalForwardingRuleArgs args, InvokeOptions options)
fn::invoke:
  function: gcp:compute/getGlobalForwardingRule:getGlobalForwardingRule
  arguments:
    # arguments dictionaryThe following arguments are supported:
getGlobalForwardingRule Result
The following output properties are available:
- AllowPsc boolGlobal Access 
- BaseForwarding stringRule 
- Description string
- EffectiveLabels Dictionary<string, string>
- ForwardingRule intId 
- Id string
- The provider-assigned unique ID for this managed resource.
- IpAddress string
- IpProtocol string
- IpVersion string
- LabelFingerprint string
- Labels Dictionary<string, string>
- LoadBalancing stringScheme 
- MetadataFilters List<GetGlobal Forwarding Rule Metadata Filter> 
- Name string
- Network string
- NetworkTier string
- NoAutomate boolDns Zone 
- PortRange string
- PscConnection stringId 
- PscConnection stringStatus 
- PulumiLabels Dictionary<string, string>
- SelfLink string
- ServiceDirectory List<GetRegistrations Global Forwarding Rule Service Directory Registration> 
- SourceIp List<string>Ranges 
- Subnetwork string
- Target string
- Project string
- AllowPsc boolGlobal Access 
- BaseForwarding stringRule 
- Description string
- EffectiveLabels map[string]string
- ForwardingRule intId 
- Id string
- The provider-assigned unique ID for this managed resource.
- IpAddress string
- IpProtocol string
- IpVersion string
- LabelFingerprint string
- Labels map[string]string
- LoadBalancing stringScheme 
- MetadataFilters []GetGlobal Forwarding Rule Metadata Filter 
- Name string
- Network string
- NetworkTier string
- NoAutomate boolDns Zone 
- PortRange string
- PscConnection stringId 
- PscConnection stringStatus 
- PulumiLabels map[string]string
- SelfLink string
- ServiceDirectory []GetRegistrations Global Forwarding Rule Service Directory Registration 
- SourceIp []stringRanges 
- Subnetwork string
- Target string
- Project string
- allowPsc BooleanGlobal Access 
- baseForwarding StringRule 
- description String
- effectiveLabels Map<String,String>
- forwardingRule IntegerId 
- id String
- The provider-assigned unique ID for this managed resource.
- ipAddress String
- ipProtocol String
- ipVersion String
- labelFingerprint String
- labels Map<String,String>
- loadBalancing StringScheme 
- metadataFilters List<GetGlobal Forwarding Rule Metadata Filter> 
- name String
- network String
- networkTier String
- noAutomate BooleanDns Zone 
- portRange String
- pscConnection StringId 
- pscConnection StringStatus 
- pulumiLabels Map<String,String>
- selfLink String
- serviceDirectory List<GetRegistrations Global Forwarding Rule Service Directory Registration> 
- sourceIp List<String>Ranges 
- subnetwork String
- target String
- project String
- allowPsc booleanGlobal Access 
- baseForwarding stringRule 
- description string
- effectiveLabels {[key: string]: string}
- forwardingRule numberId 
- id string
- The provider-assigned unique ID for this managed resource.
- ipAddress string
- ipProtocol string
- ipVersion string
- labelFingerprint string
- labels {[key: string]: string}
- loadBalancing stringScheme 
- metadataFilters GetGlobal Forwarding Rule Metadata Filter[] 
- name string
- network string
- networkTier string
- noAutomate booleanDns Zone 
- portRange string
- pscConnection stringId 
- pscConnection stringStatus 
- pulumiLabels {[key: string]: string}
- selfLink string
- serviceDirectory GetRegistrations Global Forwarding Rule Service Directory Registration[] 
- sourceIp string[]Ranges 
- subnetwork string
- target string
- project string
- allow_psc_ boolglobal_ access 
- base_forwarding_ strrule 
- description str
- effective_labels Mapping[str, str]
- forwarding_rule_ intid 
- id str
- The provider-assigned unique ID for this managed resource.
- ip_address str
- ip_protocol str
- ip_version str
- label_fingerprint str
- labels Mapping[str, str]
- load_balancing_ strscheme 
- metadata_filters Sequence[GetGlobal Forwarding Rule Metadata Filter] 
- name str
- network str
- network_tier str
- no_automate_ booldns_ zone 
- port_range str
- psc_connection_ strid 
- psc_connection_ strstatus 
- pulumi_labels Mapping[str, str]
- self_link str
- service_directory_ Sequence[Getregistrations Global Forwarding Rule Service Directory Registration] 
- source_ip_ Sequence[str]ranges 
- subnetwork str
- target str
- project str
- allowPsc BooleanGlobal Access 
- baseForwarding StringRule 
- description String
- effectiveLabels Map<String>
- forwardingRule NumberId 
- id String
- The provider-assigned unique ID for this managed resource.
- ipAddress String
- ipProtocol String
- ipVersion String
- labelFingerprint String
- labels Map<String>
- loadBalancing StringScheme 
- metadataFilters List<Property Map>
- name String
- network String
- networkTier String
- noAutomate BooleanDns Zone 
- portRange String
- pscConnection StringId 
- pscConnection StringStatus 
- pulumiLabels Map<String>
- selfLink String
- serviceDirectory List<Property Map>Registrations 
- sourceIp List<String>Ranges 
- subnetwork String
- target String
- project String
Supporting Types
GetGlobalForwardingRuleMetadataFilter     
- FilterLabels List<GetGlobal Forwarding Rule Metadata Filter Filter Label> 
- The list of label value pairs that must match labels in the provided metadata based on filterMatchCriteria - This list must not be empty and can have at the most 64 entries. 
- FilterMatch stringCriteria 
- Specifies how individual filterLabel matches within the list of filterLabels contribute towards the overall metadataFilter match. - MATCH_ANY - At least one of the filterLabels must have a matching label in the provided metadata. MATCH_ALL - All filterLabels must have matching labels in the provided metadata. Possible values: ["MATCH_ANY", "MATCH_ALL"] 
- FilterLabels []GetGlobal Forwarding Rule Metadata Filter Filter Label 
- The list of label value pairs that must match labels in the provided metadata based on filterMatchCriteria - This list must not be empty and can have at the most 64 entries. 
- FilterMatch stringCriteria 
- Specifies how individual filterLabel matches within the list of filterLabels contribute towards the overall metadataFilter match. - MATCH_ANY - At least one of the filterLabels must have a matching label in the provided metadata. MATCH_ALL - All filterLabels must have matching labels in the provided metadata. Possible values: ["MATCH_ANY", "MATCH_ALL"] 
- filterLabels List<GetGlobal Forwarding Rule Metadata Filter Filter Label> 
- The list of label value pairs that must match labels in the provided metadata based on filterMatchCriteria - This list must not be empty and can have at the most 64 entries. 
- filterMatch StringCriteria 
- Specifies how individual filterLabel matches within the list of filterLabels contribute towards the overall metadataFilter match. - MATCH_ANY - At least one of the filterLabels must have a matching label in the provided metadata. MATCH_ALL - All filterLabels must have matching labels in the provided metadata. Possible values: ["MATCH_ANY", "MATCH_ALL"] 
- filterLabels GetGlobal Forwarding Rule Metadata Filter Filter Label[] 
- The list of label value pairs that must match labels in the provided metadata based on filterMatchCriteria - This list must not be empty and can have at the most 64 entries. 
- filterMatch stringCriteria 
- Specifies how individual filterLabel matches within the list of filterLabels contribute towards the overall metadataFilter match. - MATCH_ANY - At least one of the filterLabels must have a matching label in the provided metadata. MATCH_ALL - All filterLabels must have matching labels in the provided metadata. Possible values: ["MATCH_ANY", "MATCH_ALL"] 
- filter_labels Sequence[GetGlobal Forwarding Rule Metadata Filter Filter Label] 
- The list of label value pairs that must match labels in the provided metadata based on filterMatchCriteria - This list must not be empty and can have at the most 64 entries. 
- filter_match_ strcriteria 
- Specifies how individual filterLabel matches within the list of filterLabels contribute towards the overall metadataFilter match. - MATCH_ANY - At least one of the filterLabels must have a matching label in the provided metadata. MATCH_ALL - All filterLabels must have matching labels in the provided metadata. Possible values: ["MATCH_ANY", "MATCH_ALL"] 
- filterLabels List<Property Map>
- The list of label value pairs that must match labels in the provided metadata based on filterMatchCriteria - This list must not be empty and can have at the most 64 entries. 
- filterMatch StringCriteria 
- Specifies how individual filterLabel matches within the list of filterLabels contribute towards the overall metadataFilter match. - MATCH_ANY - At least one of the filterLabels must have a matching label in the provided metadata. MATCH_ALL - All filterLabels must have matching labels in the provided metadata. Possible values: ["MATCH_ANY", "MATCH_ALL"] 
GetGlobalForwardingRuleMetadataFilterFilterLabel       
GetGlobalForwardingRuleServiceDirectoryRegistration      
- Namespace string
- Service Directory namespace to register the forwarding rule under.
- ServiceDirectory stringRegion 
- [Optional] Service Directory region to register this global forwarding rule under. Default to "us-central1". Only used for PSC for Google APIs. All PSC for Google APIs Forwarding Rules on the same network should use the same Service Directory region.
- Namespace string
- Service Directory namespace to register the forwarding rule under.
- ServiceDirectory stringRegion 
- [Optional] Service Directory region to register this global forwarding rule under. Default to "us-central1". Only used for PSC for Google APIs. All PSC for Google APIs Forwarding Rules on the same network should use the same Service Directory region.
- namespace String
- Service Directory namespace to register the forwarding rule under.
- serviceDirectory StringRegion 
- [Optional] Service Directory region to register this global forwarding rule under. Default to "us-central1". Only used for PSC for Google APIs. All PSC for Google APIs Forwarding Rules on the same network should use the same Service Directory region.
- namespace string
- Service Directory namespace to register the forwarding rule under.
- serviceDirectory stringRegion 
- [Optional] Service Directory region to register this global forwarding rule under. Default to "us-central1". Only used for PSC for Google APIs. All PSC for Google APIs Forwarding Rules on the same network should use the same Service Directory region.
- namespace str
- Service Directory namespace to register the forwarding rule under.
- service_directory_ strregion 
- [Optional] Service Directory region to register this global forwarding rule under. Default to "us-central1". Only used for PSC for Google APIs. All PSC for Google APIs Forwarding Rules on the same network should use the same Service Directory region.
- namespace String
- Service Directory namespace to register the forwarding rule under.
- serviceDirectory StringRegion 
- [Optional] Service Directory region to register this global forwarding rule under. Default to "us-central1". Only used for PSC for Google APIs. All PSC for Google APIs Forwarding Rules on the same network should use the same Service Directory region.
Package Details
- Repository
- Google Cloud (GCP) Classic pulumi/pulumi-gcp
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the google-betaTerraform Provider.