Skip to content

googleNetworkServicesGateway

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.

\~> Warning: This resource is in beta, and should be used with the terraform-provider-google-beta provider. See Provider Versions for more details on beta resources.

To get more information about Gateway, see:

Example Usage - Network Services Gateway Basic

/*Provider bindings are generated by running cdktf get.
See https://cdk.tf/provider-generation for more details.*/
import * as google from "./.gen/providers/google";
/*The following providers are missing schema information and might need manual adjustments to synthesize correctly: google.
For a more precise conversion please use the --provider flag in convert.*/
new google.networkServicesGateway.NetworkServicesGateway(this, "default", {
  name: "my-gateway",
  ports: [443],
  provider: "${google-beta}",
  scope: "default-scope-basic",
  type: "OPEN_MESH",
});

Example Usage - Network Services Gateway Advanced

/*Provider bindings are generated by running cdktf get.
See https://cdk.tf/provider-generation for more details.*/
import * as google from "./.gen/providers/google";
/*The following providers are missing schema information and might need manual adjustments to synthesize correctly: google.
For a more precise conversion please use the --provider flag in convert.*/
new google.networkServicesGateway.NetworkServicesGateway(this, "default", {
  description: "my description",
  labels: [
    {
      foo: "bar",
    },
  ],
  name: "my-gateway",
  ports: [443],
  provider: "${google-beta}",
  scope: "default-scope-advance",
  type: "OPEN_MESH",
});

Argument Reference

The following arguments are supported:

  • type - (Required) Immutable. The type of the customer-managed gateway. Possible values are: * OPEN_MESH * SECURE_WEB_GATEWAY. Possible values are typeUnspecified, openMesh, and secureWebGateway.

  • ports - (Required) 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.

  • scope - (Required) 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.

  • name - (Required) Short name of the Gateway resource to be created.


  • labels - (Optional) Set of label tags associated with the Gateway resource.

  • description - (Optional) A free-text description of the resource. Max length 1024 characters.

  • serverTlsPolicy - (Optional) A fully-qualified ServerTLSPolicy URL reference. Specifies how TLS traffic is terminated. If empty, TLS termination is disabled.

  • location - (Optional) The location of the gateway. The default value is global.

  • project - (Optional) The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

Attributes Reference

In addition to the arguments listed above, the following computed attributes are exported:

  • id - an identifier for the resource with format projects/{{project}}/locations/{{location}}/gateways/{{name}}

  • selfLink - Server-defined URL of this resource.

  • createTime - Time the AccessPolicy was created in UTC.

  • updateTime - Time the AccessPolicy was updated in UTC.

Timeouts

This resource provides the following Timeouts configuration options:

  • create - Default is 30 minutes.
  • update - Default is 30 minutes.
  • delete - Default is 30 minutes.

Import

Gateway can be imported using any of these accepted formats:

$ terraform import google_network_services_gateway.default projects/{{project}}/locations/{{location}}/gateways/{{name}}
$ terraform import google_network_services_gateway.default {{project}}/{{location}}/{{name}}
$ terraform import google_network_services_gateway.default {{location}}/{{name}}

User Project Overrides

This resource supports User Project Overrides.