google_compute_region_target_tcp_proxy

Represents a RegionTargetTcpProxy resource, which is used by one or more forwarding rules to route incoming TCP requests to a regional TCP proxy load balancer.

To get more information about RegionTargetTcpProxy, see:

Open in Cloud Shell

Example Usage - Region Target Tcp Proxy Basic

resource "google_compute_region_target_tcp_proxy" "default" {
  name            = "test-proxy"
  region          = "europe-west4"
  backend_service = google_compute_region_backend_service.default.id
}

resource "google_compute_region_backend_service" "default" {
  name        = "backend-service"
  protocol    = "TCP"
  timeout_sec = 10
  region      = "europe-west4"

  health_checks         = [google_compute_region_health_check.default.id]
  load_balancing_scheme = "INTERNAL_MANAGED"
}

resource "google_compute_region_health_check" "default" {
  name               = "health-check"
  region             = "europe-west4"
  timeout_sec        = 1
  check_interval_sec = 1

  tcp_health_check {
    port = "80"
  }
}

Argument Reference

The following arguments are supported:


Attributes Reference

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

Timeouts

This resource provides the following Timeouts configuration options:

Import

RegionTargetTcpProxy can be imported using any of these accepted formats:

In Terraform v1.5.0 and later, use an import block to import RegionTargetTcpProxy using one of the formats above. For example:

import {
  id = "projects/{{project}}/regions/{{region}}/targetTcpProxies/{{name}}"
  to = google_compute_region_target_tcp_proxy.default
}

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

$ terraform import google_compute_region_target_tcp_proxy.default projects/{{project}}/regions/{{region}}/targetTcpProxies/{{name}}
$ terraform import google_compute_region_target_tcp_proxy.default {{project}}/{{region}}/{{name}}
$ terraform import google_compute_region_target_tcp_proxy.default {{region}}/{{name}}
$ terraform import google_compute_region_target_tcp_proxy.default {{name}}

User Project Overrides

This resource supports User Project Overrides.