// *** WARNING: this file was generated by pulumi-java-gen. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***

package com.pulumi.gcp.compute;

import com.pulumi.core.Output;
import com.pulumi.core.annotations.Export;
import com.pulumi.core.annotations.ResourceType;
import com.pulumi.core.internal.Codegen;
import com.pulumi.gcp.Utilities;
import com.pulumi.gcp.compute.ForwardingRuleArgs;
import com.pulumi.gcp.compute.inputs.ForwardingRuleState;
import com.pulumi.gcp.compute.outputs.ForwardingRuleServiceDirectoryRegistration;
import java.lang.Boolean;
import java.lang.String;
import java.util.List;
import java.util.Map;
import java.util.Optional;
import javax.annotation.Nullable;

/**
 * A ForwardingRule resource. A ForwardingRule resource specifies which pool
 * of target virtual machines to forward a packet to if it matches the given
 * [IPAddress, IPProtocol, portRange] tuple.
 * 
 * To get more information about ForwardingRule, see:
 * 
 * * [API documentation](https://cloud.google.com/compute/docs/reference/v1/forwardingRules)
 * * How-to Guides
 *     * [Official Documentation](https://cloud.google.com/compute/docs/load-balancing/network/forwarding-rules)
 * 
 * ## Example Usage
 * ### Internal Http Lb With Mig Backend
 * 
 * ```java
 * package generated_program;
 * 
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.gcp.compute.Network;
 * import com.pulumi.gcp.compute.NetworkArgs;
 * import com.pulumi.gcp.compute.Subnetwork;
 * import com.pulumi.gcp.compute.SubnetworkArgs;
 * import com.pulumi.gcp.compute.RegionHealthCheck;
 * import com.pulumi.gcp.compute.RegionHealthCheckArgs;
 * import com.pulumi.gcp.compute.inputs.RegionHealthCheckHttpHealthCheckArgs;
 * import com.pulumi.gcp.compute.InstanceTemplate;
 * import com.pulumi.gcp.compute.InstanceTemplateArgs;
 * import com.pulumi.gcp.compute.inputs.InstanceTemplateNetworkInterfaceArgs;
 * import com.pulumi.gcp.compute.inputs.InstanceTemplateDiskArgs;
 * import com.pulumi.gcp.compute.RegionInstanceGroupManager;
 * import com.pulumi.gcp.compute.RegionInstanceGroupManagerArgs;
 * import com.pulumi.gcp.compute.inputs.RegionInstanceGroupManagerVersionArgs;
 * import com.pulumi.gcp.compute.RegionBackendService;
 * import com.pulumi.gcp.compute.RegionBackendServiceArgs;
 * import com.pulumi.gcp.compute.inputs.RegionBackendServiceBackendArgs;
 * import com.pulumi.gcp.compute.RegionUrlMap;
 * import com.pulumi.gcp.compute.RegionUrlMapArgs;
 * import com.pulumi.gcp.compute.RegionTargetHttpProxy;
 * import com.pulumi.gcp.compute.RegionTargetHttpProxyArgs;
 * import com.pulumi.gcp.compute.ForwardingRule;
 * import com.pulumi.gcp.compute.ForwardingRuleArgs;
 * import com.pulumi.gcp.compute.Firewall;
 * import com.pulumi.gcp.compute.FirewallArgs;
 * import com.pulumi.gcp.compute.inputs.FirewallAllowArgs;
 * import com.pulumi.gcp.compute.Instance;
 * import com.pulumi.gcp.compute.InstanceArgs;
 * import com.pulumi.gcp.compute.inputs.InstanceNetworkInterfaceArgs;
 * import com.pulumi.gcp.compute.inputs.InstanceBootDiskArgs;
 * import com.pulumi.gcp.compute.inputs.InstanceBootDiskInitializeParamsArgs;
 * import com.pulumi.resources.CustomResourceOptions;
 * 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) {
 *         var ilbNetwork = new Network(&#34;ilbNetwork&#34;, NetworkArgs.builder()        
 *             .autoCreateSubnetworks(false)
 *             .build(), CustomResourceOptions.builder()
 *                 .provider(google_beta)
 *                 .build());
 * 
 *         var proxySubnet = new Subnetwork(&#34;proxySubnet&#34;, SubnetworkArgs.builder()        
 *             .ipCidrRange(&#34;10.0.0.0/24&#34;)
 *             .region(&#34;europe-west1&#34;)
 *             .purpose(&#34;REGIONAL_MANAGED_PROXY&#34;)
 *             .role(&#34;ACTIVE&#34;)
 *             .network(ilbNetwork.id())
 *             .build(), CustomResourceOptions.builder()
 *                 .provider(google_beta)
 *                 .build());
 * 
 *         var ilbSubnet = new Subnetwork(&#34;ilbSubnet&#34;, SubnetworkArgs.builder()        
 *             .ipCidrRange(&#34;10.0.1.0/24&#34;)
 *             .region(&#34;europe-west1&#34;)
 *             .network(ilbNetwork.id())
 *             .build(), CustomResourceOptions.builder()
 *                 .provider(google_beta)
 *                 .build());
 * 
 *         var defaultRegionHealthCheck = new RegionHealthCheck(&#34;defaultRegionHealthCheck&#34;, RegionHealthCheckArgs.builder()        
 *             .region(&#34;europe-west1&#34;)
 *             .httpHealthCheck(RegionHealthCheckHttpHealthCheckArgs.builder()
 *                 .portSpecification(&#34;USE_SERVING_PORT&#34;)
 *                 .build())
 *             .build(), CustomResourceOptions.builder()
 *                 .provider(google_beta)
 *                 .build());
 * 
 *         var instanceTemplate = new InstanceTemplate(&#34;instanceTemplate&#34;, InstanceTemplateArgs.builder()        
 *             .machineType(&#34;e2-small&#34;)
 *             .tags(&#34;http-server&#34;)
 *             .networkInterfaces(InstanceTemplateNetworkInterfaceArgs.builder()
 *                 .network(ilbNetwork.id())
 *                 .subnetwork(ilbSubnet.id())
 *                 .accessConfigs()
 *                 .build())
 *             .disks(InstanceTemplateDiskArgs.builder()
 *                 .sourceImage(&#34;debian-cloud/debian-10&#34;)
 *                 .autoDelete(true)
 *                 .boot(true)
 *                 .build())
 *             .metadata(Map.of(&#34;startup-script&#34;, &#34;&#34;&#34;
 * #! /bin/bash
 * set -euo pipefail
 * 
 * export DEBIAN_FRONTEND=noninteractive
 * apt-get update
 * apt-get install -y nginx-light jq
 * 
 * NAME=$(curl -H &#34;Metadata-Flavor: Google&#34; &#34;http://metadata.google.internal/computeMetadata/v1/instance/hostname&#34;)
 * IP=$(curl -H &#34;Metadata-Flavor: Google&#34; &#34;http://metadata.google.internal/computeMetadata/v1/instance/network-interfaces/0/ip&#34;)
 * METADATA=$(curl -f -H &#34;Metadata-Flavor: Google&#34; &#34;http://metadata.google.internal/computeMetadata/v1/instance/attributes/?recursive=True&#34; | jq &#39;del(.[&#34;startup-script&#34;])&#39;)
 * 
 * cat &lt;&lt;EOF &gt; /var/www/html/index.html
 * &lt;pre&gt;
 * Name: $NAME
 * IP: $IP
 * Metadata: $METADATA
 * &lt;/pre&gt;
 * EOF
 *             &#34;&#34;&#34;))
 *             .build(), CustomResourceOptions.builder()
 *                 .provider(google_beta)
 *                 .build());
 * 
 *         var mig = new RegionInstanceGroupManager(&#34;mig&#34;, RegionInstanceGroupManagerArgs.builder()        
 *             .region(&#34;europe-west1&#34;)
 *             .versions(RegionInstanceGroupManagerVersionArgs.builder()
 *                 .instanceTemplate(instanceTemplate.id())
 *                 .name(&#34;primary&#34;)
 *                 .build())
 *             .baseInstanceName(&#34;vm&#34;)
 *             .targetSize(2)
 *             .build(), CustomResourceOptions.builder()
 *                 .provider(google_beta)
 *                 .build());
 * 
 *         var defaultRegionBackendService = new RegionBackendService(&#34;defaultRegionBackendService&#34;, RegionBackendServiceArgs.builder()        
 *             .region(&#34;europe-west1&#34;)
 *             .protocol(&#34;HTTP&#34;)
 *             .loadBalancingScheme(&#34;INTERNAL_MANAGED&#34;)
 *             .timeoutSec(10)
 *             .healthChecks(defaultRegionHealthCheck.id())
 *             .backends(RegionBackendServiceBackendArgs.builder()
 *                 .group(mig.instanceGroup())
 *                 .balancingMode(&#34;UTILIZATION&#34;)
 *                 .capacityScaler(1)
 *                 .build())
 *             .build(), CustomResourceOptions.builder()
 *                 .provider(google_beta)
 *                 .build());
 * 
 *         var defaultRegionUrlMap = new RegionUrlMap(&#34;defaultRegionUrlMap&#34;, RegionUrlMapArgs.builder()        
 *             .region(&#34;europe-west1&#34;)
 *             .defaultService(defaultRegionBackendService.id())
 *             .build(), CustomResourceOptions.builder()
 *                 .provider(google_beta)
 *                 .build());
 * 
 *         var defaultRegionTargetHttpProxy = new RegionTargetHttpProxy(&#34;defaultRegionTargetHttpProxy&#34;, RegionTargetHttpProxyArgs.builder()        
 *             .region(&#34;europe-west1&#34;)
 *             .urlMap(defaultRegionUrlMap.id())
 *             .build(), CustomResourceOptions.builder()
 *                 .provider(google_beta)
 *                 .build());
 * 
 *         var googleComputeForwardingRule = new ForwardingRule(&#34;googleComputeForwardingRule&#34;, ForwardingRuleArgs.builder()        
 *             .region(&#34;europe-west1&#34;)
 *             .ipProtocol(&#34;TCP&#34;)
 *             .loadBalancingScheme(&#34;INTERNAL_MANAGED&#34;)
 *             .portRange(&#34;80&#34;)
 *             .target(defaultRegionTargetHttpProxy.id())
 *             .network(ilbNetwork.id())
 *             .subnetwork(ilbSubnet.id())
 *             .networkTier(&#34;PREMIUM&#34;)
 *             .build(), CustomResourceOptions.builder()
 *                 .provider(google_beta)
 *                 .dependsOn(proxySubnet)
 *                 .build());
 * 
 *         var fw_iap = new Firewall(&#34;fw-iap&#34;, FirewallArgs.builder()        
 *             .direction(&#34;INGRESS&#34;)
 *             .network(ilbNetwork.id())
 *             .sourceRanges(            
 *                 &#34;130.211.0.0/22&#34;,
 *                 &#34;35.191.0.0/16&#34;,
 *                 &#34;35.235.240.0/20&#34;)
 *             .allows(FirewallAllowArgs.builder()
 *                 .protocol(&#34;tcp&#34;)
 *                 .build())
 *             .build(), CustomResourceOptions.builder()
 *                 .provider(google_beta)
 *                 .build());
 * 
 *         var fw_ilb_to_backends = new Firewall(&#34;fw-ilb-to-backends&#34;, FirewallArgs.builder()        
 *             .direction(&#34;INGRESS&#34;)
 *             .network(ilbNetwork.id())
 *             .sourceRanges(&#34;10.0.0.0/24&#34;)
 *             .targetTags(&#34;http-server&#34;)
 *             .allows(FirewallAllowArgs.builder()
 *                 .protocol(&#34;tcp&#34;)
 *                 .ports(                
 *                     &#34;80&#34;,
 *                     &#34;443&#34;,
 *                     &#34;8080&#34;)
 *                 .build())
 *             .build(), CustomResourceOptions.builder()
 *                 .provider(google_beta)
 *                 .build());
 * 
 *         var vm_test = new Instance(&#34;vm-test&#34;, InstanceArgs.builder()        
 *             .zone(&#34;europe-west1-b&#34;)
 *             .machineType(&#34;e2-small&#34;)
 *             .networkInterfaces(InstanceNetworkInterfaceArgs.builder()
 *                 .network(ilbNetwork.id())
 *                 .subnetwork(ilbSubnet.id())
 *                 .build())
 *             .bootDisk(InstanceBootDiskArgs.builder()
 *                 .initializeParams(InstanceBootDiskInitializeParamsArgs.builder()
 *                     .image(&#34;debian-cloud/debian-10&#34;)
 *                     .build())
 *                 .build())
 *             .build(), CustomResourceOptions.builder()
 *                 .provider(google_beta)
 *                 .build());
 * 
 *     }
 * }
 * ```
 * ### Internal Tcp Udp Lb With Mig Backend
 * 
 * ```java
 * package generated_program;
 * 
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.gcp.compute.Network;
 * import com.pulumi.gcp.compute.NetworkArgs;
 * import com.pulumi.gcp.compute.Subnetwork;
 * import com.pulumi.gcp.compute.SubnetworkArgs;
 * import com.pulumi.gcp.compute.RegionHealthCheck;
 * import com.pulumi.gcp.compute.RegionHealthCheckArgs;
 * import com.pulumi.gcp.compute.inputs.RegionHealthCheckHttpHealthCheckArgs;
 * import com.pulumi.gcp.compute.InstanceTemplate;
 * import com.pulumi.gcp.compute.InstanceTemplateArgs;
 * import com.pulumi.gcp.compute.inputs.InstanceTemplateNetworkInterfaceArgs;
 * import com.pulumi.gcp.compute.inputs.InstanceTemplateDiskArgs;
 * import com.pulumi.gcp.compute.RegionInstanceGroupManager;
 * import com.pulumi.gcp.compute.RegionInstanceGroupManagerArgs;
 * import com.pulumi.gcp.compute.inputs.RegionInstanceGroupManagerVersionArgs;
 * import com.pulumi.gcp.compute.RegionBackendService;
 * import com.pulumi.gcp.compute.RegionBackendServiceArgs;
 * import com.pulumi.gcp.compute.inputs.RegionBackendServiceBackendArgs;
 * import com.pulumi.gcp.compute.ForwardingRule;
 * import com.pulumi.gcp.compute.ForwardingRuleArgs;
 * import com.pulumi.gcp.compute.Firewall;
 * import com.pulumi.gcp.compute.FirewallArgs;
 * import com.pulumi.gcp.compute.inputs.FirewallAllowArgs;
 * import com.pulumi.gcp.compute.Instance;
 * import com.pulumi.gcp.compute.InstanceArgs;
 * import com.pulumi.gcp.compute.inputs.InstanceNetworkInterfaceArgs;
 * import com.pulumi.gcp.compute.inputs.InstanceBootDiskArgs;
 * import com.pulumi.gcp.compute.inputs.InstanceBootDiskInitializeParamsArgs;
 * import com.pulumi.resources.CustomResourceOptions;
 * 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) {
 *         var ilbNetwork = new Network(&#34;ilbNetwork&#34;, NetworkArgs.builder()        
 *             .autoCreateSubnetworks(false)
 *             .build(), CustomResourceOptions.builder()
 *                 .provider(google_beta)
 *                 .build());
 * 
 *         var ilbSubnet = new Subnetwork(&#34;ilbSubnet&#34;, SubnetworkArgs.builder()        
 *             .ipCidrRange(&#34;10.0.1.0/24&#34;)
 *             .region(&#34;europe-west1&#34;)
 *             .network(ilbNetwork.id())
 *             .build(), CustomResourceOptions.builder()
 *                 .provider(google_beta)
 *                 .build());
 * 
 *         var defaultRegionHealthCheck = new RegionHealthCheck(&#34;defaultRegionHealthCheck&#34;, RegionHealthCheckArgs.builder()        
 *             .region(&#34;europe-west1&#34;)
 *             .httpHealthCheck(RegionHealthCheckHttpHealthCheckArgs.builder()
 *                 .port(&#34;80&#34;)
 *                 .build())
 *             .build(), CustomResourceOptions.builder()
 *                 .provider(google_beta)
 *                 .build());
 * 
 *         var instanceTemplate = new InstanceTemplate(&#34;instanceTemplate&#34;, InstanceTemplateArgs.builder()        
 *             .machineType(&#34;e2-small&#34;)
 *             .tags(            
 *                 &#34;allow-ssh&#34;,
 *                 &#34;allow-health-check&#34;)
 *             .networkInterfaces(InstanceTemplateNetworkInterfaceArgs.builder()
 *                 .network(ilbNetwork.id())
 *                 .subnetwork(ilbSubnet.id())
 *                 .accessConfigs()
 *                 .build())
 *             .disks(InstanceTemplateDiskArgs.builder()
 *                 .sourceImage(&#34;debian-cloud/debian-10&#34;)
 *                 .autoDelete(true)
 *                 .boot(true)
 *                 .build())
 *             .metadata(Map.of(&#34;startup-script&#34;, &#34;&#34;&#34;
 * #! /bin/bash
 * set -euo pipefail
 * 
 * export DEBIAN_FRONTEND=noninteractive
 * apt-get update
 * apt-get install -y nginx-light jq
 * 
 * NAME=$(curl -H &#34;Metadata-Flavor: Google&#34; &#34;http://metadata.google.internal/computeMetadata/v1/instance/hostname&#34;)
 * IP=$(curl -H &#34;Metadata-Flavor: Google&#34; &#34;http://metadata.google.internal/computeMetadata/v1/instance/network-interfaces/0/ip&#34;)
 * METADATA=$(curl -f -H &#34;Metadata-Flavor: Google&#34; &#34;http://metadata.google.internal/computeMetadata/v1/instance/attributes/?recursive=True&#34; | jq &#39;del(.[&#34;startup-script&#34;])&#39;)
 * 
 * cat &lt;&lt;EOF &gt; /var/www/html/index.html
 * &lt;pre&gt;
 * Name: $NAME
 * IP: $IP
 * Metadata: $METADATA
 * &lt;/pre&gt;
 * EOF
 *             &#34;&#34;&#34;))
 *             .build(), CustomResourceOptions.builder()
 *                 .provider(google_beta)
 *                 .build());
 * 
 *         var mig = new RegionInstanceGroupManager(&#34;mig&#34;, RegionInstanceGroupManagerArgs.builder()        
 *             .region(&#34;europe-west1&#34;)
 *             .versions(RegionInstanceGroupManagerVersionArgs.builder()
 *                 .instanceTemplate(instanceTemplate.id())
 *                 .name(&#34;primary&#34;)
 *                 .build())
 *             .baseInstanceName(&#34;vm&#34;)
 *             .targetSize(2)
 *             .build(), CustomResourceOptions.builder()
 *                 .provider(google_beta)
 *                 .build());
 * 
 *         var defaultRegionBackendService = new RegionBackendService(&#34;defaultRegionBackendService&#34;, RegionBackendServiceArgs.builder()        
 *             .region(&#34;europe-west1&#34;)
 *             .protocol(&#34;TCP&#34;)
 *             .loadBalancingScheme(&#34;INTERNAL&#34;)
 *             .healthChecks(defaultRegionHealthCheck.id())
 *             .backends(RegionBackendServiceBackendArgs.builder()
 *                 .group(mig.instanceGroup())
 *                 .balancingMode(&#34;CONNECTION&#34;)
 *                 .build())
 *             .build(), CustomResourceOptions.builder()
 *                 .provider(google_beta)
 *                 .build());
 * 
 *         var googleComputeForwardingRule = new ForwardingRule(&#34;googleComputeForwardingRule&#34;, ForwardingRuleArgs.builder()        
 *             .backendService(defaultRegionBackendService.id())
 *             .region(&#34;europe-west1&#34;)
 *             .ipProtocol(&#34;TCP&#34;)
 *             .loadBalancingScheme(&#34;INTERNAL&#34;)
 *             .allPorts(true)
 *             .allowGlobalAccess(true)
 *             .network(ilbNetwork.id())
 *             .subnetwork(ilbSubnet.id())
 *             .build(), CustomResourceOptions.builder()
 *                 .provider(google_beta)
 *                 .build());
 * 
 *         var fwHc = new Firewall(&#34;fwHc&#34;, FirewallArgs.builder()        
 *             .direction(&#34;INGRESS&#34;)
 *             .network(ilbNetwork.id())
 *             .sourceRanges(            
 *                 &#34;130.211.0.0/22&#34;,
 *                 &#34;35.191.0.0/16&#34;,
 *                 &#34;35.235.240.0/20&#34;)
 *             .allows(FirewallAllowArgs.builder()
 *                 .protocol(&#34;tcp&#34;)
 *                 .build())
 *             .targetTags(&#34;allow-health-check&#34;)
 *             .build(), CustomResourceOptions.builder()
 *                 .provider(google_beta)
 *                 .build());
 * 
 *         var fwIlbToBackends = new Firewall(&#34;fwIlbToBackends&#34;, FirewallArgs.builder()        
 *             .direction(&#34;INGRESS&#34;)
 *             .network(ilbNetwork.id())
 *             .sourceRanges(&#34;10.0.1.0/24&#34;)
 *             .allows(            
 *                 FirewallAllowArgs.builder()
 *                     .protocol(&#34;tcp&#34;)
 *                     .build(),
 *                 FirewallAllowArgs.builder()
 *                     .protocol(&#34;udp&#34;)
 *                     .build(),
 *                 FirewallAllowArgs.builder()
 *                     .protocol(&#34;icmp&#34;)
 *                     .build())
 *             .build(), CustomResourceOptions.builder()
 *                 .provider(google_beta)
 *                 .build());
 * 
 *         var fwIlbSsh = new Firewall(&#34;fwIlbSsh&#34;, FirewallArgs.builder()        
 *             .direction(&#34;INGRESS&#34;)
 *             .network(ilbNetwork.id())
 *             .allows(FirewallAllowArgs.builder()
 *                 .protocol(&#34;tcp&#34;)
 *                 .ports(&#34;22&#34;)
 *                 .build())
 *             .targetTags(&#34;allow-ssh&#34;)
 *             .sourceRanges(&#34;0.0.0.0/0&#34;)
 *             .build(), CustomResourceOptions.builder()
 *                 .provider(google_beta)
 *                 .build());
 * 
 *         var vmTest = new Instance(&#34;vmTest&#34;, InstanceArgs.builder()        
 *             .zone(&#34;europe-west1-b&#34;)
 *             .machineType(&#34;e2-small&#34;)
 *             .networkInterfaces(InstanceNetworkInterfaceArgs.builder()
 *                 .network(ilbNetwork.id())
 *                 .subnetwork(ilbSubnet.id())
 *                 .build())
 *             .bootDisk(InstanceBootDiskArgs.builder()
 *                 .initializeParams(InstanceBootDiskInitializeParamsArgs.builder()
 *                     .image(&#34;debian-cloud/debian-10&#34;)
 *                     .build())
 *                 .build())
 *             .build(), CustomResourceOptions.builder()
 *                 .provider(google_beta)
 *                 .build());
 * 
 *     }
 * }
 * ```
 * ### Forwarding Rule Externallb
 * 
 * ```java
 * package generated_program;
 * 
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.gcp.compute.RegionHealthCheck;
 * import com.pulumi.gcp.compute.RegionHealthCheckArgs;
 * import com.pulumi.gcp.compute.inputs.RegionHealthCheckTcpHealthCheckArgs;
 * import com.pulumi.gcp.compute.RegionBackendService;
 * import com.pulumi.gcp.compute.RegionBackendServiceArgs;
 * import com.pulumi.gcp.compute.ForwardingRule;
 * import com.pulumi.gcp.compute.ForwardingRuleArgs;
 * import com.pulumi.resources.CustomResourceOptions;
 * 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) {
 *         var hc = new RegionHealthCheck(&#34;hc&#34;, RegionHealthCheckArgs.builder()        
 *             .checkIntervalSec(1)
 *             .timeoutSec(1)
 *             .region(&#34;us-central1&#34;)
 *             .tcpHealthCheck(RegionHealthCheckTcpHealthCheckArgs.builder()
 *                 .port(&#34;80&#34;)
 *                 .build())
 *             .build(), CustomResourceOptions.builder()
 *                 .provider(google_beta)
 *                 .build());
 * 
 *         var backend = new RegionBackendService(&#34;backend&#34;, RegionBackendServiceArgs.builder()        
 *             .region(&#34;us-central1&#34;)
 *             .loadBalancingScheme(&#34;EXTERNAL&#34;)
 *             .healthChecks(hc.id())
 *             .build(), CustomResourceOptions.builder()
 *                 .provider(google_beta)
 *                 .build());
 * 
 *         var default_ = new ForwardingRule(&#34;default&#34;, ForwardingRuleArgs.builder()        
 *             .region(&#34;us-central1&#34;)
 *             .portRange(80)
 *             .backendService(backend.id())
 *             .build(), CustomResourceOptions.builder()
 *                 .provider(google_beta)
 *                 .build());
 * 
 *     }
 * }
 * ```
 * ### Forwarding Rule Global Internallb
 * 
 * ```java
 * package generated_program;
 * 
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.gcp.compute.HealthCheck;
 * import com.pulumi.gcp.compute.HealthCheckArgs;
 * import com.pulumi.gcp.compute.inputs.HealthCheckTcpHealthCheckArgs;
 * import com.pulumi.gcp.compute.RegionBackendService;
 * import com.pulumi.gcp.compute.RegionBackendServiceArgs;
 * import com.pulumi.gcp.compute.Network;
 * import com.pulumi.gcp.compute.NetworkArgs;
 * import com.pulumi.gcp.compute.Subnetwork;
 * import com.pulumi.gcp.compute.SubnetworkArgs;
 * import com.pulumi.gcp.compute.ForwardingRule;
 * import com.pulumi.gcp.compute.ForwardingRuleArgs;
 * 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) {
 *         var hc = new HealthCheck(&#34;hc&#34;, HealthCheckArgs.builder()        
 *             .checkIntervalSec(1)
 *             .timeoutSec(1)
 *             .tcpHealthCheck(HealthCheckTcpHealthCheckArgs.builder()
 *                 .port(&#34;80&#34;)
 *                 .build())
 *             .build());
 * 
 *         var backend = new RegionBackendService(&#34;backend&#34;, RegionBackendServiceArgs.builder()        
 *             .region(&#34;us-central1&#34;)
 *             .healthChecks(hc.id())
 *             .build());
 * 
 *         var defaultNetwork = new Network(&#34;defaultNetwork&#34;, NetworkArgs.builder()        
 *             .autoCreateSubnetworks(false)
 *             .build());
 * 
 *         var defaultSubnetwork = new Subnetwork(&#34;defaultSubnetwork&#34;, SubnetworkArgs.builder()        
 *             .ipCidrRange(&#34;10.0.0.0/16&#34;)
 *             .region(&#34;us-central1&#34;)
 *             .network(defaultNetwork.id())
 *             .build());
 * 
 *         var defaultForwardingRule = new ForwardingRule(&#34;defaultForwardingRule&#34;, ForwardingRuleArgs.builder()        
 *             .region(&#34;us-central1&#34;)
 *             .loadBalancingScheme(&#34;INTERNAL&#34;)
 *             .backendService(backend.id())
 *             .allPorts(true)
 *             .allowGlobalAccess(true)
 *             .network(defaultNetwork.name())
 *             .subnetwork(defaultSubnetwork.name())
 *             .build());
 * 
 *     }
 * }
 * ```
 * ### Forwarding Rule Basic
 * ```java
 * package generated_program;
 * 
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.gcp.compute.TargetPool;
 * import com.pulumi.gcp.compute.ForwardingRule;
 * import com.pulumi.gcp.compute.ForwardingRuleArgs;
 * 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) {
 *         var defaultTargetPool = new TargetPool(&#34;defaultTargetPool&#34;);
 * 
 *         var defaultForwardingRule = new ForwardingRule(&#34;defaultForwardingRule&#34;, ForwardingRuleArgs.builder()        
 *             .target(defaultTargetPool.id())
 *             .portRange(&#34;80&#34;)
 *             .build());
 * 
 *     }
 * }
 * ```
 * ### Forwarding Rule L3 Default
 * 
 * ```java
 * package generated_program;
 * 
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.gcp.compute.RegionHealthCheck;
 * import com.pulumi.gcp.compute.RegionHealthCheckArgs;
 * import com.pulumi.gcp.compute.inputs.RegionHealthCheckTcpHealthCheckArgs;
 * import com.pulumi.gcp.compute.RegionBackendService;
 * import com.pulumi.gcp.compute.RegionBackendServiceArgs;
 * import com.pulumi.gcp.compute.ForwardingRule;
 * import com.pulumi.gcp.compute.ForwardingRuleArgs;
 * import com.pulumi.resources.CustomResourceOptions;
 * 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) {
 *         var healthCheck = new RegionHealthCheck(&#34;healthCheck&#34;, RegionHealthCheckArgs.builder()        
 *             .region(&#34;us-central1&#34;)
 *             .tcpHealthCheck(RegionHealthCheckTcpHealthCheckArgs.builder()
 *                 .port(80)
 *                 .build())
 *             .build(), CustomResourceOptions.builder()
 *                 .provider(google_beta)
 *                 .build());
 * 
 *         var service = new RegionBackendService(&#34;service&#34;, RegionBackendServiceArgs.builder()        
 *             .region(&#34;us-central1&#34;)
 *             .healthChecks(healthCheck.id())
 *             .protocol(&#34;UNSPECIFIED&#34;)
 *             .loadBalancingScheme(&#34;EXTERNAL&#34;)
 *             .build(), CustomResourceOptions.builder()
 *                 .provider(google_beta)
 *                 .build());
 * 
 *         var fwdRule = new ForwardingRule(&#34;fwdRule&#34;, ForwardingRuleArgs.builder()        
 *             .backendService(service.id())
 *             .ipProtocol(&#34;L3_DEFAULT&#34;)
 *             .allPorts(true)
 *             .build(), CustomResourceOptions.builder()
 *                 .provider(google_beta)
 *                 .build());
 * 
 *     }
 * }
 * ```
 * ### Forwarding Rule Internallb
 * 
 * ```java
 * package generated_program;
 * 
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.gcp.compute.HealthCheck;
 * import com.pulumi.gcp.compute.HealthCheckArgs;
 * import com.pulumi.gcp.compute.inputs.HealthCheckTcpHealthCheckArgs;
 * import com.pulumi.gcp.compute.RegionBackendService;
 * import com.pulumi.gcp.compute.RegionBackendServiceArgs;
 * import com.pulumi.gcp.compute.Network;
 * import com.pulumi.gcp.compute.NetworkArgs;
 * import com.pulumi.gcp.compute.Subnetwork;
 * import com.pulumi.gcp.compute.SubnetworkArgs;
 * import com.pulumi.gcp.compute.ForwardingRule;
 * import com.pulumi.gcp.compute.ForwardingRuleArgs;
 * 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) {
 *         var hc = new HealthCheck(&#34;hc&#34;, HealthCheckArgs.builder()        
 *             .checkIntervalSec(1)
 *             .timeoutSec(1)
 *             .tcpHealthCheck(HealthCheckTcpHealthCheckArgs.builder()
 *                 .port(&#34;80&#34;)
 *                 .build())
 *             .build());
 * 
 *         var backend = new RegionBackendService(&#34;backend&#34;, RegionBackendServiceArgs.builder()        
 *             .region(&#34;us-central1&#34;)
 *             .healthChecks(hc.id())
 *             .build());
 * 
 *         var defaultNetwork = new Network(&#34;defaultNetwork&#34;, NetworkArgs.builder()        
 *             .autoCreateSubnetworks(false)
 *             .build());
 * 
 *         var defaultSubnetwork = new Subnetwork(&#34;defaultSubnetwork&#34;, SubnetworkArgs.builder()        
 *             .ipCidrRange(&#34;10.0.0.0/16&#34;)
 *             .region(&#34;us-central1&#34;)
 *             .network(defaultNetwork.id())
 *             .build());
 * 
 *         var defaultForwardingRule = new ForwardingRule(&#34;defaultForwardingRule&#34;, ForwardingRuleArgs.builder()        
 *             .region(&#34;us-central1&#34;)
 *             .loadBalancingScheme(&#34;INTERNAL&#34;)
 *             .backendService(backend.id())
 *             .allPorts(true)
 *             .network(defaultNetwork.name())
 *             .subnetwork(defaultSubnetwork.name())
 *             .ipVersion(&#34;IPV4&#34;)
 *             .build());
 * 
 *     }
 * }
 * ```
 * ### Forwarding Rule Http Lb
 * 
 * ```java
 * 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.GetImageArgs;
 * import com.pulumi.gcp.compute.Network;
 * import com.pulumi.gcp.compute.NetworkArgs;
 * import com.pulumi.gcp.compute.Subnetwork;
 * import com.pulumi.gcp.compute.SubnetworkArgs;
 * import com.pulumi.gcp.compute.InstanceTemplate;
 * import com.pulumi.gcp.compute.InstanceTemplateArgs;
 * import com.pulumi.gcp.compute.inputs.InstanceTemplateNetworkInterfaceArgs;
 * import com.pulumi.gcp.compute.inputs.InstanceTemplateDiskArgs;
 * import com.pulumi.gcp.compute.RegionInstanceGroupManager;
 * import com.pulumi.gcp.compute.RegionInstanceGroupManagerArgs;
 * import com.pulumi.gcp.compute.inputs.RegionInstanceGroupManagerVersionArgs;
 * import com.pulumi.gcp.compute.Firewall;
 * import com.pulumi.gcp.compute.FirewallArgs;
 * import com.pulumi.gcp.compute.inputs.FirewallAllowArgs;
 * import com.pulumi.gcp.compute.RegionHealthCheck;
 * import com.pulumi.gcp.compute.RegionHealthCheckArgs;
 * import com.pulumi.gcp.compute.inputs.RegionHealthCheckHttpHealthCheckArgs;
 * import com.pulumi.gcp.compute.RegionBackendService;
 * import com.pulumi.gcp.compute.RegionBackendServiceArgs;
 * import com.pulumi.gcp.compute.inputs.RegionBackendServiceBackendArgs;
 * import com.pulumi.gcp.compute.RegionUrlMap;
 * import com.pulumi.gcp.compute.RegionUrlMapArgs;
 * import com.pulumi.gcp.compute.RegionTargetHttpProxy;
 * import com.pulumi.gcp.compute.RegionTargetHttpProxyArgs;
 * import com.pulumi.gcp.compute.ForwardingRule;
 * import com.pulumi.gcp.compute.ForwardingRuleArgs;
 * import com.pulumi.resources.CustomResourceOptions;
 * 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 debianImage = ComputeFunctions.getImage(GetImageArgs.builder()
 *             .family(&#34;debian-11&#34;)
 *             .project(&#34;debian-cloud&#34;)
 *             .build());
 * 
 *         var defaultNetwork = new Network(&#34;defaultNetwork&#34;, NetworkArgs.builder()        
 *             .autoCreateSubnetworks(false)
 *             .routingMode(&#34;REGIONAL&#34;)
 *             .build(), CustomResourceOptions.builder()
 *                 .provider(google_beta)
 *                 .build());
 * 
 *         var defaultSubnetwork = new Subnetwork(&#34;defaultSubnetwork&#34;, SubnetworkArgs.builder()        
 *             .ipCidrRange(&#34;10.1.2.0/24&#34;)
 *             .region(&#34;us-central1&#34;)
 *             .network(defaultNetwork.id())
 *             .build(), CustomResourceOptions.builder()
 *                 .provider(google_beta)
 *                 .build());
 * 
 *         var instanceTemplate = new InstanceTemplate(&#34;instanceTemplate&#34;, InstanceTemplateArgs.builder()        
 *             .machineType(&#34;e2-medium&#34;)
 *             .networkInterfaces(InstanceTemplateNetworkInterfaceArgs.builder()
 *                 .network(defaultNetwork.id())
 *                 .subnetwork(defaultSubnetwork.id())
 *                 .build())
 *             .disks(InstanceTemplateDiskArgs.builder()
 *                 .sourceImage(debianImage.applyValue(getImageResult -&gt; getImageResult.selfLink()))
 *                 .autoDelete(true)
 *                 .boot(true)
 *                 .build())
 *             .tags(            
 *                 &#34;allow-ssh&#34;,
 *                 &#34;load-balanced-backend&#34;)
 *             .build(), CustomResourceOptions.builder()
 *                 .provider(google_beta)
 *                 .build());
 * 
 *         var rigm = new RegionInstanceGroupManager(&#34;rigm&#34;, RegionInstanceGroupManagerArgs.builder()        
 *             .region(&#34;us-central1&#34;)
 *             .versions(RegionInstanceGroupManagerVersionArgs.builder()
 *                 .instanceTemplate(instanceTemplate.id())
 *                 .name(&#34;primary&#34;)
 *                 .build())
 *             .baseInstanceName(&#34;internal-glb&#34;)
 *             .targetSize(1)
 *             .build(), CustomResourceOptions.builder()
 *                 .provider(google_beta)
 *                 .build());
 * 
 *         var fw1 = new Firewall(&#34;fw1&#34;, FirewallArgs.builder()        
 *             .network(defaultNetwork.id())
 *             .sourceRanges(&#34;10.1.2.0/24&#34;)
 *             .allows(            
 *                 FirewallAllowArgs.builder()
 *                     .protocol(&#34;tcp&#34;)
 *                     .build(),
 *                 FirewallAllowArgs.builder()
 *                     .protocol(&#34;udp&#34;)
 *                     .build(),
 *                 FirewallAllowArgs.builder()
 *                     .protocol(&#34;icmp&#34;)
 *                     .build())
 *             .direction(&#34;INGRESS&#34;)
 *             .build(), CustomResourceOptions.builder()
 *                 .provider(google_beta)
 *                 .build());
 * 
 *         var fw2 = new Firewall(&#34;fw2&#34;, FirewallArgs.builder()        
 *             .network(defaultNetwork.id())
 *             .sourceRanges(&#34;0.0.0.0/0&#34;)
 *             .allows(FirewallAllowArgs.builder()
 *                 .protocol(&#34;tcp&#34;)
 *                 .ports(&#34;22&#34;)
 *                 .build())
 *             .targetTags(&#34;allow-ssh&#34;)
 *             .direction(&#34;INGRESS&#34;)
 *             .build(), CustomResourceOptions.builder()
 *                 .provider(google_beta)
 *                 .dependsOn(fw1)
 *                 .build());
 * 
 *         var fw3 = new Firewall(&#34;fw3&#34;, FirewallArgs.builder()        
 *             .network(defaultNetwork.id())
 *             .sourceRanges(            
 *                 &#34;130.211.0.0/22&#34;,
 *                 &#34;35.191.0.0/16&#34;)
 *             .allows(FirewallAllowArgs.builder()
 *                 .protocol(&#34;tcp&#34;)
 *                 .build())
 *             .targetTags(&#34;load-balanced-backend&#34;)
 *             .direction(&#34;INGRESS&#34;)
 *             .build(), CustomResourceOptions.builder()
 *                 .provider(google_beta)
 *                 .dependsOn(fw2)
 *                 .build());
 * 
 *         var fw4 = new Firewall(&#34;fw4&#34;, FirewallArgs.builder()        
 *             .network(defaultNetwork.id())
 *             .sourceRanges(&#34;10.129.0.0/26&#34;)
 *             .targetTags(&#34;load-balanced-backend&#34;)
 *             .allows(            
 *                 FirewallAllowArgs.builder()
 *                     .protocol(&#34;tcp&#34;)
 *                     .ports(&#34;80&#34;)
 *                     .build(),
 *                 FirewallAllowArgs.builder()
 *                     .protocol(&#34;tcp&#34;)
 *                     .ports(&#34;443&#34;)
 *                     .build(),
 *                 FirewallAllowArgs.builder()
 *                     .protocol(&#34;tcp&#34;)
 *                     .ports(&#34;8000&#34;)
 *                     .build())
 *             .direction(&#34;INGRESS&#34;)
 *             .build(), CustomResourceOptions.builder()
 *                 .provider(google_beta)
 *                 .dependsOn(fw3)
 *                 .build());
 * 
 *         var defaultRegionHealthCheck = new RegionHealthCheck(&#34;defaultRegionHealthCheck&#34;, RegionHealthCheckArgs.builder()        
 *             .region(&#34;us-central1&#34;)
 *             .httpHealthCheck(RegionHealthCheckHttpHealthCheckArgs.builder()
 *                 .portSpecification(&#34;USE_SERVING_PORT&#34;)
 *                 .build())
 *             .build(), CustomResourceOptions.builder()
 *                 .provider(google_beta)
 *                 .dependsOn(fw4)
 *                 .build());
 * 
 *         var defaultRegionBackendService = new RegionBackendService(&#34;defaultRegionBackendService&#34;, RegionBackendServiceArgs.builder()        
 *             .loadBalancingScheme(&#34;INTERNAL_MANAGED&#34;)
 *             .backends(RegionBackendServiceBackendArgs.builder()
 *                 .group(rigm.instanceGroup())
 *                 .balancingMode(&#34;UTILIZATION&#34;)
 *                 .capacityScaler(1)
 *                 .build())
 *             .region(&#34;us-central1&#34;)
 *             .protocol(&#34;HTTP&#34;)
 *             .timeoutSec(10)
 *             .healthChecks(defaultRegionHealthCheck.id())
 *             .build(), CustomResourceOptions.builder()
 *                 .provider(google_beta)
 *                 .build());
 * 
 *         var defaultRegionUrlMap = new RegionUrlMap(&#34;defaultRegionUrlMap&#34;, RegionUrlMapArgs.builder()        
 *             .region(&#34;us-central1&#34;)
 *             .defaultService(defaultRegionBackendService.id())
 *             .build(), CustomResourceOptions.builder()
 *                 .provider(google_beta)
 *                 .build());
 * 
 *         var defaultRegionTargetHttpProxy = new RegionTargetHttpProxy(&#34;defaultRegionTargetHttpProxy&#34;, RegionTargetHttpProxyArgs.builder()        
 *             .region(&#34;us-central1&#34;)
 *             .urlMap(defaultRegionUrlMap.id())
 *             .build(), CustomResourceOptions.builder()
 *                 .provider(google_beta)
 *                 .build());
 * 
 *         var proxy = new Subnetwork(&#34;proxy&#34;, SubnetworkArgs.builder()        
 *             .ipCidrRange(&#34;10.129.0.0/26&#34;)
 *             .region(&#34;us-central1&#34;)
 *             .network(defaultNetwork.id())
 *             .purpose(&#34;REGIONAL_MANAGED_PROXY&#34;)
 *             .role(&#34;ACTIVE&#34;)
 *             .build(), CustomResourceOptions.builder()
 *                 .provider(google_beta)
 *                 .build());
 * 
 *         var defaultForwardingRule = new ForwardingRule(&#34;defaultForwardingRule&#34;, ForwardingRuleArgs.builder()        
 *             .region(&#34;us-central1&#34;)
 *             .ipProtocol(&#34;TCP&#34;)
 *             .loadBalancingScheme(&#34;INTERNAL_MANAGED&#34;)
 *             .portRange(&#34;80&#34;)
 *             .target(defaultRegionTargetHttpProxy.id())
 *             .network(defaultNetwork.id())
 *             .subnetwork(defaultSubnetwork.id())
 *             .networkTier(&#34;PREMIUM&#34;)
 *             .build(), CustomResourceOptions.builder()
 *                 .provider(google_beta)
 *                 .dependsOn(proxy)
 *                 .build());
 * 
 *     }
 * }
 * ```
 * ### Forwarding Rule Regional Http Xlb
 * 
 * ```java
 * 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.GetImageArgs;
 * import com.pulumi.gcp.compute.Network;
 * import com.pulumi.gcp.compute.NetworkArgs;
 * import com.pulumi.gcp.compute.Subnetwork;
 * import com.pulumi.gcp.compute.SubnetworkArgs;
 * import com.pulumi.gcp.compute.InstanceTemplate;
 * import com.pulumi.gcp.compute.InstanceTemplateArgs;
 * import com.pulumi.gcp.compute.inputs.InstanceTemplateNetworkInterfaceArgs;
 * import com.pulumi.gcp.compute.inputs.InstanceTemplateDiskArgs;
 * import com.pulumi.gcp.compute.RegionInstanceGroupManager;
 * import com.pulumi.gcp.compute.RegionInstanceGroupManagerArgs;
 * import com.pulumi.gcp.compute.inputs.RegionInstanceGroupManagerVersionArgs;
 * import com.pulumi.gcp.compute.Firewall;
 * import com.pulumi.gcp.compute.FirewallArgs;
 * import com.pulumi.gcp.compute.inputs.FirewallAllowArgs;
 * import com.pulumi.gcp.compute.RegionHealthCheck;
 * import com.pulumi.gcp.compute.RegionHealthCheckArgs;
 * import com.pulumi.gcp.compute.inputs.RegionHealthCheckHttpHealthCheckArgs;
 * import com.pulumi.gcp.compute.RegionBackendService;
 * import com.pulumi.gcp.compute.RegionBackendServiceArgs;
 * import com.pulumi.gcp.compute.inputs.RegionBackendServiceBackendArgs;
 * import com.pulumi.gcp.compute.RegionUrlMap;
 * import com.pulumi.gcp.compute.RegionUrlMapArgs;
 * import com.pulumi.gcp.compute.RegionTargetHttpProxy;
 * import com.pulumi.gcp.compute.RegionTargetHttpProxyArgs;
 * import com.pulumi.gcp.compute.Address;
 * import com.pulumi.gcp.compute.AddressArgs;
 * import com.pulumi.gcp.compute.ForwardingRule;
 * import com.pulumi.gcp.compute.ForwardingRuleArgs;
 * import com.pulumi.resources.CustomResourceOptions;
 * 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 debianImage = ComputeFunctions.getImage(GetImageArgs.builder()
 *             .family(&#34;debian-11&#34;)
 *             .project(&#34;debian-cloud&#34;)
 *             .build());
 * 
 *         var defaultNetwork = new Network(&#34;defaultNetwork&#34;, NetworkArgs.builder()        
 *             .autoCreateSubnetworks(false)
 *             .routingMode(&#34;REGIONAL&#34;)
 *             .build(), CustomResourceOptions.builder()
 *                 .provider(google_beta)
 *                 .build());
 * 
 *         var defaultSubnetwork = new Subnetwork(&#34;defaultSubnetwork&#34;, SubnetworkArgs.builder()        
 *             .ipCidrRange(&#34;10.1.2.0/24&#34;)
 *             .region(&#34;us-central1&#34;)
 *             .network(defaultNetwork.id())
 *             .build(), CustomResourceOptions.builder()
 *                 .provider(google_beta)
 *                 .build());
 * 
 *         var instanceTemplate = new InstanceTemplate(&#34;instanceTemplate&#34;, InstanceTemplateArgs.builder()        
 *             .machineType(&#34;e2-medium&#34;)
 *             .networkInterfaces(InstanceTemplateNetworkInterfaceArgs.builder()
 *                 .network(defaultNetwork.id())
 *                 .subnetwork(defaultSubnetwork.id())
 *                 .build())
 *             .disks(InstanceTemplateDiskArgs.builder()
 *                 .sourceImage(debianImage.applyValue(getImageResult -&gt; getImageResult.selfLink()))
 *                 .autoDelete(true)
 *                 .boot(true)
 *                 .build())
 *             .tags(            
 *                 &#34;allow-ssh&#34;,
 *                 &#34;load-balanced-backend&#34;)
 *             .build(), CustomResourceOptions.builder()
 *                 .provider(google_beta)
 *                 .build());
 * 
 *         var rigm = new RegionInstanceGroupManager(&#34;rigm&#34;, RegionInstanceGroupManagerArgs.builder()        
 *             .region(&#34;us-central1&#34;)
 *             .versions(RegionInstanceGroupManagerVersionArgs.builder()
 *                 .instanceTemplate(instanceTemplate.id())
 *                 .name(&#34;primary&#34;)
 *                 .build())
 *             .baseInstanceName(&#34;internal-glb&#34;)
 *             .targetSize(1)
 *             .build(), CustomResourceOptions.builder()
 *                 .provider(google_beta)
 *                 .build());
 * 
 *         var fw1 = new Firewall(&#34;fw1&#34;, FirewallArgs.builder()        
 *             .network(defaultNetwork.id())
 *             .sourceRanges(&#34;10.1.2.0/24&#34;)
 *             .allows(            
 *                 FirewallAllowArgs.builder()
 *                     .protocol(&#34;tcp&#34;)
 *                     .build(),
 *                 FirewallAllowArgs.builder()
 *                     .protocol(&#34;udp&#34;)
 *                     .build(),
 *                 FirewallAllowArgs.builder()
 *                     .protocol(&#34;icmp&#34;)
 *                     .build())
 *             .direction(&#34;INGRESS&#34;)
 *             .build(), CustomResourceOptions.builder()
 *                 .provider(google_beta)
 *                 .build());
 * 
 *         var fw2 = new Firewall(&#34;fw2&#34;, FirewallArgs.builder()        
 *             .network(defaultNetwork.id())
 *             .sourceRanges(&#34;0.0.0.0/0&#34;)
 *             .allows(FirewallAllowArgs.builder()
 *                 .protocol(&#34;tcp&#34;)
 *                 .ports(&#34;22&#34;)
 *                 .build())
 *             .targetTags(&#34;allow-ssh&#34;)
 *             .direction(&#34;INGRESS&#34;)
 *             .build(), CustomResourceOptions.builder()
 *                 .provider(google_beta)
 *                 .dependsOn(fw1)
 *                 .build());
 * 
 *         var fw3 = new Firewall(&#34;fw3&#34;, FirewallArgs.builder()        
 *             .network(defaultNetwork.id())
 *             .sourceRanges(            
 *                 &#34;130.211.0.0/22&#34;,
 *                 &#34;35.191.0.0/16&#34;)
 *             .allows(FirewallAllowArgs.builder()
 *                 .protocol(&#34;tcp&#34;)
 *                 .build())
 *             .targetTags(&#34;load-balanced-backend&#34;)
 *             .direction(&#34;INGRESS&#34;)
 *             .build(), CustomResourceOptions.builder()
 *                 .provider(google_beta)
 *                 .dependsOn(fw2)
 *                 .build());
 * 
 *         var fw4 = new Firewall(&#34;fw4&#34;, FirewallArgs.builder()        
 *             .network(defaultNetwork.id())
 *             .sourceRanges(&#34;10.129.0.0/26&#34;)
 *             .targetTags(&#34;load-balanced-backend&#34;)
 *             .allows(            
 *                 FirewallAllowArgs.builder()
 *                     .protocol(&#34;tcp&#34;)
 *                     .ports(&#34;80&#34;)
 *                     .build(),
 *                 FirewallAllowArgs.builder()
 *                     .protocol(&#34;tcp&#34;)
 *                     .ports(&#34;443&#34;)
 *                     .build(),
 *                 FirewallAllowArgs.builder()
 *                     .protocol(&#34;tcp&#34;)
 *                     .ports(&#34;8000&#34;)
 *                     .build())
 *             .direction(&#34;INGRESS&#34;)
 *             .build(), CustomResourceOptions.builder()
 *                 .provider(google_beta)
 *                 .dependsOn(fw3)
 *                 .build());
 * 
 *         var defaultRegionHealthCheck = new RegionHealthCheck(&#34;defaultRegionHealthCheck&#34;, RegionHealthCheckArgs.builder()        
 *             .region(&#34;us-central1&#34;)
 *             .httpHealthCheck(RegionHealthCheckHttpHealthCheckArgs.builder()
 *                 .portSpecification(&#34;USE_SERVING_PORT&#34;)
 *                 .build())
 *             .build(), CustomResourceOptions.builder()
 *                 .provider(google_beta)
 *                 .dependsOn(fw4)
 *                 .build());
 * 
 *         var defaultRegionBackendService = new RegionBackendService(&#34;defaultRegionBackendService&#34;, RegionBackendServiceArgs.builder()        
 *             .loadBalancingScheme(&#34;EXTERNAL_MANAGED&#34;)
 *             .backends(RegionBackendServiceBackendArgs.builder()
 *                 .group(rigm.instanceGroup())
 *                 .balancingMode(&#34;UTILIZATION&#34;)
 *                 .capacityScaler(1)
 *                 .build())
 *             .region(&#34;us-central1&#34;)
 *             .protocol(&#34;HTTP&#34;)
 *             .timeoutSec(10)
 *             .healthChecks(defaultRegionHealthCheck.id())
 *             .build(), CustomResourceOptions.builder()
 *                 .provider(google_beta)
 *                 .build());
 * 
 *         var defaultRegionUrlMap = new RegionUrlMap(&#34;defaultRegionUrlMap&#34;, RegionUrlMapArgs.builder()        
 *             .region(&#34;us-central1&#34;)
 *             .defaultService(defaultRegionBackendService.id())
 *             .build(), CustomResourceOptions.builder()
 *                 .provider(google_beta)
 *                 .build());
 * 
 *         var defaultRegionTargetHttpProxy = new RegionTargetHttpProxy(&#34;defaultRegionTargetHttpProxy&#34;, RegionTargetHttpProxyArgs.builder()        
 *             .region(&#34;us-central1&#34;)
 *             .urlMap(defaultRegionUrlMap.id())
 *             .build(), CustomResourceOptions.builder()
 *                 .provider(google_beta)
 *                 .build());
 * 
 *         var defaultAddress = new Address(&#34;defaultAddress&#34;, AddressArgs.builder()        
 *             .region(&#34;us-central1&#34;)
 *             .networkTier(&#34;STANDARD&#34;)
 *             .build(), CustomResourceOptions.builder()
 *                 .provider(google_beta)
 *                 .build());
 * 
 *         var proxy = new Subnetwork(&#34;proxy&#34;, SubnetworkArgs.builder()        
 *             .ipCidrRange(&#34;10.129.0.0/26&#34;)
 *             .region(&#34;us-central1&#34;)
 *             .network(defaultNetwork.id())
 *             .purpose(&#34;REGIONAL_MANAGED_PROXY&#34;)
 *             .role(&#34;ACTIVE&#34;)
 *             .build(), CustomResourceOptions.builder()
 *                 .provider(google_beta)
 *                 .build());
 * 
 *         var defaultForwardingRule = new ForwardingRule(&#34;defaultForwardingRule&#34;, ForwardingRuleArgs.builder()        
 *             .region(&#34;us-central1&#34;)
 *             .ipProtocol(&#34;TCP&#34;)
 *             .loadBalancingScheme(&#34;EXTERNAL_MANAGED&#34;)
 *             .portRange(&#34;80&#34;)
 *             .target(defaultRegionTargetHttpProxy.id())
 *             .network(defaultNetwork.id())
 *             .ipAddress(defaultAddress.id())
 *             .networkTier(&#34;STANDARD&#34;)
 *             .build(), CustomResourceOptions.builder()
 *                 .provider(google_beta)
 *                 .dependsOn(proxy)
 *                 .build());
 * 
 *     }
 * }
 * ```
 * ### Forwarding Rule Vpc Psc
 * 
 * ```java
 * package generated_program;
 * 
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.gcp.compute.Network;
 * import com.pulumi.gcp.compute.NetworkArgs;
 * import com.pulumi.gcp.compute.Subnetwork;
 * import com.pulumi.gcp.compute.SubnetworkArgs;
 * import com.pulumi.gcp.compute.Address;
 * import com.pulumi.gcp.compute.AddressArgs;
 * import com.pulumi.gcp.compute.HealthCheck;
 * import com.pulumi.gcp.compute.HealthCheckArgs;
 * import com.pulumi.gcp.compute.inputs.HealthCheckTcpHealthCheckArgs;
 * import com.pulumi.gcp.compute.RegionBackendService;
 * import com.pulumi.gcp.compute.RegionBackendServiceArgs;
 * import com.pulumi.gcp.compute.ForwardingRule;
 * import com.pulumi.gcp.compute.ForwardingRuleArgs;
 * import com.pulumi.gcp.compute.ServiceAttachment;
 * import com.pulumi.gcp.compute.ServiceAttachmentArgs;
 * 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) {
 *         var consumerNet = new Network(&#34;consumerNet&#34;, NetworkArgs.builder()        
 *             .autoCreateSubnetworks(false)
 *             .build());
 * 
 *         var consumerSubnet = new Subnetwork(&#34;consumerSubnet&#34;, SubnetworkArgs.builder()        
 *             .ipCidrRange(&#34;10.0.0.0/16&#34;)
 *             .region(&#34;us-central1&#34;)
 *             .network(consumerNet.id())
 *             .build());
 * 
 *         var consumerAddress = new Address(&#34;consumerAddress&#34;, AddressArgs.builder()        
 *             .region(&#34;us-central1&#34;)
 *             .subnetwork(consumerSubnet.id())
 *             .addressType(&#34;INTERNAL&#34;)
 *             .build());
 * 
 *         var producerNet = new Network(&#34;producerNet&#34;, NetworkArgs.builder()        
 *             .autoCreateSubnetworks(false)
 *             .build());
 * 
 *         var pscProducerSubnet = new Subnetwork(&#34;pscProducerSubnet&#34;, SubnetworkArgs.builder()        
 *             .ipCidrRange(&#34;10.1.0.0/16&#34;)
 *             .region(&#34;us-central1&#34;)
 *             .purpose(&#34;PRIVATE_SERVICE_CONNECT&#34;)
 *             .network(producerNet.id())
 *             .build());
 * 
 *         var producerSubnet = new Subnetwork(&#34;producerSubnet&#34;, SubnetworkArgs.builder()        
 *             .ipCidrRange(&#34;10.0.0.0/16&#34;)
 *             .region(&#34;us-central1&#34;)
 *             .network(producerNet.id())
 *             .build());
 * 
 *         var producerServiceHealthCheck = new HealthCheck(&#34;producerServiceHealthCheck&#34;, HealthCheckArgs.builder()        
 *             .checkIntervalSec(1)
 *             .timeoutSec(1)
 *             .tcpHealthCheck(HealthCheckTcpHealthCheckArgs.builder()
 *                 .port(&#34;80&#34;)
 *                 .build())
 *             .build());
 * 
 *         var producerServiceBackend = new RegionBackendService(&#34;producerServiceBackend&#34;, RegionBackendServiceArgs.builder()        
 *             .region(&#34;us-central1&#34;)
 *             .healthChecks(producerServiceHealthCheck.id())
 *             .build());
 * 
 *         var producerTargetService = new ForwardingRule(&#34;producerTargetService&#34;, ForwardingRuleArgs.builder()        
 *             .region(&#34;us-central1&#34;)
 *             .loadBalancingScheme(&#34;INTERNAL&#34;)
 *             .backendService(producerServiceBackend.id())
 *             .allPorts(true)
 *             .network(producerNet.name())
 *             .subnetwork(producerSubnet.name())
 *             .build());
 * 
 *         var producerServiceAttachment = new ServiceAttachment(&#34;producerServiceAttachment&#34;, ServiceAttachmentArgs.builder()        
 *             .region(&#34;us-central1&#34;)
 *             .description(&#34;A service attachment configured with Terraform&#34;)
 *             .enableProxyProtocol(true)
 *             .connectionPreference(&#34;ACCEPT_AUTOMATIC&#34;)
 *             .natSubnets(pscProducerSubnet.name())
 *             .targetService(producerTargetService.id())
 *             .build());
 * 
 *         var default_ = new ForwardingRule(&#34;default&#34;, ForwardingRuleArgs.builder()        
 *             .region(&#34;us-central1&#34;)
 *             .loadBalancingScheme(&#34;&#34;)
 *             .target(producerServiceAttachment.id())
 *             .network(consumerNet.name())
 *             .ipAddress(consumerAddress.id())
 *             .allowPscGlobalAccess(true)
 *             .build());
 * 
 *     }
 * }
 * ```
 * ### Forwarding Rule Vpc Psc No Automate Dns
 * 
 * ```java
 * package generated_program;
 * 
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.gcp.compute.Network;
 * import com.pulumi.gcp.compute.NetworkArgs;
 * import com.pulumi.gcp.compute.Subnetwork;
 * import com.pulumi.gcp.compute.SubnetworkArgs;
 * import com.pulumi.gcp.compute.Address;
 * import com.pulumi.gcp.compute.AddressArgs;
 * import com.pulumi.gcp.compute.HealthCheck;
 * import com.pulumi.gcp.compute.HealthCheckArgs;
 * import com.pulumi.gcp.compute.inputs.HealthCheckTcpHealthCheckArgs;
 * import com.pulumi.gcp.compute.RegionBackendService;
 * import com.pulumi.gcp.compute.RegionBackendServiceArgs;
 * import com.pulumi.gcp.compute.ForwardingRule;
 * import com.pulumi.gcp.compute.ForwardingRuleArgs;
 * import com.pulumi.gcp.compute.ServiceAttachment;
 * import com.pulumi.gcp.compute.ServiceAttachmentArgs;
 * 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) {
 *         var consumerNet = new Network(&#34;consumerNet&#34;, NetworkArgs.builder()        
 *             .autoCreateSubnetworks(false)
 *             .build());
 * 
 *         var consumerSubnet = new Subnetwork(&#34;consumerSubnet&#34;, SubnetworkArgs.builder()        
 *             .ipCidrRange(&#34;10.0.0.0/16&#34;)
 *             .region(&#34;us-central1&#34;)
 *             .network(consumerNet.id())
 *             .build());
 * 
 *         var consumerAddress = new Address(&#34;consumerAddress&#34;, AddressArgs.builder()        
 *             .region(&#34;us-central1&#34;)
 *             .subnetwork(consumerSubnet.id())
 *             .addressType(&#34;INTERNAL&#34;)
 *             .build());
 * 
 *         var producerNet = new Network(&#34;producerNet&#34;, NetworkArgs.builder()        
 *             .autoCreateSubnetworks(false)
 *             .build());
 * 
 *         var pscProducerSubnet = new Subnetwork(&#34;pscProducerSubnet&#34;, SubnetworkArgs.builder()        
 *             .ipCidrRange(&#34;10.1.0.0/16&#34;)
 *             .region(&#34;us-central1&#34;)
 *             .purpose(&#34;PRIVATE_SERVICE_CONNECT&#34;)
 *             .network(producerNet.id())
 *             .build());
 * 
 *         var producerSubnet = new Subnetwork(&#34;producerSubnet&#34;, SubnetworkArgs.builder()        
 *             .ipCidrRange(&#34;10.0.0.0/16&#34;)
 *             .region(&#34;us-central1&#34;)
 *             .network(producerNet.id())
 *             .build());
 * 
 *         var producerServiceHealthCheck = new HealthCheck(&#34;producerServiceHealthCheck&#34;, HealthCheckArgs.builder()        
 *             .checkIntervalSec(1)
 *             .timeoutSec(1)
 *             .tcpHealthCheck(HealthCheckTcpHealthCheckArgs.builder()
 *                 .port(&#34;80&#34;)
 *                 .build())
 *             .build());
 * 
 *         var producerServiceBackend = new RegionBackendService(&#34;producerServiceBackend&#34;, RegionBackendServiceArgs.builder()        
 *             .region(&#34;us-central1&#34;)
 *             .healthChecks(producerServiceHealthCheck.id())
 *             .build());
 * 
 *         var producerTargetService = new ForwardingRule(&#34;producerTargetService&#34;, ForwardingRuleArgs.builder()        
 *             .region(&#34;us-central1&#34;)
 *             .loadBalancingScheme(&#34;INTERNAL&#34;)
 *             .backendService(producerServiceBackend.id())
 *             .allPorts(true)
 *             .network(producerNet.name())
 *             .subnetwork(producerSubnet.name())
 *             .build());
 * 
 *         var producerServiceAttachment = new ServiceAttachment(&#34;producerServiceAttachment&#34;, ServiceAttachmentArgs.builder()        
 *             .region(&#34;us-central1&#34;)
 *             .description(&#34;A service attachment configured with Terraform&#34;)
 *             .enableProxyProtocol(true)
 *             .connectionPreference(&#34;ACCEPT_AUTOMATIC&#34;)
 *             .natSubnets(pscProducerSubnet.name())
 *             .targetService(producerTargetService.id())
 *             .build());
 * 
 *         var default_ = new ForwardingRule(&#34;default&#34;, ForwardingRuleArgs.builder()        
 *             .region(&#34;us-central1&#34;)
 *             .loadBalancingScheme(&#34;&#34;)
 *             .target(producerServiceAttachment.id())
 *             .network(consumerNet.name())
 *             .ipAddress(consumerAddress.id())
 *             .allowPscGlobalAccess(true)
 *             .noAutomateDnsZone(true)
 *             .build());
 * 
 *     }
 * }
 * ```
 * ### Forwarding Rule Regional Steering
 * ```java
 * package generated_program;
 * 
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.gcp.compute.Address;
 * import com.pulumi.gcp.compute.AddressArgs;
 * import com.pulumi.gcp.compute.RegionBackendService;
 * import com.pulumi.gcp.compute.RegionBackendServiceArgs;
 * import com.pulumi.gcp.compute.ForwardingRule;
 * import com.pulumi.gcp.compute.ForwardingRuleArgs;
 * import com.pulumi.resources.CustomResourceOptions;
 * 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) {
 *         var basic = new Address(&#34;basic&#34;, AddressArgs.builder()        
 *             .region(&#34;us-central1&#34;)
 *             .build());
 * 
 *         var externalRegionBackendService = new RegionBackendService(&#34;externalRegionBackendService&#34;, RegionBackendServiceArgs.builder()        
 *             .region(&#34;us-central1&#34;)
 *             .loadBalancingScheme(&#34;EXTERNAL&#34;)
 *             .build());
 * 
 *         var externalForwardingRule = new ForwardingRule(&#34;externalForwardingRule&#34;, ForwardingRuleArgs.builder()        
 *             .region(&#34;us-central1&#34;)
 *             .ipAddress(basic.selfLink())
 *             .backendService(externalRegionBackendService.selfLink())
 *             .loadBalancingScheme(&#34;EXTERNAL&#34;)
 *             .build());
 * 
 *         var steering = new ForwardingRule(&#34;steering&#34;, ForwardingRuleArgs.builder()        
 *             .region(&#34;us-central1&#34;)
 *             .ipAddress(basic.selfLink())
 *             .backendService(externalRegionBackendService.selfLink())
 *             .loadBalancingScheme(&#34;EXTERNAL&#34;)
 *             .sourceIpRanges(            
 *                 &#34;34.121.88.0/24&#34;,
 *                 &#34;35.187.239.137&#34;)
 *             .build(), CustomResourceOptions.builder()
 *                 .dependsOn(externalForwardingRule)
 *                 .build());
 * 
 *     }
 * }
 * ```
 * ### Forwarding Rule Internallb Ipv6
 * 
 * ```java
 * package generated_program;
 * 
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.gcp.compute.HealthCheck;
 * import com.pulumi.gcp.compute.HealthCheckArgs;
 * import com.pulumi.gcp.compute.inputs.HealthCheckTcpHealthCheckArgs;
 * import com.pulumi.gcp.compute.RegionBackendService;
 * import com.pulumi.gcp.compute.RegionBackendServiceArgs;
 * import com.pulumi.gcp.compute.Network;
 * import com.pulumi.gcp.compute.NetworkArgs;
 * import com.pulumi.gcp.compute.Subnetwork;
 * import com.pulumi.gcp.compute.SubnetworkArgs;
 * import com.pulumi.gcp.compute.ForwardingRule;
 * import com.pulumi.gcp.compute.ForwardingRuleArgs;
 * 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) {
 *         var hc = new HealthCheck(&#34;hc&#34;, HealthCheckArgs.builder()        
 *             .checkIntervalSec(1)
 *             .timeoutSec(1)
 *             .tcpHealthCheck(HealthCheckTcpHealthCheckArgs.builder()
 *                 .port(&#34;80&#34;)
 *                 .build())
 *             .build());
 * 
 *         var backend = new RegionBackendService(&#34;backend&#34;, RegionBackendServiceArgs.builder()        
 *             .region(&#34;us-central1&#34;)
 *             .healthChecks(hc.id())
 *             .build());
 * 
 *         var defaultNetwork = new Network(&#34;defaultNetwork&#34;, NetworkArgs.builder()        
 *             .autoCreateSubnetworks(false)
 *             .enableUlaInternalIpv6(true)
 *             .build());
 * 
 *         var defaultSubnetwork = new Subnetwork(&#34;defaultSubnetwork&#34;, SubnetworkArgs.builder()        
 *             .ipCidrRange(&#34;10.0.0.0/16&#34;)
 *             .region(&#34;us-central1&#34;)
 *             .stackType(&#34;IPV4_IPV6&#34;)
 *             .ipv6AccessType(&#34;INTERNAL&#34;)
 *             .network(defaultNetwork.id())
 *             .build());
 * 
 *         var defaultForwardingRule = new ForwardingRule(&#34;defaultForwardingRule&#34;, ForwardingRuleArgs.builder()        
 *             .region(&#34;us-central1&#34;)
 *             .loadBalancingScheme(&#34;INTERNAL&#34;)
 *             .backendService(backend.id())
 *             .allPorts(true)
 *             .network(defaultNetwork.name())
 *             .subnetwork(defaultSubnetwork.name())
 *             .ipVersion(&#34;IPV6&#34;)
 *             .build());
 * 
 *     }
 * }
 * ```
 * 
 * ## Import
 * 
 * ForwardingRule can be imported using any of these accepted formats
 * 
 * ```sh
 *  $ pulumi import gcp:compute/forwardingRule:ForwardingRule default projects/{{project}}/regions/{{region}}/forwardingRules/{{name}}
 * ```
 * 
 * ```sh
 *  $ pulumi import gcp:compute/forwardingRule:ForwardingRule default {{project}}/{{region}}/{{name}}
 * ```
 * 
 * ```sh
 *  $ pulumi import gcp:compute/forwardingRule:ForwardingRule default {{region}}/{{name}}
 * ```
 * 
 * ```sh
 *  $ pulumi import gcp:compute/forwardingRule:ForwardingRule default {{name}}
 * ```
 * 
 */
