Target TCPProxy
Represents a TargetTcpProxy resource, which is used by one or more global forwarding rule to route incoming TCP requests to a Backend service. To get more information about TargetTcpProxy, see:
Example Usage
Target Tcp Proxy Basic
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.compute.HealthCheck;
import com.pulumi.gcp.compute.HealthCheckArgs;
import com.pulumi.gcp.compute.inputs.HealthCheckTcpHealthCheckArgs;
import com.pulumi.gcp.compute.BackendService;
import com.pulumi.gcp.compute.BackendServiceArgs;
import com.pulumi.gcp.compute.TargetTCPProxy;
import com.pulumi.gcp.compute.TargetTCPProxyArgs;
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 defaultHealthCheck = new HealthCheck("defaultHealthCheck", HealthCheckArgs.builder()
.timeoutSec(1)
.checkIntervalSec(1)
.tcpHealthCheck(HealthCheckTcpHealthCheckArgs.builder()
.port("443")
.build())
.build());
var defaultBackendService = new BackendService("defaultBackendService", BackendServiceArgs.builder()
.protocol("TCP")
.timeoutSec(10)
.healthChecks(defaultHealthCheck.id())
.build());
var defaultTargetTCPProxy = new TargetTCPProxy("defaultTargetTCPProxy", TargetTCPProxyArgs.builder()
.backendService(defaultBackendService.id())
.build());
}
}
Import
TargetTcpProxy can be imported using any of these accepted formats
$ pulumi import gcp:compute/targetTCPProxy:TargetTCPProxy default projects/{{project}}/global/targetTcpProxies/{{name}}
$ pulumi import gcp:compute/targetTCPProxy:TargetTCPProxy default {{project}}/{{name}}
$ pulumi import gcp:compute/targetTCPProxy:TargetTCPProxy default {{name}}
Properties
A reference to the BackendService resource.
Creation timestamp in RFC3339 text format.
An optional description of this resource.
Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression a-z?
which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
Specifies the type of proxy header to append before sending data to the backend. Default value is NONE
. Possible values are: NONE
, PROXY_V1
.