TargetServer

class TargetServer : KotlinCustomResource

TargetServer configuration. TargetServers are used to decouple a proxy TargetEndpoint HTTPTargetConnections from concrete URLs for backend services. To get more information about TargetServer, see:

Example Usage

Apigee Target Server Test Basic

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.organizations.Project;
import com.pulumi.gcp.organizations.ProjectArgs;
import com.pulumi.gcp.projects.Service;
import com.pulumi.gcp.projects.ServiceArgs;
import com.pulumi.gcp.compute.Network;
import com.pulumi.gcp.compute.NetworkArgs;
import com.pulumi.gcp.compute.GlobalAddress;
import com.pulumi.gcp.compute.GlobalAddressArgs;
import com.pulumi.gcp.servicenetworking.Connection;
import com.pulumi.gcp.servicenetworking.ConnectionArgs;
import com.pulumi.gcp.apigee.Organization;
import com.pulumi.gcp.apigee.OrganizationArgs;
import com.pulumi.gcp.apigee.Environment;
import com.pulumi.gcp.apigee.EnvironmentArgs;
import com.pulumi.gcp.apigee.TargetServer;
import com.pulumi.gcp.apigee.TargetServerArgs;
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 project = new Project("project", ProjectArgs.builder()
.projectId("my-project")
.orgId("123456789")
.billingAccount("000000-0000000-0000000-000000")
.build());
var apigee = new Service("apigee", ServiceArgs.builder()
.project(project.projectId())
.service("apigee.googleapis.com")
.build());
var servicenetworking = new Service("servicenetworking", ServiceArgs.builder()
.project(project.projectId())
.service("servicenetworking.googleapis.com")
.build(), CustomResourceOptions.builder()
.dependsOn(apigee)
.build());
var compute = new Service("compute", ServiceArgs.builder()
.project(project.projectId())
.service("compute.googleapis.com")
.build(), CustomResourceOptions.builder()
.dependsOn(servicenetworking)
.build());
var apigeeNetwork = new Network("apigeeNetwork", NetworkArgs.builder()
.project(project.projectId())
.build(), CustomResourceOptions.builder()
.dependsOn(compute)
.build());
var apigeeRange = new GlobalAddress("apigeeRange", GlobalAddressArgs.builder()
.purpose("VPC_PEERING")
.addressType("INTERNAL")
.prefixLength(16)
.network(apigeeNetwork.id())
.project(project.projectId())
.build());
var apigeeVpcConnection = new Connection("apigeeVpcConnection", ConnectionArgs.builder()
.network(apigeeNetwork.id())
.service("servicenetworking.googleapis.com")
.reservedPeeringRanges(apigeeRange.name())
.build(), CustomResourceOptions.builder()
.dependsOn(servicenetworking)
.build());
var apigeeOrg = new Organization("apigeeOrg", OrganizationArgs.builder()
.analyticsRegion("us-central1")
.projectId(project.projectId())
.authorizedNetwork(apigeeNetwork.id())
.build(), CustomResourceOptions.builder()
.dependsOn(
apigeeVpcConnection,
apigee)
.build());
var apigeeEnvironment = new Environment("apigeeEnvironment", EnvironmentArgs.builder()
.orgId(apigeeOrg.id())
.description("Apigee Environment")
.displayName("environment-1")
.build());
var apigeeTargetServer = new TargetServer("apigeeTargetServer", TargetServerArgs.builder()
.description("Apigee Target Server")
.protocol("HTTP")
.host("abc.foo.com")
.port(8080)
.envId(apigeeEnvironment.id())
.build());
}
}

Import

TargetServer can be imported using any of these accepted formats

$ pulumi import gcp:apigee/targetServer:TargetServer default {{env_id}}/targetservers/{{name}}
$ pulumi import gcp:apigee/targetServer:TargetServer default {{env_id}}/{{name}}

Properties

Link copied to clipboard
val description: Output<String>?

A human-readable description of this TargetServer.

Link copied to clipboard
val envId: Output<String>

The Apigee environment group associated with the Apigee environment, in the format organizations/{{org_name}}/environments/{{env_name}}.

Link copied to clipboard
val host: Output<String>

The host name this target connects to. Value must be a valid hostname as described by RFC-1123.

Link copied to clipboard
val id: Output<String>
Link copied to clipboard
val isEnabled: Output<Boolean>?

Enabling/disabling a TargetServer is useful when TargetServers are used in load balancing configurations, and one or more TargetServers need to taken out of rotation periodically. Defaults to true.

Link copied to clipboard
val name: Output<String>

The resource id of this reference. Values must match the regular expression \w\s-.+.

Link copied to clipboard
val port: Output<Int>

The port number this target connects to on the given host. Value must be between 1 and 65535, inclusive.

Link copied to clipboard
val protocol: Output<String>

Immutable. The protocol used by this TargetServer. Possible values are: HTTP, HTTP2, GRPC_TARGET, GRPC, EXTERNAL_CALLOUT.

Link copied to clipboard
val pulumiChildResources: Set<KotlinResource>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Specifies TLS configuration info for this TargetServer. The JSON name is sSLInfo for legacy/backwards compatibility reasons -- Edge originally supported SSL, and the name is still used for TLS configuration. Structure is documented below.

Link copied to clipboard
val urn: Output<String>