@ResourceType(type="gcp:compute/forwardingRule:ForwardingRule")
public class ForwardingRule extends com.pulumi.resources.CustomResource {
    /**
     * This field can only be used:
     * * If `IPProtocol` is one of TCP, UDP, or SCTP.
     * * By internal TCP/UDP load balancers, backend service-based network load
     *   balancers, and internal and external protocol forwarding.
     *   This option should be set to TRUE when the Forwarding Rule
     *   IPProtocol is set to L3_DEFAULT.
     *   Set this field to true to allow packets addressed to any port or packets
     *   lacking destination port information (for example, UDP fragments after the
     *   first fragment) to be forwarded to the backends configured with this
     *   forwarding rule.
     *   The `ports`, `port_range`, and
     *   `allPorts` fields are mutually exclusive.
     * 
     */
    @Export(name="allPorts", type=Boolean.class, parameters={})
    private Output</* @Nullable */ Boolean> allPorts;

    /**
     * @return This field can only be used:
     * * If `IPProtocol` is one of TCP, UDP, or SCTP.
     * * By internal TCP/UDP load balancers, backend service-based network load
     *   balancers, and internal and external protocol forwarding.
     *   This option should be set to TRUE when the Forwarding Rule
     *   IPProtocol is set to L3_DEFAULT.
     *   Set this field to true to allow packets addressed to any port or packets
     *   lacking destination port information (for example, UDP fragments after the
     *   first fragment) to be forwarded to the backends configured with this
     *   forwarding rule.
     *   The `ports`, `port_range`, and
     *   `allPorts` fields are mutually exclusive.
     * 
     */
    public Output<Optional<Boolean>> allPorts() {
        return Codegen.optional(this.allPorts);
    }
    /**
     * This field is used along with the `backend_service` field for
     * internal load balancing or with the `target` field for internal
     * TargetInstance.
     * If the field is set to `TRUE`, clients can access ILB from all
     * regions.
     * Otherwise only allows access from clients in the same region as the
     * internal load balancer.
     * 
     */
    @Export(name="allowGlobalAccess", type=Boolean.class, parameters={})
    private Output</* @Nullable */ Boolean> allowGlobalAccess;

