1. Packages
  2. Google Cloud (GCP) Classic
  3. API Docs
  4. networkservices
  5. Gateway
Google Cloud Classic v7.11.0 published on Friday, Feb 23, 2024 by Pulumi

gcp.networkservices.Gateway

Explore with Pulumi AI

gcp logo
Google Cloud Classic v7.11.0 published on Friday, Feb 23, 2024 by Pulumi

    Gateway represents the configuration for a proxy, typically a load balancer. It captures the ip:port over which the services are exposed by the proxy, along with any policy configurations. Routes have reference to to Gateways to dictate how requests should be routed by this Gateway.

    To get more information about Gateway, see:

    Example Usage

    Network Services Gateway Basic

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Gcp = Pulumi.Gcp;
    
    return await Deployment.RunAsync(() => 
    {
        var @default = new Gcp.NetworkServices.Gateway("default", new()
        {
            Ports = new[]
            {
                443,
            },
            Scope = "default-scope-basic",
            Type = "OPEN_MESH",
        });
    
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/networkservices"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := networkservices.NewGateway(ctx, "default", &networkservices.GatewayArgs{
    			Ports: pulumi.IntArray{
    				pulumi.Int(443),
    			},
    			Scope: pulumi.String("default-scope-basic"),
    			Type:  pulumi.String("OPEN_MESH"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.gcp.networkservices.Gateway;
    import com.pulumi.gcp.networkservices.GatewayArgs;
    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 default_ = new Gateway("default", GatewayArgs.builder()        
                .ports(443)
                .scope("default-scope-basic")
                .type("OPEN_MESH")
                .build());
    
        }
    }
    
    import pulumi
    import pulumi_gcp as gcp
    
    default = gcp.networkservices.Gateway("default",
        ports=[443],
        scope="default-scope-basic",
        type="OPEN_MESH")
    
    import * as pulumi from "@pulumi/pulumi";
    import * as gcp from "@pulumi/gcp";
    
    const _default = new gcp.networkservices.Gateway("default", {
        ports: [443],
        scope: "default-scope-basic",
        type: "OPEN_MESH",
    });
    
    resources:
      default:
        type: gcp:networkservices:Gateway
        properties:
          ports:
            - 443
          scope: default-scope-basic
          type: OPEN_MESH
    

    Network Services Gateway Advanced

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Gcp = Pulumi.Gcp;
    
    return await Deployment.RunAsync(() => 
    {
        var @default = new Gcp.NetworkServices.Gateway("default", new()
        {
            Description = "my description",
            Labels = 
            {
                { "foo", "bar" },
            },
            Ports = new[]
            {
                443,
            },
            Scope = "default-scope-advance",
            Type = "OPEN_MESH",
        });
    
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/networkservices"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := networkservices.NewGateway(ctx, "default", &networkservices.GatewayArgs{
    			Description: pulumi.String("my description"),
    			Labels: pulumi.StringMap{
    				"foo": pulumi.String("bar"),
    			},
    			Ports: pulumi.IntArray{
    				pulumi.Int(443),
    			},
    			Scope: pulumi.String("default-scope-advance"),
    			Type:  pulumi.String("OPEN_MESH"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.gcp.networkservices.Gateway;
    import com.pulumi.gcp.networkservices.GatewayArgs;
    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 default_ = new Gateway("default", GatewayArgs.builder()        
                .description("my description")
                .labels(Map.of("foo", "bar"))
                .ports(443)
                .scope("default-scope-advance")
                .type("OPEN_MESH")
                .build());
    
        }
    }
    
    import pulumi
    import pulumi_gcp as gcp
    
    default = gcp.networkservices.Gateway("default",
        description="my description",
        labels={
            "foo": "bar",
        },
        ports=[443],
        scope="default-scope-advance",
        type="OPEN_MESH")
    
    import * as pulumi from "@pulumi/pulumi";
    import * as gcp from "@pulumi/gcp";
    
    const _default = new gcp.networkservices.Gateway("default", {
        description: "my description",
        labels: {
            foo: "bar",
        },
        ports: [443],
        scope: "default-scope-advance",
        type: "OPEN_MESH",
    });
    
    resources:
      default:
        type: gcp:networkservices:Gateway
        properties:
          description: my description
          labels:
            foo: bar
          ports:
            - 443
          scope: default-scope-advance
          type: OPEN_MESH
    

    Network Services Gateway Secure Web Proxy

    using System.Collections.Generic;
    using System.IO;
    using System.Linq;
    using Pulumi;
    using Gcp = Pulumi.Gcp;
    
    return await Deployment.RunAsync(() => 
    {
        var defaultCertificate = new Gcp.CertificateManager.Certificate("defaultCertificate", new()
        {
            Location = "us-central1",
            SelfManaged = new Gcp.CertificateManager.Inputs.CertificateSelfManagedArgs
            {
                PemCertificate = File.ReadAllText("test-fixtures/cert.pem"),
                PemPrivateKey = File.ReadAllText("test-fixtures/private-key.pem"),
            },
        });
    
        var defaultNetwork = new Gcp.Compute.Network("defaultNetwork", new()
        {
            RoutingMode = "REGIONAL",
            AutoCreateSubnetworks = false,
        });
    
        var defaultSubnetwork = new Gcp.Compute.Subnetwork("defaultSubnetwork", new()
        {
            Purpose = "PRIVATE",
            IpCidrRange = "10.128.0.0/20",
            Region = "us-central1",
            Network = defaultNetwork.Id,
            Role = "ACTIVE",
        });
    
        var proxyonlysubnet = new Gcp.Compute.Subnetwork("proxyonlysubnet", new()
        {
            Purpose = "REGIONAL_MANAGED_PROXY",
            IpCidrRange = "192.168.0.0/23",
            Region = "us-central1",
            Network = defaultNetwork.Id,
            Role = "ACTIVE",
        });
    
        var defaultGatewaySecurityPolicy = new Gcp.NetworkSecurity.GatewaySecurityPolicy("defaultGatewaySecurityPolicy", new()
        {
            Location = "us-central1",
        });
    
        var defaultGatewaySecurityPolicyRule = new Gcp.NetworkSecurity.GatewaySecurityPolicyRule("defaultGatewaySecurityPolicyRule", new()
        {
            Location = "us-central1",
            GatewaySecurityPolicy = defaultGatewaySecurityPolicy.Name,
            Enabled = true,
            Priority = 1,
            SessionMatcher = "host() == 'example.com'",
            BasicProfile = "ALLOW",
        });
    
        var defaultGateway = new Gcp.NetworkServices.Gateway("defaultGateway", new()
        {
            Location = "us-central1",
            Addresses = new[]
            {
                "10.128.0.99",
            },
            Type = "SECURE_WEB_GATEWAY",
            Ports = new[]
            {
                443,
            },
            Scope = "my-default-scope1",
            CertificateUrls = new[]
            {
                defaultCertificate.Id,
            },
            GatewaySecurityPolicy = defaultGatewaySecurityPolicy.Id,
            Network = defaultNetwork.Id,
            Subnetwork = defaultSubnetwork.Id,
            DeleteSwgAutogenRouterOnDestroy = true,
        }, new CustomResourceOptions
        {
            DependsOn = new[]
            {
                proxyonlysubnet,
            },
        });
    
    });
    
    package main
    
    import (
    	"os"
    
    	"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/certificatemanager"
    	"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/compute"
    	"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/networksecurity"
    	"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/networkservices"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func readFileOrPanic(path string) pulumi.StringPtrInput {
    	data, err := os.ReadFile(path)
    	if err != nil {
    		panic(err.Error())
    	}
    	return pulumi.String(string(data))
    }
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		defaultCertificate, err := certificatemanager.NewCertificate(ctx, "defaultCertificate", &certificatemanager.CertificateArgs{
    			Location: pulumi.String("us-central1"),
    			SelfManaged: &certificatemanager.CertificateSelfManagedArgs{
    				PemCertificate: readFileOrPanic("test-fixtures/cert.pem"),
    				PemPrivateKey:  readFileOrPanic("test-fixtures/private-key.pem"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		defaultNetwork, err := compute.NewNetwork(ctx, "defaultNetwork", &compute.NetworkArgs{
    			RoutingMode:           pulumi.String("REGIONAL"),
    			AutoCreateSubnetworks: pulumi.Bool(false),
    		})
    		if err != nil {
    			return err
    		}
    		defaultSubnetwork, err := compute.NewSubnetwork(ctx, "defaultSubnetwork", &compute.SubnetworkArgs{
    			Purpose:     pulumi.String("PRIVATE"),
    			IpCidrRange: pulumi.String("10.128.0.0/20"),
    			Region:      pulumi.String("us-central1"),
    			Network:     defaultNetwork.ID(),
    			Role:        pulumi.String("ACTIVE"),
    		})
    		if err != nil {
    			return err
    		}
    		proxyonlysubnet, err := compute.NewSubnetwork(ctx, "proxyonlysubnet", &compute.SubnetworkArgs{
    			Purpose:     pulumi.String("REGIONAL_MANAGED_PROXY"),
    			IpCidrRange: pulumi.String("192.168.0.0/23"),
    			Region:      pulumi.String("us-central1"),
    			Network:     defaultNetwork.ID(),
    			Role:        pulumi.String("ACTIVE"),
    		})
    		if err != nil {
    			return err
    		}
    		defaultGatewaySecurityPolicy, err := networksecurity.NewGatewaySecurityPolicy(ctx, "defaultGatewaySecurityPolicy", &networksecurity.GatewaySecurityPolicyArgs{
    			Location: pulumi.String("us-central1"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = networksecurity.NewGatewaySecurityPolicyRule(ctx, "defaultGatewaySecurityPolicyRule", &networksecurity.GatewaySecurityPolicyRuleArgs{
    			Location:              pulumi.String("us-central1"),
    			GatewaySecurityPolicy: defaultGatewaySecurityPolicy.Name,
    			Enabled:               pulumi.Bool(true),
    			Priority:              pulumi.Int(1),
    			SessionMatcher:        pulumi.String("host() == 'example.com'"),
    			BasicProfile:          pulumi.String("ALLOW"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = networkservices.NewGateway(ctx, "defaultGateway", &networkservices.GatewayArgs{
    			Location: pulumi.String("us-central1"),
    			Addresses: pulumi.StringArray{
    				pulumi.String("10.128.0.99"),
    			},
    			Type: pulumi.String("SECURE_WEB_GATEWAY"),
    			Ports: pulumi.IntArray{
    				pulumi.Int(443),
    			},
    			Scope: pulumi.String("my-default-scope1"),
    			CertificateUrls: pulumi.StringArray{
    				defaultCertificate.ID(),
    			},
    			GatewaySecurityPolicy:           defaultGatewaySecurityPolicy.ID(),
    			Network:                         defaultNetwork.ID(),
    			Subnetwork:                      defaultSubnetwork.ID(),
    			DeleteSwgAutogenRouterOnDestroy: pulumi.Bool(true),
    		}, pulumi.DependsOn([]pulumi.Resource{
    			proxyonlysubnet,
    		}))
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.gcp.certificatemanager.Certificate;
    import com.pulumi.gcp.certificatemanager.CertificateArgs;
    import com.pulumi.gcp.certificatemanager.inputs.CertificateSelfManagedArgs;
    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.networksecurity.GatewaySecurityPolicy;
    import com.pulumi.gcp.networksecurity.GatewaySecurityPolicyArgs;
    import com.pulumi.gcp.networksecurity.GatewaySecurityPolicyRule;
    import com.pulumi.gcp.networksecurity.GatewaySecurityPolicyRuleArgs;
    import com.pulumi.gcp.networkservices.Gateway;
    import com.pulumi.gcp.networkservices.GatewayArgs;
    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 defaultCertificate = new Certificate("defaultCertificate", CertificateArgs.builder()        
                .location("us-central1")
                .selfManaged(CertificateSelfManagedArgs.builder()
                    .pemCertificate(Files.readString(Paths.get("test-fixtures/cert.pem")))
                    .pemPrivateKey(Files.readString(Paths.get("test-fixtures/private-key.pem")))
                    .build())
                .build());
    
            var defaultNetwork = new Network("defaultNetwork", NetworkArgs.builder()        
                .routingMode("REGIONAL")
                .autoCreateSubnetworks(false)
                .build());
    
            var defaultSubnetwork = new Subnetwork("defaultSubnetwork", SubnetworkArgs.builder()        
                .purpose("PRIVATE")
                .ipCidrRange("10.128.0.0/20")
                .region("us-central1")
                .network(defaultNetwork.id())
                .role("ACTIVE")
                .build());
    
            var proxyonlysubnet = new Subnetwork("proxyonlysubnet", SubnetworkArgs.builder()        
                .purpose("REGIONAL_MANAGED_PROXY")
                .ipCidrRange("192.168.0.0/23")
                .region("us-central1")
                .network(defaultNetwork.id())
                .role("ACTIVE")
                .build());
    
            var defaultGatewaySecurityPolicy = new GatewaySecurityPolicy("defaultGatewaySecurityPolicy", GatewaySecurityPolicyArgs.builder()        
                .location("us-central1")
                .build());
    
            var defaultGatewaySecurityPolicyRule = new GatewaySecurityPolicyRule("defaultGatewaySecurityPolicyRule", GatewaySecurityPolicyRuleArgs.builder()        
                .location("us-central1")
                .gatewaySecurityPolicy(defaultGatewaySecurityPolicy.name())
                .enabled(true)
                .priority(1)
                .sessionMatcher("host() == 'example.com'")
                .basicProfile("ALLOW")
                .build());
    
            var defaultGateway = new Gateway("defaultGateway", GatewayArgs.builder()        
                .location("us-central1")
                .addresses("10.128.0.99")
                .type("SECURE_WEB_GATEWAY")
                .ports(443)
                .scope("my-default-scope1")
                .certificateUrls(defaultCertificate.id())
                .gatewaySecurityPolicy(defaultGatewaySecurityPolicy.id())
                .network(defaultNetwork.id())
                .subnetwork(defaultSubnetwork.id())
                .deleteSwgAutogenRouterOnDestroy(true)
                .build(), CustomResourceOptions.builder()
                    .dependsOn(proxyonlysubnet)
                    .build());
    
        }
    }
    
    import pulumi
    import pulumi_gcp as gcp
    
    default_certificate = gcp.certificatemanager.Certificate("defaultCertificate",
        location="us-central1",
        self_managed=gcp.certificatemanager.CertificateSelfManagedArgs(
            pem_certificate=(lambda path: open(path).read())("test-fixtures/cert.pem"),
            pem_private_key=(lambda path: open(path).read())("test-fixtures/private-key.pem"),
        ))
    default_network = gcp.compute.Network("defaultNetwork",
        routing_mode="REGIONAL",
        auto_create_subnetworks=False)
    default_subnetwork = gcp.compute.Subnetwork("defaultSubnetwork",
        purpose="PRIVATE",
        ip_cidr_range="10.128.0.0/20",
        region="us-central1",
        network=default_network.id,
        role="ACTIVE")
    proxyonlysubnet = gcp.compute.Subnetwork("proxyonlysubnet",
        purpose="REGIONAL_MANAGED_PROXY",
        ip_cidr_range="192.168.0.0/23",
        region="us-central1",
        network=default_network.id,
        role="ACTIVE")
    default_gateway_security_policy = gcp.networksecurity.GatewaySecurityPolicy("defaultGatewaySecurityPolicy", location="us-central1")
    default_gateway_security_policy_rule = gcp.networksecurity.GatewaySecurityPolicyRule("defaultGatewaySecurityPolicyRule",
        location="us-central1",
        gateway_security_policy=default_gateway_security_policy.name,
        enabled=True,
        priority=1,
        session_matcher="host() == 'example.com'",
        basic_profile="ALLOW")
    default_gateway = gcp.networkservices.Gateway("defaultGateway",
        location="us-central1",
        addresses=["10.128.0.99"],
        type="SECURE_WEB_GATEWAY",
        ports=[443],
        scope="my-default-scope1",
        certificate_urls=[default_certificate.id],
        gateway_security_policy=default_gateway_security_policy.id,
        network=default_network.id,
        subnetwork=default_subnetwork.id,
        delete_swg_autogen_router_on_destroy=True,
        opts=pulumi.ResourceOptions(depends_on=[proxyonlysubnet]))
    
    import * as pulumi from "@pulumi/pulumi";
    import * as fs from "fs";
    import * as gcp from "@pulumi/gcp";
    
    const defaultCertificate = new gcp.certificatemanager.Certificate("defaultCertificate", {
        location: "us-central1",
        selfManaged: {
            pemCertificate: fs.readFileSync("test-fixtures/cert.pem", "utf8"),
            pemPrivateKey: fs.readFileSync("test-fixtures/private-key.pem", "utf8"),
        },
    });
    const defaultNetwork = new gcp.compute.Network("defaultNetwork", {
        routingMode: "REGIONAL",
        autoCreateSubnetworks: false,
    });
    const defaultSubnetwork = new gcp.compute.Subnetwork("defaultSubnetwork", {
        purpose: "PRIVATE",
        ipCidrRange: "10.128.0.0/20",
        region: "us-central1",
        network: defaultNetwork.id,
        role: "ACTIVE",
    });
    const proxyonlysubnet = new gcp.compute.Subnetwork("proxyonlysubnet", {
        purpose: "REGIONAL_MANAGED_PROXY",
        ipCidrRange: "192.168.0.0/23",
        region: "us-central1",
        network: defaultNetwork.id,
        role: "ACTIVE",
    });
    const defaultGatewaySecurityPolicy = new gcp.networksecurity.GatewaySecurityPolicy("defaultGatewaySecurityPolicy", {location: "us-central1"});
    const defaultGatewaySecurityPolicyRule = new gcp.networksecurity.GatewaySecurityPolicyRule("defaultGatewaySecurityPolicyRule", {
        location: "us-central1",
        gatewaySecurityPolicy: defaultGatewaySecurityPolicy.name,
        enabled: true,
        priority: 1,
        sessionMatcher: "host() == 'example.com'",
        basicProfile: "ALLOW",
    });
    const defaultGateway = new gcp.networkservices.Gateway("defaultGateway", {
        location: "us-central1",
        addresses: ["10.128.0.99"],
        type: "SECURE_WEB_GATEWAY",
        ports: [443],
        scope: "my-default-scope1",
        certificateUrls: [defaultCertificate.id],
        gatewaySecurityPolicy: defaultGatewaySecurityPolicy.id,
        network: defaultNetwork.id,
        subnetwork: defaultSubnetwork.id,
        deleteSwgAutogenRouterOnDestroy: true,
    }, {
        dependsOn: [proxyonlysubnet],
    });
    
    resources:
      defaultCertificate:
        type: gcp:certificatemanager:Certificate
        properties:
          location: us-central1
          selfManaged:
            pemCertificate:
              fn::readFile: test-fixtures/cert.pem
            pemPrivateKey:
              fn::readFile: test-fixtures/private-key.pem
      defaultNetwork:
        type: gcp:compute:Network
        properties:
          routingMode: REGIONAL
          autoCreateSubnetworks: false
      defaultSubnetwork:
        type: gcp:compute:Subnetwork
        properties:
          purpose: PRIVATE
          ipCidrRange: 10.128.0.0/20
          region: us-central1
          network: ${defaultNetwork.id}
          role: ACTIVE
      proxyonlysubnet:
        type: gcp:compute:Subnetwork
        properties:
          purpose: REGIONAL_MANAGED_PROXY
          ipCidrRange: 192.168.0.0/23
          region: us-central1
          network: ${defaultNetwork.id}
          role: ACTIVE
      defaultGatewaySecurityPolicy:
        type: gcp:networksecurity:GatewaySecurityPolicy
        properties:
          location: us-central1
      defaultGatewaySecurityPolicyRule:
        type: gcp:networksecurity:GatewaySecurityPolicyRule
        properties:
          location: us-central1
          gatewaySecurityPolicy: ${defaultGatewaySecurityPolicy.name}
          enabled: true
          priority: 1
          sessionMatcher: host() == 'example.com'
          basicProfile: ALLOW
      defaultGateway:
        type: gcp:networkservices:Gateway
        properties:
          location: us-central1
          addresses:
            - 10.128.0.99
          type: SECURE_WEB_GATEWAY
          ports:
            - 443
          scope: my-default-scope1
          certificateUrls:
            - ${defaultCertificate.id}
          gatewaySecurityPolicy: ${defaultGatewaySecurityPolicy.id}
          network: ${defaultNetwork.id}
          subnetwork: ${defaultSubnetwork.id}
          deleteSwgAutogenRouterOnDestroy: true
        options:
          dependson:
            - ${proxyonlysubnet}
    

    Network Services Gateway Multiple Swp Same Network

    using System.Collections.Generic;
    using System.IO;
    using System.Linq;
    using Pulumi;
    using Gcp = Pulumi.Gcp;
    
    return await Deployment.RunAsync(() => 
    {
        var defaultCertificate = new Gcp.CertificateManager.Certificate("defaultCertificate", new()
        {
            Location = "us-south1",
            SelfManaged = new Gcp.CertificateManager.Inputs.CertificateSelfManagedArgs
            {
                PemCertificate = File.ReadAllText("test-fixtures/cert.pem"),
                PemPrivateKey = File.ReadAllText("test-fixtures/private-key.pem"),
            },
        });
    
        var defaultNetwork = new Gcp.Compute.Network("defaultNetwork", new()
        {
            RoutingMode = "REGIONAL",
            AutoCreateSubnetworks = false,
        });
    
        var defaultSubnetwork = new Gcp.Compute.Subnetwork("defaultSubnetwork", new()
        {
            Purpose = "PRIVATE",
            IpCidrRange = "10.128.0.0/20",
            Region = "us-south1",
            Network = defaultNetwork.Id,
            Role = "ACTIVE",
        });
    
        var proxyonlysubnet = new Gcp.Compute.Subnetwork("proxyonlysubnet", new()
        {
            Purpose = "REGIONAL_MANAGED_PROXY",
            IpCidrRange = "192.168.0.0/23",
            Region = "us-south1",
            Network = defaultNetwork.Id,
            Role = "ACTIVE",
        });
    
        var defaultGatewaySecurityPolicy = new Gcp.NetworkSecurity.GatewaySecurityPolicy("defaultGatewaySecurityPolicy", new()
        {
            Location = "us-south1",
        });
    
        var defaultGatewaySecurityPolicyRule = new Gcp.NetworkSecurity.GatewaySecurityPolicyRule("defaultGatewaySecurityPolicyRule", new()
        {
            Location = "us-south1",
            GatewaySecurityPolicy = defaultGatewaySecurityPolicy.Name,
            Enabled = true,
            Priority = 1,
            SessionMatcher = "host() == 'example.com'",
            BasicProfile = "ALLOW",
        });
    
        var defaultGateway = new Gcp.NetworkServices.Gateway("defaultGateway", new()
        {
            Location = "us-south1",
            Addresses = new[]
            {
                "10.128.0.99",
            },
            Type = "SECURE_WEB_GATEWAY",
            Ports = new[]
            {
                443,
            },
            Scope = "my-default-scope1",
            CertificateUrls = new[]
            {
                defaultCertificate.Id,
            },
            GatewaySecurityPolicy = defaultGatewaySecurityPolicy.Id,
            Network = defaultNetwork.Id,
            Subnetwork = defaultSubnetwork.Id,
            DeleteSwgAutogenRouterOnDestroy = true,
        }, new CustomResourceOptions
        {
            DependsOn = new[]
            {
                proxyonlysubnet,
            },
        });
    
        var gateway2 = new Gcp.NetworkServices.Gateway("gateway2", new()
        {
            Location = "us-south1",
            Addresses = new[]
            {
                "10.128.0.98",
            },
            Type = "SECURE_WEB_GATEWAY",
            Ports = new[]
            {
                443,
            },
            Scope = "my-default-scope2",
            CertificateUrls = new[]
            {
                defaultCertificate.Id,
            },
            GatewaySecurityPolicy = defaultGatewaySecurityPolicy.Id,
            Network = defaultNetwork.Id,
            Subnetwork = defaultSubnetwork.Id,
            DeleteSwgAutogenRouterOnDestroy = true,
        }, new CustomResourceOptions
        {
            DependsOn = new[]
            {
                proxyonlysubnet,
            },
        });
    
    });
    
    package main
    
    import (
    	"os"
    
    	"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/certificatemanager"
    	"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/compute"
    	"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/networksecurity"
    	"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/networkservices"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func readFileOrPanic(path string) pulumi.StringPtrInput {
    	data, err := os.ReadFile(path)
    	if err != nil {
    		panic(err.Error())
    	}
    	return pulumi.String(string(data))
    }
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		defaultCertificate, err := certificatemanager.NewCertificate(ctx, "defaultCertificate", &certificatemanager.CertificateArgs{
    			Location: pulumi.String("us-south1"),
    			SelfManaged: &certificatemanager.CertificateSelfManagedArgs{
    				PemCertificate: readFileOrPanic("test-fixtures/cert.pem"),
    				PemPrivateKey:  readFileOrPanic("test-fixtures/private-key.pem"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		defaultNetwork, err := compute.NewNetwork(ctx, "defaultNetwork", &compute.NetworkArgs{
    			RoutingMode:           pulumi.String("REGIONAL"),
    			AutoCreateSubnetworks: pulumi.Bool(false),
    		})
    		if err != nil {
    			return err
    		}
    		defaultSubnetwork, err := compute.NewSubnetwork(ctx, "defaultSubnetwork", &compute.SubnetworkArgs{
    			Purpose:     pulumi.String("PRIVATE"),
    			IpCidrRange: pulumi.String("10.128.0.0/20"),
    			Region:      pulumi.String("us-south1"),
    			Network:     defaultNetwork.ID(),
    			Role:        pulumi.String("ACTIVE"),
    		})
    		if err != nil {
    			return err
    		}
    		proxyonlysubnet, err := compute.NewSubnetwork(ctx, "proxyonlysubnet", &compute.SubnetworkArgs{
    			Purpose:     pulumi.String("REGIONAL_MANAGED_PROXY"),
    			IpCidrRange: pulumi.String("192.168.0.0/23"),
    			Region:      pulumi.String("us-south1"),
    			Network:     defaultNetwork.ID(),
    			Role:        pulumi.String("ACTIVE"),
    		})
    		if err != nil {
    			return err
    		}
    		defaultGatewaySecurityPolicy, err := networksecurity.NewGatewaySecurityPolicy(ctx, "defaultGatewaySecurityPolicy", &networksecurity.GatewaySecurityPolicyArgs{
    			Location: pulumi.String("us-south1"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = networksecurity.NewGatewaySecurityPolicyRule(ctx, "defaultGatewaySecurityPolicyRule", &networksecurity.GatewaySecurityPolicyRuleArgs{
    			Location:              pulumi.String("us-south1"),
    			GatewaySecurityPolicy: defaultGatewaySecurityPolicy.Name,
    			Enabled:               pulumi.Bool(true),
    			Priority:              pulumi.Int(1),
    			SessionMatcher:        pulumi.String("host() == 'example.com'"),
    			BasicProfile:          pulumi.String("ALLOW"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = networkservices.NewGateway(ctx, "defaultGateway", &networkservices.GatewayArgs{
    			Location: pulumi.String("us-south1"),
    			Addresses: pulumi.StringArray{
    				pulumi.String("10.128.0.99"),
    			},
    			Type: pulumi.String("SECURE_WEB_GATEWAY"),
    			Ports: pulumi.IntArray{
    				pulumi.Int(443),
    			},
    			Scope: pulumi.String("my-default-scope1"),
    			CertificateUrls: pulumi.StringArray{
    				defaultCertificate.ID(),
    			},
    			GatewaySecurityPolicy:           defaultGatewaySecurityPolicy.ID(),
    			Network:                         defaultNetwork.ID(),
    			Subnetwork:                      defaultSubnetwork.ID(),
    			DeleteSwgAutogenRouterOnDestroy: pulumi.Bool(true),
    		}, pulumi.DependsOn([]pulumi.Resource{
    			proxyonlysubnet,
    		}))
    		if err != nil {
    			return err
    		}
    		_, err = networkservices.NewGateway(ctx, "gateway2", &networkservices.GatewayArgs{
    			Location: pulumi.String("us-south1"),
    			Addresses: pulumi.StringArray{
    				pulumi.String("10.128.0.98"),
    			},
    			Type: pulumi.String("SECURE_WEB_GATEWAY"),
    			Ports: pulumi.IntArray{
    				pulumi.Int(443),
    			},
    			Scope: pulumi.String("my-default-scope2"),
    			CertificateUrls: pulumi.StringArray{
    				defaultCertificate.ID(),
    			},
    			GatewaySecurityPolicy:           defaultGatewaySecurityPolicy.ID(),
    			Network:                         defaultNetwork.ID(),
    			Subnetwork:                      defaultSubnetwork.ID(),
    			DeleteSwgAutogenRouterOnDestroy: pulumi.Bool(true),
    		}, pulumi.DependsOn([]pulumi.Resource{
    			proxyonlysubnet,
    		}))
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.gcp.certificatemanager.Certificate;
    import com.pulumi.gcp.certificatemanager.CertificateArgs;
    import com.pulumi.gcp.certificatemanager.inputs.CertificateSelfManagedArgs;
    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.networksecurity.GatewaySecurityPolicy;
    import com.pulumi.gcp.networksecurity.GatewaySecurityPolicyArgs;
    import com.pulumi.gcp.networksecurity.GatewaySecurityPolicyRule;
    import com.pulumi.gcp.networksecurity.GatewaySecurityPolicyRuleArgs;
    import com.pulumi.gcp.networkservices.Gateway;
    import com.pulumi.gcp.networkservices.GatewayArgs;
    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 defaultCertificate = new Certificate("defaultCertificate", CertificateArgs.builder()        
                .location("us-south1")
                .selfManaged(CertificateSelfManagedArgs.builder()
                    .pemCertificate(Files.readString(Paths.get("test-fixtures/cert.pem")))
                    .pemPrivateKey(Files.readString(Paths.get("test-fixtures/private-key.pem")))
                    .build())
                .build());
    
            var defaultNetwork = new Network("defaultNetwork", NetworkArgs.builder()        
                .routingMode("REGIONAL")
                .autoCreateSubnetworks(false)
                .build());
    
            var defaultSubnetwork = new Subnetwork("defaultSubnetwork", SubnetworkArgs.builder()        
                .purpose("PRIVATE")
                .ipCidrRange("10.128.0.0/20")
                .region("us-south1")
                .network(defaultNetwork.id())
                .role("ACTIVE")
                .build());
    
            var proxyonlysubnet = new Subnetwork("proxyonlysubnet", SubnetworkArgs.builder()        
                .purpose("REGIONAL_MANAGED_PROXY")
                .ipCidrRange("192.168.0.0/23")
                .region("us-south1")
                .network(defaultNetwork.id())
                .role("ACTIVE")
                .build());
    
            var defaultGatewaySecurityPolicy = new GatewaySecurityPolicy("defaultGatewaySecurityPolicy", GatewaySecurityPolicyArgs.builder()        
                .location("us-south1")
                .build());
    
            var defaultGatewaySecurityPolicyRule = new GatewaySecurityPolicyRule("defaultGatewaySecurityPolicyRule", GatewaySecurityPolicyRuleArgs.builder()        
                .location("us-south1")
                .gatewaySecurityPolicy(defaultGatewaySecurityPolicy.name())
                .enabled(true)
                .priority(1)
                .sessionMatcher("host() == 'example.com'")
                .basicProfile("ALLOW")
                .build());
    
            var defaultGateway = new Gateway("defaultGateway", GatewayArgs.builder()        
                .location("us-south1")
                .addresses("10.128.0.99")
                .type("SECURE_WEB_GATEWAY")
                .ports(443)
                .scope("my-default-scope1")
                .certificateUrls(defaultCertificate.id())
                .gatewaySecurityPolicy(defaultGatewaySecurityPolicy.id())
                .network(defaultNetwork.id())
                .subnetwork(defaultSubnetwork.id())
                .deleteSwgAutogenRouterOnDestroy(true)
                .build(), CustomResourceOptions.builder()
                    .dependsOn(proxyonlysubnet)
                    .build());
    
            var gateway2 = new Gateway("gateway2", GatewayArgs.builder()        
                .location("us-south1")
                .addresses("10.128.0.98")
                .type("SECURE_WEB_GATEWAY")
                .ports(443)
                .scope("my-default-scope2")
                .certificateUrls(defaultCertificate.id())
                .gatewaySecurityPolicy(defaultGatewaySecurityPolicy.id())
                .network(defaultNetwork.id())
                .subnetwork(defaultSubnetwork.id())
                .deleteSwgAutogenRouterOnDestroy(true)
                .build(), CustomResourceOptions.builder()
                    .dependsOn(proxyonlysubnet)
                    .build());
    
        }
    }
    
    import pulumi
    import pulumi_gcp as gcp
    
    default_certificate = gcp.certificatemanager.Certificate("defaultCertificate",
        location="us-south1",
        self_managed=gcp.certificatemanager.CertificateSelfManagedArgs(
            pem_certificate=(lambda path: open(path).read())("test-fixtures/cert.pem"),
            pem_private_key=(lambda path: open(path).read())("test-fixtures/private-key.pem"),
        ))
    default_network = gcp.compute.Network("defaultNetwork",
        routing_mode="REGIONAL",
        auto_create_subnetworks=False)
    default_subnetwork = gcp.compute.Subnetwork("defaultSubnetwork",
        purpose="PRIVATE",
        ip_cidr_range="10.128.0.0/20",
        region="us-south1",
        network=default_network.id,
        role="ACTIVE")
    proxyonlysubnet = gcp.compute.Subnetwork("proxyonlysubnet",
        purpose="REGIONAL_MANAGED_PROXY",
        ip_cidr_range="192.168.0.0/23",
        region="us-south1",
        network=default_network.id,
        role="ACTIVE")
    default_gateway_security_policy = gcp.networksecurity.GatewaySecurityPolicy("defaultGatewaySecurityPolicy", location="us-south1")
    default_gateway_security_policy_rule = gcp.networksecurity.GatewaySecurityPolicyRule("defaultGatewaySecurityPolicyRule",
        location="us-south1",
        gateway_security_policy=default_gateway_security_policy.name,
        enabled=True,
        priority=1,
        session_matcher="host() == 'example.com'",
        basic_profile="ALLOW")
    default_gateway = gcp.networkservices.Gateway("defaultGateway",
        location="us-south1",
        addresses=["10.128.0.99"],
        type="SECURE_WEB_GATEWAY",
        ports=[443],
        scope="my-default-scope1",
        certificate_urls=[default_certificate.id],
        gateway_security_policy=default_gateway_security_policy.id,
        network=default_network.id,
        subnetwork=default_subnetwork.id,
        delete_swg_autogen_router_on_destroy=True,
        opts=pulumi.ResourceOptions(depends_on=[proxyonlysubnet]))
    gateway2 = gcp.networkservices.Gateway("gateway2",
        location="us-south1",
        addresses=["10.128.0.98"],
        type="SECURE_WEB_GATEWAY",
        ports=[443],
        scope="my-default-scope2",
        certificate_urls=[default_certificate.id],
        gateway_security_policy=default_gateway_security_policy.id,
        network=default_network.id,
        subnetwork=default_subnetwork.id,
        delete_swg_autogen_router_on_destroy=True,
        opts=pulumi.ResourceOptions(depends_on=[proxyonlysubnet]))
    
    import * as pulumi from "@pulumi/pulumi";
    import * as fs from "fs";
    import * as gcp from "@pulumi/gcp";
    
    const defaultCertificate = new gcp.certificatemanager.Certificate("defaultCertificate", {
        location: "us-south1",
        selfManaged: {
            pemCertificate: fs.readFileSync("test-fixtures/cert.pem", "utf8"),
            pemPrivateKey: fs.readFileSync("test-fixtures/private-key.pem", "utf8"),
        },
    });
    const defaultNetwork = new gcp.compute.Network("defaultNetwork", {
        routingMode: "REGIONAL",
        autoCreateSubnetworks: false,
    });
    const defaultSubnetwork = new gcp.compute.Subnetwork("defaultSubnetwork", {
        purpose: "PRIVATE",
        ipCidrRange: "10.128.0.0/20",
        region: "us-south1",
        network: defaultNetwork.id,
        role: "ACTIVE",
    });
    const proxyonlysubnet = new gcp.compute.Subnetwork("proxyonlysubnet", {
        purpose: "REGIONAL_MANAGED_PROXY",
        ipCidrRange: "192.168.0.0/23",
        region: "us-south1",
        network: defaultNetwork.id,
        role: "ACTIVE",
    });
    const defaultGatewaySecurityPolicy = new gcp.networksecurity.GatewaySecurityPolicy("defaultGatewaySecurityPolicy", {location: "us-south1"});
    const defaultGatewaySecurityPolicyRule = new gcp.networksecurity.GatewaySecurityPolicyRule("defaultGatewaySecurityPolicyRule", {
        location: "us-south1",
        gatewaySecurityPolicy: defaultGatewaySecurityPolicy.name,
        enabled: true,
        priority: 1,
        sessionMatcher: "host() == 'example.com'",
        basicProfile: "ALLOW",
    });
    const defaultGateway = new gcp.networkservices.Gateway("defaultGateway", {
        location: "us-south1",
        addresses: ["10.128.0.99"],
        type: "SECURE_WEB_GATEWAY",
        ports: [443],
        scope: "my-default-scope1",
        certificateUrls: [defaultCertificate.id],
        gatewaySecurityPolicy: defaultGatewaySecurityPolicy.id,
        network: defaultNetwork.id,
        subnetwork: defaultSubnetwork.id,
        deleteSwgAutogenRouterOnDestroy: true,
    }, {
        dependsOn: [proxyonlysubnet],
    });
    const gateway2 = new gcp.networkservices.Gateway("gateway2", {
        location: "us-south1",
        addresses: ["10.128.0.98"],
        type: "SECURE_WEB_GATEWAY",
        ports: [443],
        scope: "my-default-scope2",
        certificateUrls: [defaultCertificate.id],
        gatewaySecurityPolicy: defaultGatewaySecurityPolicy.id,
        network: defaultNetwork.id,
        subnetwork: defaultSubnetwork.id,
        deleteSwgAutogenRouterOnDestroy: true,
    }, {
        dependsOn: [proxyonlysubnet],
    });
    
    resources:
      defaultCertificate:
        type: gcp:certificatemanager:Certificate
        properties:
          location: us-south1
          selfManaged:
            pemCertificate:
              fn::readFile: test-fixtures/cert.pem
            pemPrivateKey:
              fn::readFile: test-fixtures/private-key.pem
      defaultNetwork:
        type: gcp:compute:Network
        properties:
          routingMode: REGIONAL
          autoCreateSubnetworks: false
      defaultSubnetwork:
        type: gcp:compute:Subnetwork
        properties:
          purpose: PRIVATE
          ipCidrRange: 10.128.0.0/20
          region: us-south1
          network: ${defaultNetwork.id}
          role: ACTIVE
      proxyonlysubnet:
        type: gcp:compute:Subnetwork
        properties:
          purpose: REGIONAL_MANAGED_PROXY
          ipCidrRange: 192.168.0.0/23
          region: us-south1
          network: ${defaultNetwork.id}
          role: ACTIVE
      defaultGatewaySecurityPolicy:
        type: gcp:networksecurity:GatewaySecurityPolicy
        properties:
          location: us-south1
      defaultGatewaySecurityPolicyRule:
        type: gcp:networksecurity:GatewaySecurityPolicyRule
        properties:
          location: us-south1
          gatewaySecurityPolicy: ${defaultGatewaySecurityPolicy.name}
          enabled: true
          priority: 1
          sessionMatcher: host() == 'example.com'
          basicProfile: ALLOW
      defaultGateway:
        type: gcp:networkservices:Gateway
        properties:
          location: us-south1
          addresses:
            - 10.128.0.99
          type: SECURE_WEB_GATEWAY
          ports:
            - 443
          scope: my-default-scope1
          certificateUrls:
            - ${defaultCertificate.id}
          gatewaySecurityPolicy: ${defaultGatewaySecurityPolicy.id}
          network: ${defaultNetwork.id}
          subnetwork: ${defaultSubnetwork.id}
          deleteSwgAutogenRouterOnDestroy: true
        options:
          dependson:
            - ${proxyonlysubnet}
      gateway2:
        type: gcp:networkservices:Gateway
        properties:
          location: us-south1
          addresses:
            - 10.128.0.98
          type: SECURE_WEB_GATEWAY
          ports:
            - 443
          scope: my-default-scope2
          certificateUrls:
            - ${defaultCertificate.id}
          gatewaySecurityPolicy: ${defaultGatewaySecurityPolicy.id}
          network: ${defaultNetwork.id}
          subnetwork: ${defaultSubnetwork.id}
          deleteSwgAutogenRouterOnDestroy: true
        options:
          dependson:
            - ${proxyonlysubnet}
    

    Create Gateway Resource

    new Gateway(name: string, args: GatewayArgs, opts?: CustomResourceOptions);
    @overload
    def Gateway(resource_name: str,
                opts: Optional[ResourceOptions] = None,
                addresses: Optional[Sequence[str]] = None,
                certificate_urls: Optional[Sequence[str]] = None,
                delete_swg_autogen_router_on_destroy: Optional[bool] = None,
                description: Optional[str] = None,
                gateway_security_policy: Optional[str] = None,
                labels: Optional[Mapping[str, str]] = None,
                location: Optional[str] = None,
                name: Optional[str] = None,
                network: Optional[str] = None,
                ports: Optional[Sequence[int]] = None,
                project: Optional[str] = None,
                scope: Optional[str] = None,
                server_tls_policy: Optional[str] = None,
                subnetwork: Optional[str] = None,
                type: Optional[str] = None)
    @overload
    def Gateway(resource_name: str,
                args: GatewayArgs,
                opts: Optional[ResourceOptions] = None)
    func NewGateway(ctx *Context, name string, args GatewayArgs, opts ...ResourceOption) (*Gateway, error)
    public Gateway(string name, GatewayArgs args, CustomResourceOptions? opts = null)
    public Gateway(String name, GatewayArgs args)
    public Gateway(String name, GatewayArgs args, CustomResourceOptions options)
    
    type: gcp:networkservices:Gateway
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    name string
    The unique name of the resource.
    args GatewayArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args GatewayArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args GatewayArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args GatewayArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args GatewayArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Gateway Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    The Gateway resource accepts the following input properties:

    Ports List<int>
    One or more port numbers (1-65535), on which the Gateway will receive traffic. The proxy binds to the specified ports. Gateways of type 'SECURE_WEB_GATEWAY' are limited to 1 port. Gateways of type 'OPEN_MESH' listen on 0.0.0.0 and support multiple ports.
    Type string
    Immutable. The type of the customer-managed gateway. Possible values are: * OPEN_MESH * SECURE_WEB_GATEWAY. Possible values are: TYPE_UNSPECIFIED, OPEN_MESH, SECURE_WEB_GATEWAY.
    Addresses List<string>
    Zero or one IPv4-address on which the Gateway will receive the traffic. When no address is provided, an IP from the subnetwork is allocated This field only applies to gateways of type 'SECURE_WEB_GATEWAY'. Gateways of type 'OPEN_MESH' listen on 0.0.0.0.
    CertificateUrls List<string>
    A fully-qualified Certificates URL reference. The proxy presents a Certificate (selected based on SNI) when establishing a TLS connection. This feature only applies to gateways of type 'SECURE_WEB_GATEWAY'.
    DeleteSwgAutogenRouterOnDestroy bool
    When deleting a gateway of type 'SECURE_WEB_GATEWAY', this boolean option will also delete auto generated router by the gateway creation. If there is no other gateway of type 'SECURE_WEB_GATEWAY' remaining for that region and network it will be deleted.
    Description string
    A free-text description of the resource. Max length 1024 characters.
    GatewaySecurityPolicy string
    A fully-qualified GatewaySecurityPolicy URL reference. Defines how a server should apply security policy to inbound (VM to Proxy) initiated connections. For example: projects/*/locations/*/gatewaySecurityPolicies/swg-policy. This policy is specific to gateways of type 'SECURE_WEB_GATEWAY'.
    Labels Dictionary<string, string>
    Set of label tags associated with the Gateway resource. Note: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field effective_labels for all of the labels present on the resource.
    Location string
    The location of the gateway. The default value is global.
    Name string
    Short name of the Gateway resource to be created.


    Network string
    The relative resource name identifying the VPC network that is using this configuration. For example: projects/*/global/networks/network-1. Currently, this field is specific to gateways of type 'SECURE_WEB_GATEWAY'.
    Project string
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    Scope string
    Immutable. Scope determines how configuration across multiple Gateway instances are merged. The configuration for multiple Gateway instances with the same scope will be merged as presented as a single coniguration to the proxy/load balancer. Max length 64 characters. Scope should start with a letter and can only have letters, numbers, hyphens.
    ServerTlsPolicy string
    A fully-qualified ServerTLSPolicy URL reference. Specifies how TLS traffic is terminated. If empty, TLS termination is disabled.
    Subnetwork string
    The relative resource name identifying the subnetwork in which this SWG is allocated. For example: projects/*/regions/us-central1/subnetworks/network-1. Currently, this field is specific to gateways of type 'SECURE_WEB_GATEWAY.
    Ports []int
    One or more port numbers (1-65535), on which the Gateway will receive traffic. The proxy binds to the specified ports. Gateways of type 'SECURE_WEB_GATEWAY' are limited to 1 port. Gateways of type 'OPEN_MESH' listen on 0.0.0.0 and support multiple ports.
    Type string
    Immutable. The type of the customer-managed gateway. Possible values are: * OPEN_MESH * SECURE_WEB_GATEWAY. Possible values are: TYPE_UNSPECIFIED, OPEN_MESH, SECURE_WEB_GATEWAY.
    Addresses []string
    Zero or one IPv4-address on which the Gateway will receive the traffic. When no address is provided, an IP from the subnetwork is allocated This field only applies to gateways of type 'SECURE_WEB_GATEWAY'. Gateways of type 'OPEN_MESH' listen on 0.0.0.0.
    CertificateUrls []string
    A fully-qualified Certificates URL reference. The proxy presents a Certificate (selected based on SNI) when establishing a TLS connection. This feature only applies to gateways of type 'SECURE_WEB_GATEWAY'.
    DeleteSwgAutogenRouterOnDestroy bool
    When deleting a gateway of type 'SECURE_WEB_GATEWAY', this boolean option will also delete auto generated router by the gateway creation. If there is no other gateway of type 'SECURE_WEB_GATEWAY' remaining for that region and network it will be deleted.
    Description string
    A free-text description of the resource. Max length 1024 characters.
    GatewaySecurityPolicy string
    A fully-qualified GatewaySecurityPolicy URL reference. Defines how a server should apply security policy to inbound (VM to Proxy) initiated connections. For example: projects/*/locations/*/gatewaySecurityPolicies/swg-policy. This policy is specific to gateways of type 'SECURE_WEB_GATEWAY'.
    Labels map[string]string
    Set of label tags associated with the Gateway resource. Note: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field effective_labels for all of the labels present on the resource.
    Location string
    The location of the gateway. The default value is global.
    Name string
    Short name of the Gateway resource to be created.


    Network string
    The relative resource name identifying the VPC network that is using this configuration. For example: projects/*/global/networks/network-1. Currently, this field is specific to gateways of type 'SECURE_WEB_GATEWAY'.
    Project string
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    Scope string
    Immutable. Scope determines how configuration across multiple Gateway instances are merged. The configuration for multiple Gateway instances with the same scope will be merged as presented as a single coniguration to the proxy/load balancer. Max length 64 characters. Scope should start with a letter and can only have letters, numbers, hyphens.
    ServerTlsPolicy string
    A fully-qualified ServerTLSPolicy URL reference. Specifies how TLS traffic is terminated. If empty, TLS termination is disabled.
    Subnetwork string
    The relative resource name identifying the subnetwork in which this SWG is allocated. For example: projects/*/regions/us-central1/subnetworks/network-1. Currently, this field is specific to gateways of type 'SECURE_WEB_GATEWAY.
    ports List<Integer>
    One or more port numbers (1-65535), on which the Gateway will receive traffic. The proxy binds to the specified ports. Gateways of type 'SECURE_WEB_GATEWAY' are limited to 1 port. Gateways of type 'OPEN_MESH' listen on 0.0.0.0 and support multiple ports.
    type String
    Immutable. The type of the customer-managed gateway. Possible values are: * OPEN_MESH * SECURE_WEB_GATEWAY. Possible values are: TYPE_UNSPECIFIED, OPEN_MESH, SECURE_WEB_GATEWAY.
    addresses List<String>
    Zero or one IPv4-address on which the Gateway will receive the traffic. When no address is provided, an IP from the subnetwork is allocated This field only applies to gateways of type 'SECURE_WEB_GATEWAY'. Gateways of type 'OPEN_MESH' listen on 0.0.0.0.
    certificateUrls List<String>
    A fully-qualified Certificates URL reference. The proxy presents a Certificate (selected based on SNI) when establishing a TLS connection. This feature only applies to gateways of type 'SECURE_WEB_GATEWAY'.
    deleteSwgAutogenRouterOnDestroy Boolean
    When deleting a gateway of type 'SECURE_WEB_GATEWAY', this boolean option will also delete auto generated router by the gateway creation. If there is no other gateway of type 'SECURE_WEB_GATEWAY' remaining for that region and network it will be deleted.
    description String
    A free-text description of the resource. Max length 1024 characters.
    gatewaySecurityPolicy String
    A fully-qualified GatewaySecurityPolicy URL reference. Defines how a server should apply security policy to inbound (VM to Proxy) initiated connections. For example: projects/*/locations/*/gatewaySecurityPolicies/swg-policy. This policy is specific to gateways of type 'SECURE_WEB_GATEWAY'.
    labels Map<String,String>
    Set of label tags associated with the Gateway resource. Note: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field effective_labels for all of the labels present on the resource.
    location String
    The location of the gateway. The default value is global.
    name String
    Short name of the Gateway resource to be created.


    network String
    The relative resource name identifying the VPC network that is using this configuration. For example: projects/*/global/networks/network-1. Currently, this field is specific to gateways of type 'SECURE_WEB_GATEWAY'.
    project String
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    scope String
    Immutable. Scope determines how configuration across multiple Gateway instances are merged. The configuration for multiple Gateway instances with the same scope will be merged as presented as a single coniguration to the proxy/load balancer. Max length 64 characters. Scope should start with a letter and can only have letters, numbers, hyphens.
    serverTlsPolicy String
    A fully-qualified ServerTLSPolicy URL reference. Specifies how TLS traffic is terminated. If empty, TLS termination is disabled.
    subnetwork String
    The relative resource name identifying the subnetwork in which this SWG is allocated. For example: projects/*/regions/us-central1/subnetworks/network-1. Currently, this field is specific to gateways of type 'SECURE_WEB_GATEWAY.
    ports number[]
    One or more port numbers (1-65535), on which the Gateway will receive traffic. The proxy binds to the specified ports. Gateways of type 'SECURE_WEB_GATEWAY' are limited to 1 port. Gateways of type 'OPEN_MESH' listen on 0.0.0.0 and support multiple ports.
    type string
    Immutable. The type of the customer-managed gateway. Possible values are: * OPEN_MESH * SECURE_WEB_GATEWAY. Possible values are: TYPE_UNSPECIFIED, OPEN_MESH, SECURE_WEB_GATEWAY.
    addresses string[]
    Zero or one IPv4-address on which the Gateway will receive the traffic. When no address is provided, an IP from the subnetwork is allocated This field only applies to gateways of type 'SECURE_WEB_GATEWAY'. Gateways of type 'OPEN_MESH' listen on 0.0.0.0.
    certificateUrls string[]
    A fully-qualified Certificates URL reference. The proxy presents a Certificate (selected based on SNI) when establishing a TLS connection. This feature only applies to gateways of type 'SECURE_WEB_GATEWAY'.
    deleteSwgAutogenRouterOnDestroy boolean
    When deleting a gateway of type 'SECURE_WEB_GATEWAY', this boolean option will also delete auto generated router by the gateway creation. If there is no other gateway of type 'SECURE_WEB_GATEWAY' remaining for that region and network it will be deleted.
    description string
    A free-text description of the resource. Max length 1024 characters.
    gatewaySecurityPolicy string
    A fully-qualified GatewaySecurityPolicy URL reference. Defines how a server should apply security policy to inbound (VM to Proxy) initiated connections. For example: projects/*/locations/*/gatewaySecurityPolicies/swg-policy. This policy is specific to gateways of type 'SECURE_WEB_GATEWAY'.
    labels {[key: string]: string}
    Set of label tags associated with the Gateway resource. Note: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field effective_labels for all of the labels present on the resource.
    location string
    The location of the gateway. The default value is global.
    name string
    Short name of the Gateway resource to be created.


    network string
    The relative resource name identifying the VPC network that is using this configuration. For example: projects/*/global/networks/network-1. Currently, this field is specific to gateways of type 'SECURE_WEB_GATEWAY'.
    project string
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    scope string
    Immutable. Scope determines how configuration across multiple Gateway instances are merged. The configuration for multiple Gateway instances with the same scope will be merged as presented as a single coniguration to the proxy/load balancer. Max length 64 characters. Scope should start with a letter and can only have letters, numbers, hyphens.
    serverTlsPolicy string
    A fully-qualified ServerTLSPolicy URL reference. Specifies how TLS traffic is terminated. If empty, TLS termination is disabled.
    subnetwork string
    The relative resource name identifying the subnetwork in which this SWG is allocated. For example: projects/*/regions/us-central1/subnetworks/network-1. Currently, this field is specific to gateways of type 'SECURE_WEB_GATEWAY.
    ports Sequence[int]
    One or more port numbers (1-65535), on which the Gateway will receive traffic. The proxy binds to the specified ports. Gateways of type 'SECURE_WEB_GATEWAY' are limited to 1 port. Gateways of type 'OPEN_MESH' listen on 0.0.0.0 and support multiple ports.
    type str
    Immutable. The type of the customer-managed gateway. Possible values are: * OPEN_MESH * SECURE_WEB_GATEWAY. Possible values are: TYPE_UNSPECIFIED, OPEN_MESH, SECURE_WEB_GATEWAY.
    addresses Sequence[str]
    Zero or one IPv4-address on which the Gateway will receive the traffic. When no address is provided, an IP from the subnetwork is allocated This field only applies to gateways of type 'SECURE_WEB_GATEWAY'. Gateways of type 'OPEN_MESH' listen on 0.0.0.0.
    certificate_urls Sequence[str]
    A fully-qualified Certificates URL reference. The proxy presents a Certificate (selected based on SNI) when establishing a TLS connection. This feature only applies to gateways of type 'SECURE_WEB_GATEWAY'.
    delete_swg_autogen_router_on_destroy bool
    When deleting a gateway of type 'SECURE_WEB_GATEWAY', this boolean option will also delete auto generated router by the gateway creation. If there is no other gateway of type 'SECURE_WEB_GATEWAY' remaining for that region and network it will be deleted.
    description str
    A free-text description of the resource. Max length 1024 characters.
    gateway_security_policy str
    A fully-qualified GatewaySecurityPolicy URL reference. Defines how a server should apply security policy to inbound (VM to Proxy) initiated connections. For example: projects/*/locations/*/gatewaySecurityPolicies/swg-policy. This policy is specific to gateways of type 'SECURE_WEB_GATEWAY'.
    labels Mapping[str, str]
    Set of label tags associated with the Gateway resource. Note: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field effective_labels for all of the labels present on the resource.
    location str
    The location of the gateway. The default value is global.
    name str
    Short name of the Gateway resource to be created.


    network str
    The relative resource name identifying the VPC network that is using this configuration. For example: projects/*/global/networks/network-1. Currently, this field is specific to gateways of type 'SECURE_WEB_GATEWAY'.
    project str
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    scope str
    Immutable. Scope determines how configuration across multiple Gateway instances are merged. The configuration for multiple Gateway instances with the same scope will be merged as presented as a single coniguration to the proxy/load balancer. Max length 64 characters. Scope should start with a letter and can only have letters, numbers, hyphens.
    server_tls_policy str
    A fully-qualified ServerTLSPolicy URL reference. Specifies how TLS traffic is terminated. If empty, TLS termination is disabled.
    subnetwork str
    The relative resource name identifying the subnetwork in which this SWG is allocated. For example: projects/*/regions/us-central1/subnetworks/network-1. Currently, this field is specific to gateways of type 'SECURE_WEB_GATEWAY.
    ports List<Number>
    One or more port numbers (1-65535), on which the Gateway will receive traffic. The proxy binds to the specified ports. Gateways of type 'SECURE_WEB_GATEWAY' are limited to 1 port. Gateways of type 'OPEN_MESH' listen on 0.0.0.0 and support multiple ports.
    type String
    Immutable. The type of the customer-managed gateway. Possible values are: * OPEN_MESH * SECURE_WEB_GATEWAY. Possible values are: TYPE_UNSPECIFIED, OPEN_MESH, SECURE_WEB_GATEWAY.
    addresses List<String>
    Zero or one IPv4-address on which the Gateway will receive the traffic. When no address is provided, an IP from the subnetwork is allocated This field only applies to gateways of type 'SECURE_WEB_GATEWAY'. Gateways of type 'OPEN_MESH' listen on 0.0.0.0.
    certificateUrls List<String>
    A fully-qualified Certificates URL reference. The proxy presents a Certificate (selected based on SNI) when establishing a TLS connection. This feature only applies to gateways of type 'SECURE_WEB_GATEWAY'.
    deleteSwgAutogenRouterOnDestroy Boolean
    When deleting a gateway of type 'SECURE_WEB_GATEWAY', this boolean option will also delete auto generated router by the gateway creation. If there is no other gateway of type 'SECURE_WEB_GATEWAY' remaining for that region and network it will be deleted.
    description String
    A free-text description of the resource. Max length 1024 characters.
    gatewaySecurityPolicy String
    A fully-qualified GatewaySecurityPolicy URL reference. Defines how a server should apply security policy to inbound (VM to Proxy) initiated connections. For example: projects/*/locations/*/gatewaySecurityPolicies/swg-policy. This policy is specific to gateways of type 'SECURE_WEB_GATEWAY'.
    labels Map<String>
    Set of label tags associated with the Gateway resource. Note: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field effective_labels for all of the labels present on the resource.
    location String
    The location of the gateway. The default value is global.
    name String
    Short name of the Gateway resource to be created.


    network String
    The relative resource name identifying the VPC network that is using this configuration. For example: projects/*/global/networks/network-1. Currently, this field is specific to gateways of type 'SECURE_WEB_GATEWAY'.
    project String
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    scope String
    Immutable. Scope determines how configuration across multiple Gateway instances are merged. The configuration for multiple Gateway instances with the same scope will be merged as presented as a single coniguration to the proxy/load balancer. Max length 64 characters. Scope should start with a letter and can only have letters, numbers, hyphens.
    serverTlsPolicy String
    A fully-qualified ServerTLSPolicy URL reference. Specifies how TLS traffic is terminated. If empty, TLS termination is disabled.
    subnetwork String
    The relative resource name identifying the subnetwork in which this SWG is allocated. For example: projects/*/regions/us-central1/subnetworks/network-1. Currently, this field is specific to gateways of type 'SECURE_WEB_GATEWAY.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the Gateway resource produces the following output properties:

    CreateTime string
    Time the AccessPolicy was created in UTC.
    EffectiveLabels Dictionary<string, string>
    All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
    Id string
    The provider-assigned unique ID for this managed resource.
    PulumiLabels Dictionary<string, string>
    The combination of labels configured directly on the resource and default labels configured on the provider.
    SelfLink string
    Server-defined URL of this resource.
    UpdateTime string
    Time the AccessPolicy was updated in UTC.
    CreateTime string
    Time the AccessPolicy was created in UTC.
    EffectiveLabels map[string]string
    All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
    Id string
    The provider-assigned unique ID for this managed resource.
    PulumiLabels map[string]string
    The combination of labels configured directly on the resource and default labels configured on the provider.
    SelfLink string
    Server-defined URL of this resource.
    UpdateTime string
    Time the AccessPolicy was updated in UTC.
    createTime String
    Time the AccessPolicy was created in UTC.
    effectiveLabels Map<String,String>
    All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
    id String
    The provider-assigned unique ID for this managed resource.
    pulumiLabels Map<String,String>
    The combination of labels configured directly on the resource and default labels configured on the provider.
    selfLink String
    Server-defined URL of this resource.
    updateTime String
    Time the AccessPolicy was updated in UTC.
    createTime string
    Time the AccessPolicy was created in UTC.
    effectiveLabels {[key: string]: string}
    All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
    id string
    The provider-assigned unique ID for this managed resource.
    pulumiLabels {[key: string]: string}
    The combination of labels configured directly on the resource and default labels configured on the provider.
    selfLink string
    Server-defined URL of this resource.
    updateTime string
    Time the AccessPolicy was updated in UTC.
    create_time str
    Time the AccessPolicy was created in UTC.
    effective_labels Mapping[str, str]
    All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
    id str
    The provider-assigned unique ID for this managed resource.
    pulumi_labels Mapping[str, str]
    The combination of labels configured directly on the resource and default labels configured on the provider.
    self_link str
    Server-defined URL of this resource.
    update_time str
    Time the AccessPolicy was updated in UTC.
    createTime String
    Time the AccessPolicy was created in UTC.
    effectiveLabels Map<String>
    All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
    id String
    The provider-assigned unique ID for this managed resource.
    pulumiLabels Map<String>
    The combination of labels configured directly on the resource and default labels configured on the provider.
    selfLink String
    Server-defined URL of this resource.
    updateTime String
    Time the AccessPolicy was updated in UTC.

    Look up Existing Gateway Resource

    Get an existing Gateway resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: GatewayState, opts?: CustomResourceOptions): Gateway
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            addresses: Optional[Sequence[str]] = None,
            certificate_urls: Optional[Sequence[str]] = None,
            create_time: Optional[str] = None,
            delete_swg_autogen_router_on_destroy: Optional[bool] = None,
            description: Optional[str] = None,
            effective_labels: Optional[Mapping[str, str]] = None,
            gateway_security_policy: Optional[str] = None,
            labels: Optional[Mapping[str, str]] = None,
            location: Optional[str] = None,
            name: Optional[str] = None,
            network: Optional[str] = None,
            ports: Optional[Sequence[int]] = None,
            project: Optional[str] = None,
            pulumi_labels: Optional[Mapping[str, str]] = None,
            scope: Optional[str] = None,
            self_link: Optional[str] = None,
            server_tls_policy: Optional[str] = None,
            subnetwork: Optional[str] = None,
            type: Optional[str] = None,
            update_time: Optional[str] = None) -> Gateway
    func GetGateway(ctx *Context, name string, id IDInput, state *GatewayState, opts ...ResourceOption) (*Gateway, error)
    public static Gateway Get(string name, Input<string> id, GatewayState? state, CustomResourceOptions? opts = null)
    public static Gateway get(String name, Output<String> id, GatewayState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    Addresses List<string>
    Zero or one IPv4-address on which the Gateway will receive the traffic. When no address is provided, an IP from the subnetwork is allocated This field only applies to gateways of type 'SECURE_WEB_GATEWAY'. Gateways of type 'OPEN_MESH' listen on 0.0.0.0.
    CertificateUrls List<string>
    A fully-qualified Certificates URL reference. The proxy presents a Certificate (selected based on SNI) when establishing a TLS connection. This feature only applies to gateways of type 'SECURE_WEB_GATEWAY'.
    CreateTime string
    Time the AccessPolicy was created in UTC.
    DeleteSwgAutogenRouterOnDestroy bool
    When deleting a gateway of type 'SECURE_WEB_GATEWAY', this boolean option will also delete auto generated router by the gateway creation. If there is no other gateway of type 'SECURE_WEB_GATEWAY' remaining for that region and network it will be deleted.
    Description string
    A free-text description of the resource. Max length 1024 characters.
    EffectiveLabels Dictionary<string, string>
    All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
    GatewaySecurityPolicy string
    A fully-qualified GatewaySecurityPolicy URL reference. Defines how a server should apply security policy to inbound (VM to Proxy) initiated connections. For example: projects/*/locations/*/gatewaySecurityPolicies/swg-policy. This policy is specific to gateways of type 'SECURE_WEB_GATEWAY'.
    Labels Dictionary<string, string>
    Set of label tags associated with the Gateway resource. Note: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field effective_labels for all of the labels present on the resource.
    Location string
    The location of the gateway. The default value is global.
    Name string
    Short name of the Gateway resource to be created.


    Network string
    The relative resource name identifying the VPC network that is using this configuration. For example: projects/*/global/networks/network-1. Currently, this field is specific to gateways of type 'SECURE_WEB_GATEWAY'.
    Ports List<int>
    One or more port numbers (1-65535), on which the Gateway will receive traffic. The proxy binds to the specified ports. Gateways of type 'SECURE_WEB_GATEWAY' are limited to 1 port. Gateways of type 'OPEN_MESH' listen on 0.0.0.0 and support multiple ports.
    Project string
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    PulumiLabels Dictionary<string, string>
    The combination of labels configured directly on the resource and default labels configured on the provider.
    Scope string
    Immutable. Scope determines how configuration across multiple Gateway instances are merged. The configuration for multiple Gateway instances with the same scope will be merged as presented as a single coniguration to the proxy/load balancer. Max length 64 characters. Scope should start with a letter and can only have letters, numbers, hyphens.
    SelfLink string
    Server-defined URL of this resource.
    ServerTlsPolicy string
    A fully-qualified ServerTLSPolicy URL reference. Specifies how TLS traffic is terminated. If empty, TLS termination is disabled.
    Subnetwork string
    The relative resource name identifying the subnetwork in which this SWG is allocated. For example: projects/*/regions/us-central1/subnetworks/network-1. Currently, this field is specific to gateways of type 'SECURE_WEB_GATEWAY.
    Type string
    Immutable. The type of the customer-managed gateway. Possible values are: * OPEN_MESH * SECURE_WEB_GATEWAY. Possible values are: TYPE_UNSPECIFIED, OPEN_MESH, SECURE_WEB_GATEWAY.
    UpdateTime string
    Time the AccessPolicy was updated in UTC.
    Addresses []string
    Zero or one IPv4-address on which the Gateway will receive the traffic. When no address is provided, an IP from the subnetwork is allocated This field only applies to gateways of type 'SECURE_WEB_GATEWAY'. Gateways of type 'OPEN_MESH' listen on 0.0.0.0.
    CertificateUrls []string
    A fully-qualified Certificates URL reference. The proxy presents a Certificate (selected based on SNI) when establishing a TLS connection. This feature only applies to gateways of type 'SECURE_WEB_GATEWAY'.
    CreateTime string
    Time the AccessPolicy was created in UTC.
    DeleteSwgAutogenRouterOnDestroy bool
    When deleting a gateway of type 'SECURE_WEB_GATEWAY', this boolean option will also delete auto generated router by the gateway creation. If there is no other gateway of type 'SECURE_WEB_GATEWAY' remaining for that region and network it will be deleted.
    Description string
    A free-text description of the resource. Max length 1024 characters.
    EffectiveLabels map[string]string
    All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
    GatewaySecurityPolicy string
    A fully-qualified GatewaySecurityPolicy URL reference. Defines how a server should apply security policy to inbound (VM to Proxy) initiated connections. For example: projects/*/locations/*/gatewaySecurityPolicies/swg-policy. This policy is specific to gateways of type 'SECURE_WEB_GATEWAY'.
    Labels map[string]string
    Set of label tags associated with the Gateway resource. Note: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field effective_labels for all of the labels present on the resource.
    Location string
    The location of the gateway. The default value is global.
    Name string
    Short name of the Gateway resource to be created.


    Network string
    The relative resource name identifying the VPC network that is using this configuration. For example: projects/*/global/networks/network-1. Currently, this field is specific to gateways of type 'SECURE_WEB_GATEWAY'.
    Ports []int
    One or more port numbers (1-65535), on which the Gateway will receive traffic. The proxy binds to the specified ports. Gateways of type 'SECURE_WEB_GATEWAY' are limited to 1 port. Gateways of type 'OPEN_MESH' listen on 0.0.0.0 and support multiple ports.
    Project string
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    PulumiLabels map[string]string
    The combination of labels configured directly on the resource and default labels configured on the provider.
    Scope string
    Immutable. Scope determines how configuration across multiple Gateway instances are merged. The configuration for multiple Gateway instances with the same scope will be merged as presented as a single coniguration to the proxy/load balancer. Max length 64 characters. Scope should start with a letter and can only have letters, numbers, hyphens.
    SelfLink string
    Server-defined URL of this resource.
    ServerTlsPolicy string
    A fully-qualified ServerTLSPolicy URL reference. Specifies how TLS traffic is terminated. If empty, TLS termination is disabled.
    Subnetwork string
    The relative resource name identifying the subnetwork in which this SWG is allocated. For example: projects/*/regions/us-central1/subnetworks/network-1. Currently, this field is specific to gateways of type 'SECURE_WEB_GATEWAY.
    Type string
    Immutable. The type of the customer-managed gateway. Possible values are: * OPEN_MESH * SECURE_WEB_GATEWAY. Possible values are: TYPE_UNSPECIFIED, OPEN_MESH, SECURE_WEB_GATEWAY.
    UpdateTime string
    Time the AccessPolicy was updated in UTC.
    addresses List<String>
    Zero or one IPv4-address on which the Gateway will receive the traffic. When no address is provided, an IP from the subnetwork is allocated This field only applies to gateways of type 'SECURE_WEB_GATEWAY'. Gateways of type 'OPEN_MESH' listen on 0.0.0.0.
    certificateUrls List<String>
    A fully-qualified Certificates URL reference. The proxy presents a Certificate (selected based on SNI) when establishing a TLS connection. This feature only applies to gateways of type 'SECURE_WEB_GATEWAY'.
    createTime String
    Time the AccessPolicy was created in UTC.
    deleteSwgAutogenRouterOnDestroy Boolean
    When deleting a gateway of type 'SECURE_WEB_GATEWAY', this boolean option will also delete auto generated router by the gateway creation. If there is no other gateway of type 'SECURE_WEB_GATEWAY' remaining for that region and network it will be deleted.
    description String
    A free-text description of the resource. Max length 1024 characters.
    effectiveLabels Map<String,String>
    All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
    gatewaySecurityPolicy String
    A fully-qualified GatewaySecurityPolicy URL reference. Defines how a server should apply security policy to inbound (VM to Proxy) initiated connections. For example: projects/*/locations/*/gatewaySecurityPolicies/swg-policy. This policy is specific to gateways of type 'SECURE_WEB_GATEWAY'.
    labels Map<String,String>
    Set of label tags associated with the Gateway resource. Note: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field effective_labels for all of the labels present on the resource.
    location String
    The location of the gateway. The default value is global.
    name String
    Short name of the Gateway resource to be created.


    network String
    The relative resource name identifying the VPC network that is using this configuration. For example: projects/*/global/networks/network-1. Currently, this field is specific to gateways of type 'SECURE_WEB_GATEWAY'.
    ports List<Integer>
    One or more port numbers (1-65535), on which the Gateway will receive traffic. The proxy binds to the specified ports. Gateways of type 'SECURE_WEB_GATEWAY' are limited to 1 port. Gateways of type 'OPEN_MESH' listen on 0.0.0.0 and support multiple ports.
    project String
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    pulumiLabels Map<String,String>
    The combination of labels configured directly on the resource and default labels configured on the provider.
    scope String
    Immutable. Scope determines how configuration across multiple Gateway instances are merged. The configuration for multiple Gateway instances with the same scope will be merged as presented as a single coniguration to the proxy/load balancer. Max length 64 characters. Scope should start with a letter and can only have letters, numbers, hyphens.
    selfLink String
    Server-defined URL of this resource.
    serverTlsPolicy String
    A fully-qualified ServerTLSPolicy URL reference. Specifies how TLS traffic is terminated. If empty, TLS termination is disabled.
    subnetwork String
    The relative resource name identifying the subnetwork in which this SWG is allocated. For example: projects/*/regions/us-central1/subnetworks/network-1. Currently, this field is specific to gateways of type 'SECURE_WEB_GATEWAY.
    type String
    Immutable. The type of the customer-managed gateway. Possible values are: * OPEN_MESH * SECURE_WEB_GATEWAY. Possible values are: TYPE_UNSPECIFIED, OPEN_MESH, SECURE_WEB_GATEWAY.
    updateTime String
    Time the AccessPolicy was updated in UTC.
    addresses string[]
    Zero or one IPv4-address on which the Gateway will receive the traffic. When no address is provided, an IP from the subnetwork is allocated This field only applies to gateways of type 'SECURE_WEB_GATEWAY'. Gateways of type 'OPEN_MESH' listen on 0.0.0.0.
    certificateUrls string[]
    A fully-qualified Certificates URL reference. The proxy presents a Certificate (selected based on SNI) when establishing a TLS connection. This feature only applies to gateways of type 'SECURE_WEB_GATEWAY'.
    createTime string
    Time the AccessPolicy was created in UTC.
    deleteSwgAutogenRouterOnDestroy boolean
    When deleting a gateway of type 'SECURE_WEB_GATEWAY', this boolean option will also delete auto generated router by the gateway creation. If there is no other gateway of type 'SECURE_WEB_GATEWAY' remaining for that region and network it will be deleted.
    description string
    A free-text description of the resource. Max length 1024 characters.
    effectiveLabels {[key: string]: string}
    All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
    gatewaySecurityPolicy string
    A fully-qualified GatewaySecurityPolicy URL reference. Defines how a server should apply security policy to inbound (VM to Proxy) initiated connections. For example: projects/*/locations/*/gatewaySecurityPolicies/swg-policy. This policy is specific to gateways of type 'SECURE_WEB_GATEWAY'.
    labels {[key: string]: string}
    Set of label tags associated with the Gateway resource. Note: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field effective_labels for all of the labels present on the resource.
    location string
    The location of the gateway. The default value is global.
    name string
    Short name of the Gateway resource to be created.


    network string
    The relative resource name identifying the VPC network that is using this configuration. For example: projects/*/global/networks/network-1. Currently, this field is specific to gateways of type 'SECURE_WEB_GATEWAY'.
    ports number[]
    One or more port numbers (1-65535), on which the Gateway will receive traffic. The proxy binds to the specified ports. Gateways of type 'SECURE_WEB_GATEWAY' are limited to 1 port. Gateways of type 'OPEN_MESH' listen on 0.0.0.0 and support multiple ports.
    project string
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    pulumiLabels {[key: string]: string}
    The combination of labels configured directly on the resource and default labels configured on the provider.
    scope string
    Immutable. Scope determines how configuration across multiple Gateway instances are merged. The configuration for multiple Gateway instances with the same scope will be merged as presented as a single coniguration to the proxy/load balancer. Max length 64 characters. Scope should start with a letter and can only have letters, numbers, hyphens.
    selfLink string
    Server-defined URL of this resource.
    serverTlsPolicy string
    A fully-qualified ServerTLSPolicy URL reference. Specifies how TLS traffic is terminated. If empty, TLS termination is disabled.
    subnetwork string
    The relative resource name identifying the subnetwork in which this SWG is allocated. For example: projects/*/regions/us-central1/subnetworks/network-1. Currently, this field is specific to gateways of type 'SECURE_WEB_GATEWAY.
    type string
    Immutable. The type of the customer-managed gateway. Possible values are: * OPEN_MESH * SECURE_WEB_GATEWAY. Possible values are: TYPE_UNSPECIFIED, OPEN_MESH, SECURE_WEB_GATEWAY.
    updateTime string
    Time the AccessPolicy was updated in UTC.
    addresses Sequence[str]
    Zero or one IPv4-address on which the Gateway will receive the traffic. When no address is provided, an IP from the subnetwork is allocated This field only applies to gateways of type 'SECURE_WEB_GATEWAY'. Gateways of type 'OPEN_MESH' listen on 0.0.0.0.
    certificate_urls Sequence[str]
    A fully-qualified Certificates URL reference. The proxy presents a Certificate (selected based on SNI) when establishing a TLS connection. This feature only applies to gateways of type 'SECURE_WEB_GATEWAY'.
    create_time str
    Time the AccessPolicy was created in UTC.
    delete_swg_autogen_router_on_destroy bool
    When deleting a gateway of type 'SECURE_WEB_GATEWAY', this boolean option will also delete auto generated router by the gateway creation. If there is no other gateway of type 'SECURE_WEB_GATEWAY' remaining for that region and network it will be deleted.
    description str
    A free-text description of the resource. Max length 1024 characters.
    effective_labels Mapping[str, str]
    All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
    gateway_security_policy str
    A fully-qualified GatewaySecurityPolicy URL reference. Defines how a server should apply security policy to inbound (VM to Proxy) initiated connections. For example: projects/*/locations/*/gatewaySecurityPolicies/swg-policy. This policy is specific to gateways of type 'SECURE_WEB_GATEWAY'.
    labels Mapping[str, str]
    Set of label tags associated with the Gateway resource. Note: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field effective_labels for all of the labels present on the resource.
    location str
    The location of the gateway. The default value is global.
    name str
    Short name of the Gateway resource to be created.


    network str
    The relative resource name identifying the VPC network that is using this configuration. For example: projects/*/global/networks/network-1. Currently, this field is specific to gateways of type 'SECURE_WEB_GATEWAY'.
    ports Sequence[int]
    One or more port numbers (1-65535), on which the Gateway will receive traffic. The proxy binds to the specified ports. Gateways of type 'SECURE_WEB_GATEWAY' are limited to 1 port. Gateways of type 'OPEN_MESH' listen on 0.0.0.0 and support multiple ports.
    project str
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    pulumi_labels Mapping[str, str]
    The combination of labels configured directly on the resource and default labels configured on the provider.
    scope str
    Immutable. Scope determines how configuration across multiple Gateway instances are merged. The configuration for multiple Gateway instances with the same scope will be merged as presented as a single coniguration to the proxy/load balancer. Max length 64 characters. Scope should start with a letter and can only have letters, numbers, hyphens.
    self_link str
    Server-defined URL of this resource.
    server_tls_policy str
    A fully-qualified ServerTLSPolicy URL reference. Specifies how TLS traffic is terminated. If empty, TLS termination is disabled.
    subnetwork str
    The relative resource name identifying the subnetwork in which this SWG is allocated. For example: projects/*/regions/us-central1/subnetworks/network-1. Currently, this field is specific to gateways of type 'SECURE_WEB_GATEWAY.
    type str
    Immutable. The type of the customer-managed gateway. Possible values are: * OPEN_MESH * SECURE_WEB_GATEWAY. Possible values are: TYPE_UNSPECIFIED, OPEN_MESH, SECURE_WEB_GATEWAY.
    update_time str
    Time the AccessPolicy was updated in UTC.
    addresses List<String>
    Zero or one IPv4-address on which the Gateway will receive the traffic. When no address is provided, an IP from the subnetwork is allocated This field only applies to gateways of type 'SECURE_WEB_GATEWAY'. Gateways of type 'OPEN_MESH' listen on 0.0.0.0.
    certificateUrls List<String>
    A fully-qualified Certificates URL reference. The proxy presents a Certificate (selected based on SNI) when establishing a TLS connection. This feature only applies to gateways of type 'SECURE_WEB_GATEWAY'.
    createTime String
    Time the AccessPolicy was created in UTC.
    deleteSwgAutogenRouterOnDestroy Boolean
    When deleting a gateway of type 'SECURE_WEB_GATEWAY', this boolean option will also delete auto generated router by the gateway creation. If there is no other gateway of type 'SECURE_WEB_GATEWAY' remaining for that region and network it will be deleted.
    description String
    A free-text description of the resource. Max length 1024 characters.
    effectiveLabels Map<String>
    All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
    gatewaySecurityPolicy String
    A fully-qualified GatewaySecurityPolicy URL reference. Defines how a server should apply security policy to inbound (VM to Proxy) initiated connections. For example: projects/*/locations/*/gatewaySecurityPolicies/swg-policy. This policy is specific to gateways of type 'SECURE_WEB_GATEWAY'.
    labels Map<String>
    Set of label tags associated with the Gateway resource. Note: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field effective_labels for all of the labels present on the resource.
    location String
    The location of the gateway. The default value is global.
    name String
    Short name of the Gateway resource to be created.


    network String
    The relative resource name identifying the VPC network that is using this configuration. For example: projects/*/global/networks/network-1. Currently, this field is specific to gateways of type 'SECURE_WEB_GATEWAY'.
    ports List<Number>
    One or more port numbers (1-65535), on which the Gateway will receive traffic. The proxy binds to the specified ports. Gateways of type 'SECURE_WEB_GATEWAY' are limited to 1 port. Gateways of type 'OPEN_MESH' listen on 0.0.0.0 and support multiple ports.
    project String
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    pulumiLabels Map<String>
    The combination of labels configured directly on the resource and default labels configured on the provider.
    scope String
    Immutable. Scope determines how configuration across multiple Gateway instances are merged. The configuration for multiple Gateway instances with the same scope will be merged as presented as a single coniguration to the proxy/load balancer. Max length 64 characters. Scope should start with a letter and can only have letters, numbers, hyphens.
    selfLink String
    Server-defined URL of this resource.
    serverTlsPolicy String
    A fully-qualified ServerTLSPolicy URL reference. Specifies how TLS traffic is terminated. If empty, TLS termination is disabled.
    subnetwork String
    The relative resource name identifying the subnetwork in which this SWG is allocated. For example: projects/*/regions/us-central1/subnetworks/network-1. Currently, this field is specific to gateways of type 'SECURE_WEB_GATEWAY.
    type String
    Immutable. The type of the customer-managed gateway. Possible values are: * OPEN_MESH * SECURE_WEB_GATEWAY. Possible values are: TYPE_UNSPECIFIED, OPEN_MESH, SECURE_WEB_GATEWAY.
    updateTime String
    Time the AccessPolicy was updated in UTC.

    Import

    Gateway can be imported using any of these accepted formats:

    • projects/{{project}}/locations/{{location}}/gateways/{{name}}

    • {{project}}/{{location}}/{{name}}

    • {{location}}/{{name}}

    When using the pulumi import command, Gateway can be imported using one of the formats above. For example:

    $ pulumi import gcp:networkservices/gateway:Gateway default projects/{{project}}/locations/{{location}}/gateways/{{name}}
    
    $ pulumi import gcp:networkservices/gateway:Gateway default {{project}}/{{location}}/{{name}}
    
    $ pulumi import gcp:networkservices/gateway:Gateway default {{location}}/{{name}}
    

    Package Details

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