    /**
     * @return This field is used along with the `backend_service` field for
     * internal load balancing or with the `target` field for internal
     * TargetInstance.
     * If the field is set to `TRUE`, clients can access ILB from all
     * regions.
     * Otherwise only allows access from clients in the same region as the
     * internal load balancer.
     * 
     */
    public Output<Optional<Boolean>> allowGlobalAccess() {
        return Codegen.optional(this.allowGlobalAccess);
    }
    /**
     * This is used in PSC consumer ForwardingRule to control whether the PSC endpoint can be accessed from another region.
     * 
     */
    @Export(name="allowPscGlobalAccess", type=Boolean.class, parameters={})
    private Output</* @Nullable */ Boolean> allowPscGlobalAccess;

    /**
     * @return This is used in PSC consumer ForwardingRule to control whether the PSC endpoint can be accessed from another region.
     * 
     */
    public Output<Optional<Boolean>> allowPscGlobalAccess() {
        return Codegen.optional(this.allowPscGlobalAccess);
    }
    /**
     * Identifies the backend service to which the forwarding rule sends traffic.
     * Required for Internal TCP/UDP Load Balancing and Network Load Balancing;
     * must be omitted for all other load balancer types.
     * 
     */
    @Export(name="backendService", type=String.class, parameters={})
    private Output</* @Nullable */ String> backendService;

    /**
     * @return Identifies the backend service to which the forwarding rule sends traffic.
     * Required for Internal TCP/UDP Load Balancing and Network Load Balancing;
     * must be omitted for all other load balancer types.
     * 
     */
    public Output<Optional<String>> backendService() {
        return Codegen.optional(this.backendService);
    }
    /**
     * [Output Only] The URL for the corresponding base Forwarding Rule. By base Forwarding Rule, we mean the Forwarding Rule that has the same IP address, protocol, and port settings with the current Forwarding Rule, but without sourceIPRanges specified. Always empty if the current Forwarding Rule does not have sourceIPRanges specified.
     * 
     */
    @Export(name="baseForwardingRule", type=String.class, parameters={})
    private Output<String> baseForwardingRule;

    /**
     * @return [Output Only] The URL for the corresponding base Forwarding Rule. By base Forwarding Rule, we mean the Forwarding Rule that has the same IP address, protocol, and port settings with the current Forwarding Rule, but without sourceIPRanges specified. Always empty if the current Forwarding Rule does not have sourceIPRanges specified.
     * 
     */
    public Output<String> baseForwardingRule() {
        return this.baseForwardingRule;
    }
    /**
     * Creation timestamp in RFC3339 text format.
     * 
     */
    @Export(name="creationTimestamp", type=String.class, parameters={})
    private Output<String> creationTimestamp;

    /**
     * @return Creation timestamp in RFC3339 text format.
     * 
     */
    public Output<String> creationTimestamp() {
        return this.creationTimestamp;
    }
    /**
     * An optional description of this resource. Provide this property when
     * you create the resource.
     * 
     */
    @Export(name="description", type=String.class, parameters={})
    private Output</* @Nullable */ String> description;

    /**
     * @return An optional description of this resource. Provide this property when
     * you create the resource.
     * 
     */
    public Output<Optional<String>> description() {
        return Codegen.optional(this.description);
    }
    /**
     * IP address for which this forwarding rule accepts traffic. When a client
     * sends traffic to this IP address, the forwarding rule directs the traffic
     * to the referenced `target` or `backendService`.
     * While creating a forwarding rule, specifying an `IPAddress` is
     * required under the following circumstances:
     * * When the `target` is set to `targetGrpcProxy` and
     *   `validateForProxyless` is set to `true`, the
     *   `IPAddress` should be set to `0.0.0.0`.
     * * When the `target` is a Private Service Connect Google APIs
     *   bundle, you must specify an `IPAddress`.
     * 
     * Otherwise, you can optionally specify an IP address that references an
     * existing static (reserved) IP address resource. When omitted, Google Cloud
     * assigns an ephemeral IP address.
     * Use one of the following formats to specify an IP address while creating a
     * forwarding rule:
     * * IP address number, as in `100.1.2.3`
     * * IPv6 address range, as in `2600:1234::/96`
     * * Full resource URL, as in
     *   `https://www.googleapis.com/compute/v1/projects/project_id/regions/region/addresses/address-name`
     * * Partial URL or by name, as in:
     * * `projects/project_id/regions/region/addresses/address-name`
     * * `regions/region/addresses/address-name`
     * * `global/addresses/address-name`
     * * `address-name`
     * 
     * The forwarding rule&#39;s `target` or `backendService`,
     * and in most cases, also the `loadBalancingScheme`, determine the
     * type of IP address that you can use. For detailed information, see
     * [IP address
     * specifications](https://cloud.google.com/load-balancing/docs/forwarding-rule-concepts#ip_address_specifications).
     * When reading an `IPAddress`, the API always returns the IP
     * address number.
     * 
     */
    @Export(name="ipAddress", type=String.class, parameters={})
    private Output<String> ipAddress;

    /**
     * @return IP address for which this forwarding rule accepts traffic. When a client
     * sends traffic to this IP address, the forwarding rule directs the traffic
     * to the referenced `target` or `backendService`.
     * While creating a forwarding rule, specifying an `IPAddress` is
     * required under the following circumstances:
     * * When the `target` is set to `targetGrpcProxy` and
     *   `validateForProxyless` is set to `true`, the
     *   `IPAddress` should be set to `0.0.0.0`.
     * * When the `target` is a Private Service Connect Google APIs
     *   bundle, you must specify an `IPAddress`.
     * 
     * Otherwise, you can optionally specify an IP address that references an
     * existing static (reserved) IP address resource. When omitted, Google Cloud
     * assigns an ephemeral IP address.
     * Use one of the following formats to specify an IP address while creating a
     * forwarding rule:
     * * IP address number, as in `100.1.2.3`
     * * IPv6 address range, as in `2600:1234::/96`
     * * Full resource URL, as in
     *   `https://www.googleapis.com/compute/v1/projects/project_id/regions/region/addresses/address-name`
     * * Partial URL or by name, as in:
     * * `projects/project_id/regions/region/addresses/address-name`
     * * `regions/region/addresses/address-name`
     * * `global/addresses/address-name`
     * * `address-name`
     * 
     * The forwarding rule&#39;s `target` or `backendService`,
     * and in most cases, also the `loadBalancingScheme`, determine the
     * type of IP address that you can use. For detailed information, see
     * [IP address
     * specifications](https://cloud.google.com/load-balancing/docs/forwarding-rule-concepts#ip_address_specifications).
     * When reading an `IPAddress`, the API always returns the IP
     * address number.
     * 
     */
    public Output<String> ipAddress() {
        return this.ipAddress;
    }
    /**
     * The IP protocol to which this rule applies.
     * For protocol forwarding, valid
     * options are `TCP`, `UDP`, `ESP`,
     * `AH`, `SCTP`, `ICMP` and
     * `L3_DEFAULT`.
     * The valid IP protocols are different for different load balancing products
     * as described in [Load balancing
     * features](https://cloud.google.com/load-balancing/docs/features#protocols_from_the_load_balancer_to_the_backends).
     * A Forwarding Rule with protocol L3_DEFAULT can attach with target instance or
     * backend service with UNSPECIFIED protocol.
     * A forwarding rule with &#34;L3_DEFAULT&#34; IPProtocal cannot be attached to a backend service with TCP or UDP.
     * Possible values are: `TCP`, `UDP`, `ESP`, `AH`, `SCTP`, `ICMP`, `L3_DEFAULT`.
     * 
     */
    @Export(name="ipProtocol", type=String.class, parameters={})
    private Output<String> ipProtocol;

    /**
     * @return The IP protocol to which this rule applies.
     * For protocol forwarding, valid
     * options are `TCP`, `UDP`, `ESP`,
     * `AH`, `SCTP`, `ICMP` and
     * `L3_DEFAULT`.
     * The valid IP protocols are different for different load balancing products
     * as described in [Load balancing
     * features](https://cloud.google.com/load-balancing/docs/features#protocols_from_the_load_balancer_to_the_backends).
     * A Forwarding Rule with protocol L3_DEFAULT can attach with target instance or
     * backend service with UNSPECIFIED protocol.
     * A forwarding rule with &#34;L3_DEFAULT&#34; IPProtocal cannot be attached to a backend service with TCP or UDP.
     * Possible values are: `TCP`, `UDP`, `ESP`, `AH`, `SCTP`, `ICMP`, `L3_DEFAULT`.
     * 
     */
    public Output<String> ipProtocol() {
        return this.ipProtocol;
    }
    /**
     * The IP address version that will be used by this forwarding rule.
     * Valid options are IPV4 and IPV6.
     * If not set, the IPv4 address will be used by default.
     * Possible values are: `IPV4`, `IPV6`.
     * 
     */
    @Export(name="ipVersion", type=String.class, parameters={})
    private Output<String> ipVersion;

    /**
     * @return The IP address version that will be used by this forwarding rule.
     * Valid options are IPV4 and IPV6.
     * If not set, the IPv4 address will be used by default.
     * Possible values are: `IPV4`, `IPV6`.
     * 
     */
    public Output<String> ipVersion() {
        return this.ipVersion;
    }
    /**
     * Indicates whether or not this load balancer can be used as a collector for
     * packet mirroring. To prevent mirroring loops, instances behind this
     * load balancer will not have their traffic mirrored even if a
     * `PacketMirroring` rule applies to them.
     * This can only be set to true for load balancers that have their
     * `loadBalancingScheme` set to `INTERNAL`.
     * 
     */
    @Export(name="isMirroringCollector", type=Boolean.class, parameters={})
    private Output</* @Nullable */ Boolean> isMirroringCollector;

    /**
     * @return Indicates whether or not this load balancer can be used as a collector for
     * packet mirroring. To prevent mirroring loops, instances behind this
     * load balancer will not have their traffic mirrored even if a
     * `PacketMirroring` rule applies to them.
     * This can only be set to true for load balancers that have their
     * `loadBalancingScheme` set to `INTERNAL`.
     * 
     */
    public Output<Optional<Boolean>> isMirroringCollector() {
        return Codegen.optional(this.isMirroringCollector);
    }
    /**
     * The fingerprint used for optimistic locking of this resource.  Used
     * internally during updates.
     * 
     */
    @Export(name="labelFingerprint", type=String.class, parameters={})
    private Output<String> labelFingerprint;

    /**
     * @return The fingerprint used for optimistic locking of this resource.  Used
     * internally during updates.
     * 
     */
    public Output<String> labelFingerprint() {
        return this.labelFingerprint;
    }
    /**
     * Labels to apply to this forwarding rule.  A list of key-&gt;value pairs.
     * 
     */
    @Export(name="labels", type=Map.class, parameters={String.class, String.class})
    private Output</* @Nullable */ Map<String,String>> labels;

    /**
     * @return Labels to apply to this forwarding rule.  A list of key-&gt;value pairs.
     * 
     */
    public Output<Optional<Map<String,String>>> labels() {
        return Codegen.optional(this.labels);
    }
    /**
     * Specifies the forwarding rule type.
     * For more information about forwarding rules, refer to
     * [Forwarding rule concepts](https://cloud.google.com/load-balancing/docs/forwarding-rule-concepts).
     * Default value is `EXTERNAL`.
     * Possible values are: `EXTERNAL`, `EXTERNAL_MANAGED`, `INTERNAL`, `INTERNAL_MANAGED`.
     * 
     */
    @Export(name="loadBalancingScheme", type=String.class, parameters={})
    private Output</* @Nullable */ String> loadBalancingScheme;

    /**
     * @return Specifies the forwarding rule type.
     * For more information about forwarding rules, refer to
     * [Forwarding rule concepts](https://cloud.google.com/load-balancing/docs/forwarding-rule-concepts).
     * Default value is `EXTERNAL`.
     * Possible values are: `EXTERNAL`, `EXTERNAL_MANAGED`, `INTERNAL`, `INTERNAL_MANAGED`.
     * 
     */
    public Output<Optional<String>> loadBalancingScheme() {
        return Codegen.optional(this.loadBalancingScheme);
    }
    /**
     * Name of the resource; provided by the client when the resource is created.
     * The name must be 1-63 characters long, and comply with
     * [RFC1035](https://www.ietf.org/rfc/rfc1035.txt).
     * Specifically, the name must be 1-63 characters long and match the regular
     * expression `a-z?` which means the first
     * character must be a lowercase letter, and all following characters must
     * be a dash, lowercase letter, or digit, except the last character, which
     * cannot be a dash.
     * For Private Service Connect forwarding rules that forward traffic to Google
     * APIs, the forwarding rule name must be a 1-20 characters string with
     * lowercase letters and numbers and must start with a letter.
     * 
     * ***
     * 
     */
    @Export(name="name", type=String.class, parameters={})
    private Output<String> name;

    /**
     * @return Name of the resource; provided by the client when the resource is created.
     * The name must be 1-63 characters long, and comply with
     * [RFC1035](https://www.ietf.org/rfc/rfc1035.txt).
     * Specifically, the name must be 1-63 characters long and match the regular
     * expression `a-z?` which means the first
     * character must be a lowercase letter, and all following characters must
     * be a dash, lowercase letter, or digit, except the last character, which
     * cannot be a dash.
     * For Private Service Connect forwarding rules that forward traffic to Google
     * APIs, the forwarding rule name must be a 1-20 characters string with
     * lowercase letters and numbers and must start with a letter.
     * 
     * ***
     * 
     */
    public Output<String> name() {
        return this.name;
    }
    /**
     * This field is not used for external load balancing.
     * For Internal TCP/UDP Load Balancing, this field identifies the network that
     * the load balanced IP should belong to for this Forwarding Rule.
     * If the subnetwork is specified, the network of the subnetwork will be used.
     * If neither subnetwork nor this field is specified, the default network will
     * be used.
     * For Private Service Connect forwarding rules that forward traffic to Google
     * APIs, a network must be provided.
     * 
     */
    @Export(name="network", type=String.class, parameters={})
    private Output<String> network;

    /**
     * @return This field is not used for external load balancing.
     * For Internal TCP/UDP Load Balancing, this field identifies the network that
     * the load balanced IP should belong to for this Forwarding Rule.
     * If the subnetwork is specified, the network of the subnetwork will be used.
     * If neither subnetwork nor this field is specified, the default network will
     * be used.
     * For Private Service Connect forwarding rules that forward traffic to Google
     * APIs, a network must be provided.
     * 
     */
    public Output<String> network() {
        return this.network;
    }
    /**
     * This signifies the networking tier used for configuring
     * this load balancer and can only take the following values:
     * `PREMIUM`, `STANDARD`.
     * For regional ForwardingRule, the valid values are `PREMIUM` and
     * `STANDARD`. For GlobalForwardingRule, the valid value is
     * `PREMIUM`.
     * If this field is not specified, it is assumed to be `PREMIUM`.
     * If `IPAddress` is specified, this value must be equal to the
     * networkTier of the Address.
     * Possible values are: `PREMIUM`, `STANDARD`.
     * 
     */
    @Export(name="networkTier", type=String.class, parameters={})
    private Output<String> networkTier;

    /**
     * @return This signifies the networking tier used for configuring
     * this load balancer and can only take the following values:
     * `PREMIUM`, `STANDARD`.
     * For regional ForwardingRule, the valid values are `PREMIUM` and
     * `STANDARD`. For GlobalForwardingRule, the valid value is
     * `PREMIUM`.
     * If this field is not specified, it is assumed to be `PREMIUM`.
     * If `IPAddress` is specified, this value must be equal to the
     * networkTier of the Address.
     * Possible values are: `PREMIUM`, `STANDARD`.
     * 
     */
    public Output<String> networkTier() {
        return this.networkTier;
    }
    /**
     * This is used in PSC consumer ForwardingRule to control whether it should try to auto-generate a DNS zone or not. Non-PSC forwarding rules do not use this field.
     * 
     */
    @Export(name="noAutomateDnsZone", type=Boolean.class, parameters={})
    private Output</* @Nullable */ Boolean> noAutomateDnsZone;

    /**
     * @return This is used in PSC consumer ForwardingRule to control whether it should try to auto-generate a DNS zone or not. Non-PSC forwarding rules do not use this field.
     * 
     */
    public Output<Optional<Boolean>> noAutomateDnsZone() {
        return Codegen.optional(this.noAutomateDnsZone);
    }
    /**
     * This field can only be used:
     * * If `IPProtocol` is one of TCP, UDP, or SCTP.
     * * By backend service-based network load balancers, target pool-based
     *   network load balancers, internal proxy load balancers, external proxy load
     *   balancers, Traffic Director, external protocol forwarding, and Classic VPN.
     *   Some products have restrictions on what ports can be used. See
     *   [port specifications](https://cloud.google.com/load-balancing/docs/forwarding-rule-concepts#port_specifications)
     *   for details.
     * 
     * Only packets addressed to ports in the specified range will be forwarded to
     * the backends configured with this forwarding rule.
     * The `ports` and `port_range` fields are mutually exclusive.
     * For external forwarding rules, two or more forwarding rules cannot use the
     * same `[IPAddress, IPProtocol]` pair, and cannot have
     * overlapping `portRange`s.
     * For internal forwarding rules within the same VPC network, two or more
     * forwarding rules cannot use the same `[IPAddress, IPProtocol]`
     * pair, and cannot have overlapping `portRange`s.
     * 
     */
    @Export(name="portRange", type=String.class, parameters={})
    private Output<String> portRange;

    /**
     * @return This field can only be used:
     * * If `IPProtocol` is one of TCP, UDP, or SCTP.
     * * By backend service-based network load balancers, target pool-based
     *   network load balancers, internal proxy load balancers, external proxy load
     *   balancers, Traffic Director, external protocol forwarding, and Classic VPN.
     *   Some products have restrictions on what ports can be used. See
     *   [port specifications](https://cloud.google.com/load-balancing/docs/forwarding-rule-concepts#port_specifications)
     *   for details.
     * 
     * Only packets addressed to ports in the specified range will be forwarded to
     * the backends configured with this forwarding rule.
     * The `ports` and `port_range` fields are mutually exclusive.
     * For external forwarding rules, two or more forwarding rules cannot use the
     * same `[IPAddress, IPProtocol]` pair, and cannot have
     * overlapping `portRange`s.
     * For internal forwarding rules within the same VPC network, two or more
     * forwarding rules cannot use the same `[IPAddress, IPProtocol]`
     * pair, and cannot have overlapping `portRange`s.
     * 
     */
    public Output<String> portRange() {
        return this.portRange;
    }
    /**
     * This field can only be used:
     * * If `IPProtocol` is one of TCP, UDP, or SCTP.
     * * By internal TCP/UDP load balancers, backend service-based network load
     *   balancers, internal protocol forwarding and when protocol is not L3_DEFAULT.
     * 
     * You can specify a list of up to five ports by number, separated by commas.
     * The ports can be contiguous or discontiguous. Only packets addressed to
     * these ports will be forwarded to the backends configured with this
     * forwarding rule.
     * For external forwarding rules, two or more forwarding rules cannot use the
     * same `[IPAddress, IPProtocol]` pair, and cannot share any values
     * defined in `ports`.
     * For internal forwarding rules within the same VPC network, two or more
     * forwarding rules cannot use the same `[IPAddress, IPProtocol]`
     * pair, and cannot share any values defined in `ports`.
     * The `ports` and `port_range` fields are mutually exclusive.
     * 
     */
    @Export(name="ports", type=List.class, parameters={String.class})
    private Output</* @Nullable */ List<String>> ports;

    /**
     * @return This field can only be used:
     * * If `IPProtocol` is one of TCP, UDP, or SCTP.
     * * By internal TCP/UDP load balancers, backend service-based network load
     *   balancers, internal protocol forwarding and when protocol is not L3_DEFAULT.
     * 
     * You can specify a list of up to five ports by number, separated by commas.
     * The ports can be contiguous or discontiguous. Only packets addressed to
     * these ports will be forwarded to the backends configured with this
     * forwarding rule.
     * For external forwarding rules, two or more forwarding rules cannot use the
     * same `[IPAddress, IPProtocol]` pair, and cannot share any values
     * defined in `ports`.
     * For internal forwarding rules within the same VPC network, two or more
     * forwarding rules cannot use the same `[IPAddress, IPProtocol]`
     * pair, and cannot share any values defined in `ports`.
     * The `ports` and `port_range` fields are mutually exclusive.
     * 
     */
    public Output<Optional<List<String>>> ports() {
        return Codegen.optional(this.ports);
    }
    /**
     * The ID of the project in which the resource belongs.
     * If it is not provided, the provider project is used.
     * 
     */
    @Export(name="project", type=String.class, parameters={})
    private Output<String> project;

    /**
     * @return The ID of the project in which the resource belongs.
     * If it is not provided, the provider project is used.
     * 
     */
    public Output<String> project() {
        return this.project;
    }
    /**
     * The PSC connection id of the PSC Forwarding Rule.
     * 
     */
    @Export(name="pscConnectionId", type=String.class, parameters={})
    private Output<String> pscConnectionId;

    /**
     * @return The PSC connection id of the PSC Forwarding Rule.
     * 
     */
    public Output<String> pscConnectionId() {
        return this.pscConnectionId;
    }
    /**
     * The PSC connection status of the PSC Forwarding Rule. Possible values: `STATUS_UNSPECIFIED`, `PENDING`, `ACCEPTED`, `REJECTED`, `CLOSED`
     * 
     */
    @Export(name="pscConnectionStatus", type=String.class, parameters={})
    private Output<String> pscConnectionStatus;

    /**
     * @return The PSC connection status of the PSC Forwarding Rule. Possible values: `STATUS_UNSPECIFIED`, `PENDING`, `ACCEPTED`, `REJECTED`, `CLOSED`
     * 
     */
    public Output<String> pscConnectionStatus() {
        return this.pscConnectionStatus;
    }
    /**
     * A reference to the region where the regional forwarding rule resides.
     * This field is not applicable to global forwarding rules.
     * 
     */
    @Export(name="region", type=String.class, parameters={})
    private Output<String> region;

    /**
     * @return A reference to the region where the regional forwarding rule resides.
     * This field is not applicable to global forwarding rules.
     * 
     */
    public Output<String> region() {
        return this.region;
    }
    /**
     * The URI of the created resource.
     * 
     */
    @Export(name="selfLink", type=String.class, parameters={})
    private Output<String> selfLink;

    /**
     * @return The URI of the created resource.
     * 
     */
    public Output<String> selfLink() {
        return this.selfLink;
    }
    /**
     * Service Directory resources to register this forwarding rule with.
     * Currently, only supports a single Service Directory resource.
     * Structure is documented below.
     * 
     */
    @Export(name="serviceDirectoryRegistrations", type=List.class, parameters={ForwardingRuleServiceDirectoryRegistration.class})
    private Output<List<ForwardingRuleServiceDirectoryRegistration>> serviceDirectoryRegistrations;

    /**
     * @return Service Directory resources to register this forwarding rule with.
     * Currently, only supports a single Service Directory resource.
     * Structure is documented below.
     * 
     */
    public Output<List<ForwardingRuleServiceDirectoryRegistration>> serviceDirectoryRegistrations() {
        return this.serviceDirectoryRegistrations;
    }
    /**
     * An optional prefix to the service name for this Forwarding Rule.
     * If specified, will be the first label of the fully qualified service
     * name.
     * The label must be 1-63 characters long, and comply with RFC1035.
     * Specifically, the label must be 1-63 characters long and match the
     * regular expression `a-z?` which means the first
     * character must be a lowercase letter, and all following characters
     * must be a dash, lowercase letter, or digit, except the last
     * character, which cannot be a dash.
     * This field is only used for INTERNAL load balancing.
     * 
     */
    @Export(name="serviceLabel", type=String.class, parameters={})
    private Output</* @Nullable */ String> serviceLabel;

    /**
     * @return An optional prefix to the service name for this Forwarding Rule.
     * If specified, will be the first label of the fully qualified service
     * name.
     * The label must be 1-63 characters long, and comply with RFC1035.
     * Specifically, the label must be 1-63 characters long and match the
     * regular expression `a-z?` which means the first
     * character must be a lowercase letter, and all following characters
     * must be a dash, lowercase letter, or digit, except the last
     * character, which cannot be a dash.
     * This field is only used for INTERNAL load balancing.
     * 
     */
    public Output<Optional<String>> serviceLabel() {
        return Codegen.optional(this.serviceLabel);
    }
    /**
     * The internal fully qualified service name for this Forwarding Rule.
     * This field is only used for INTERNAL load balancing.
     * 
     */
    @Export(name="serviceName", type=String.class, parameters={})
    private Output<String> serviceName;

    /**
     * @return The internal fully qualified service name for this Forwarding Rule.
     * This field is only used for INTERNAL load balancing.
     * 
     */
    public Output<String> serviceName() {
        return this.serviceName;
    }
    /**
     * If not empty, this Forwarding Rule will only forward the traffic when the source IP address matches one of the IP addresses or CIDR ranges set here. Note that a Forwarding Rule can only have up to 64 source IP ranges, and this field can only be used with a regional Forwarding Rule whose scheme is EXTERNAL. Each sourceIpRange entry should be either an IP address (for example, 1.2.3.4) or a CIDR range (for example, 1.2.3.0/24).
     * 
     */
    @Export(name="sourceIpRanges", type=List.class, parameters={String.class})
    private Output</* @Nullable */ List<String>> sourceIpRanges;

    /**
     * @return If not empty, this Forwarding Rule will only forward the traffic when the source IP address matches one of the IP addresses or CIDR ranges set here. Note that a Forwarding Rule can only have up to 64 source IP ranges, and this field can only be used with a regional Forwarding Rule whose scheme is EXTERNAL. Each sourceIpRange entry should be either an IP address (for example, 1.2.3.4) or a CIDR range (for example, 1.2.3.0/24).
     * 
     */
    public Output<Optional<List<String>>> sourceIpRanges() {
        return Codegen.optional(this.sourceIpRanges);
    }
    /**
     * This field identifies the subnetwork that the load balanced IP should
     * belong to for this Forwarding Rule, used in internal load balancing and
     * network load balancing with IPv6.
     * If the network specified is in auto subnet mode, this field is optional.
     * However, a subnetwork must be specified if the network is in custom subnet
     * mode or when creating external forwarding rule with IPv6.
     * 
     */
    @Export(name="subnetwork", type=String.class, parameters={})
    private Output<String> subnetwork;

    /**
     * @return This field identifies the subnetwork that the load balanced IP should
     * belong to for this Forwarding Rule, used in internal load balancing and
     * network load balancing with IPv6.
     * If the network specified is in auto subnet mode, this field is optional.
     * However, a subnetwork must be specified if the network is in custom subnet
     * mode or when creating external forwarding rule with IPv6.
     * 
     */
    public Output<String> subnetwork() {
        return this.subnetwork;
    }
    /**
     * The URL of the target resource to receive the matched traffic.  For
     * regional forwarding rules, this target must be in the same region as the
     * forwarding rule. For global forwarding rules, this target must be a global
     * load balancing resource.
     * The forwarded traffic must be of a type appropriate to the target object.
     * *  For load balancers, see the &#34;Target&#34; column in [Port specifications](https://cloud.google.com/load-balancing/docs/forwarding-rule-concepts#ip_address_specifications).
     * *  For Private Service Connect forwarding rules that forward traffic to Google APIs, provide the name of a supported Google API bundle:
     * *  `vpc-sc` - [ APIs that support VPC Service Controls](https://cloud.google.com/vpc-service-controls/docs/supported-products).
     * *  `all-apis` - [All supported Google APIs](https://cloud.google.com/vpc/docs/private-service-connect#supported-apis).
     * 
     * For Private Service Connect forwarding rules that forward traffic to managed services, the target must be a service attachment.
     * 
     */
    @Export(name="target", type=String.class, parameters={})
    private Output</* @Nullable */ String> target;

    /**
     * @return The URL of the target resource to receive the matched traffic.  For
     * regional forwarding rules, this target must be in the same region as the
     * forwarding rule. For global forwarding rules, this target must be a global
     * load balancing resource.
     * The forwarded traffic must be of a type appropriate to the target object.
     * *  For load balancers, see the &#34;Target&#34; column in [Port specifications](https://cloud.google.com/load-balancing/docs/forwarding-rule-concepts#ip_address_specifications).
     * *  For Private Service Connect forwarding rules that forward traffic to Google APIs, provide the name of a supported Google API bundle:
     * *  `vpc-sc` - [ APIs that support VPC Service Controls](https://cloud.google.com/vpc-service-controls/docs/supported-products).
     * *  `all-apis` - [All supported Google APIs](https://cloud.google.com/vpc/docs/private-service-connect#supported-apis).
     * 
     * For Private Service Connect forwarding rules that forward traffic to managed services, the target must be a service attachment.
     * 
     */
    public Output<Optional<String>> target() {
        return Codegen.optional(this.target);
    }

    /**
     *
     * @param name The _unique_ name of the resulting resource.
     */
    public ForwardingRule(String name) {
        this(name, ForwardingRuleArgs.Empty);
    }
    /**
     *
     * @param name The _unique_ name of the resulting resource.
     * @param args The arguments to use to populate this resource's properties.
     */
    public ForwardingRule(String name, @Nullable ForwardingRuleArgs args) {
        this(name, args, null);
    }
    /**
     *
     * @param name The _unique_ name of the resulting resource.
     * @param args The arguments to use to populate this resource's properties.
     * @param options A bag of options that control this resource's behavior.
     */
    public ForwardingRule(String name, @Nullable ForwardingRuleArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) {
        super("gcp:compute/forwardingRule:ForwardingRule", name, args == null ? ForwardingRuleArgs.Empty : args, makeResourceOptions(options, Codegen.empty()));
    }

    private ForwardingRule(String name, Output<String> id, @Nullable ForwardingRuleState state, @Nullable com.pulumi.resources.CustomResourceOptions options) {
        super("gcp:compute/forwardingRule:ForwardingRule", name, state, makeResourceOptions(options, id));
    }

    private static com.pulumi.resources.CustomResourceOptions makeResourceOptions(@Nullable com.pulumi.resources.CustomResourceOptions options, @Nullable Output<String> id) {
        var defaultOptions = com.pulumi.resources.CustomResourceOptions.builder()
            .version(Utilities.getVersion())
            .build();
        return com.pulumi.resources.CustomResourceOptions.merge(defaultOptions, options, id);
    }

    /**
     * Get an existing Host resource's state with the given name, ID, and optional extra
     * properties used to qualify the lookup.
     *
     * @param name The _unique_ name of the resulting resource.
     * @param id The _unique_ provider ID of the resource to lookup.
     * @param state
     * @param options Optional settings to control the behavior of the CustomResource.
     */
    public static ForwardingRule get(String name, Output<String> id, @Nullable ForwardingRuleState state, @Nullable com.pulumi.resources.CustomResourceOptions options) {
        return new ForwardingRule(name, id, state, options);
    }
}
