import * as pulumi from "@pulumi/pulumi"; import * as inputs from "../types/input"; import * as outputs from "../types/output"; /** * TargetServer configuration. TargetServers are used to decouple a proxy TargetEndpoint HTTPTargetConnections from concrete URLs for backend services. * * To get more information about TargetServer, see: * * * [API documentation](https://cloud.google.com/apigee/docs/reference/apis/apigee/rest/v1/organizations.environments.targetservers/create) * * How-to Guides * * [Load balancing across backend servers](https://cloud.google.com/apigee/docs/api-platform/deploy/load-balancing-across-backend-servers) * * ## Example Usage * * ### Apigee Target Server Test Basic * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as gcp from "@pulumi/gcp"; * * const project = new gcp.organizations.Project("project", { * projectId: "my-project", * name: "my-project", * orgId: "123456789", * billingAccount: "000000-0000000-0000000-000000", * deletionPolicy: "DELETE", * }); * const apigee = new gcp.projects.Service("apigee", { * project: project.projectId, * service: "apigee.googleapis.com", * }); * const servicenetworking = new gcp.projects.Service("servicenetworking", { * project: project.projectId, * service: "servicenetworking.googleapis.com", * }, { * dependsOn: [apigee], * }); * const compute = new gcp.projects.Service("compute", { * project: project.projectId, * service: "compute.googleapis.com", * }, { * dependsOn: [servicenetworking], * }); * const apigeeNetwork = new gcp.compute.Network("apigee_network", { * name: "apigee-network", * project: project.projectId, * }, { * dependsOn: [compute], * }); * const apigeeRange = new gcp.compute.GlobalAddress("apigee_range", { * name: "apigee-range", * purpose: "VPC_PEERING", * addressType: "INTERNAL", * prefixLength: 16, * network: apigeeNetwork.id, * project: project.projectId, * }); * const apigeeVpcConnection = new gcp.servicenetworking.Connection("apigee_vpc_connection", { * network: apigeeNetwork.id, * service: "servicenetworking.googleapis.com", * reservedPeeringRanges: [apigeeRange.name], * }, { * dependsOn: [servicenetworking], * }); * const apigeeOrg = new gcp.apigee.Organization("apigee_org", { * analyticsRegion: "us-central1", * projectId: project.projectId, * authorizedNetwork: apigeeNetwork.id, * }, { * dependsOn: [ * apigeeVpcConnection, * apigee, * ], * }); * const apigeeEnvironment = new gcp.apigee.Environment("apigee_environment", { * orgId: apigeeOrg.id, * name: "my-environment-name", * description: "Apigee Environment", * displayName: "environment-1", * }); * const apigeeTargetServer = new gcp.apigee.TargetServer("apigee_target_server", { * name: "my-target-server", * description: "Apigee Target Server", * protocol: "HTTP", * host: "abc.foo.com", * port: 8080, * envId: apigeeEnvironment.id, * }); * ``` * * ## Import * * TargetServer can be imported using any of these accepted formats: * * * `{{env_id}}/targetservers/{{name}}` * * * `{{env_id}}/{{name}}` * * When using the `pulumi import` command, TargetServer can be imported using one of the formats above. For example: * * ```sh * $ pulumi import gcp:apigee/targetServer:TargetServer default {{env_id}}/targetservers/{{name}} * ``` * * ```sh * $ pulumi import gcp:apigee/targetServer:TargetServer default {{env_id}}/{{name}} * ``` */ export declare class TargetServer extends pulumi.CustomResource { /** * Get an existing TargetServer resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param state Any extra arguments used during the lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static get(name: string, id: pulumi.Input, state?: TargetServerState, opts?: pulumi.CustomResourceOptions): TargetServer; /** * Returns true if the given object is an instance of TargetServer. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj: any): obj is TargetServer; /** * A human-readable description of this TargetServer. */ readonly description: pulumi.Output; /** * The Apigee environment group associated with the Apigee environment, * in the format `organizations/{{org_name}}/environments/{{env_name}}`. */ readonly envId: pulumi.Output; /** * The host name this target connects to. Value must be a valid hostname as described by RFC-1123. */ readonly host: pulumi.Output; /** * 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. */ readonly isEnabled: pulumi.Output; /** * The resource id of this reference. Values must match the regular expression [\w\s-.]+. */ readonly name: pulumi.Output; /** * The port number this target connects to on the given host. Value must be between 1 and 65535, inclusive. */ readonly port: pulumi.Output; /** * Immutable. The protocol used by this TargetServer. * Possible values are: `HTTP`, `HTTP2`, `GRPC_TARGET`, `GRPC`, `EXTERNAL_CALLOUT`. */ readonly protocol: pulumi.Output; /** * 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. */ readonly sSlInfo: pulumi.Output; /** * Create a TargetServer resource with the given unique name, arguments, and options. * * @param name The _unique_ name of the resource. * @param args The arguments to use to populate this resource's properties. * @param opts A bag of options that control this resource's behavior. */ constructor(name: string, args: TargetServerArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering TargetServer resources. */ export interface TargetServerState { /** * A human-readable description of this TargetServer. */ description?: pulumi.Input; /** * The Apigee environment group associated with the Apigee environment, * in the format `organizations/{{org_name}}/environments/{{env_name}}`. */ envId?: pulumi.Input; /** * The host name this target connects to. Value must be a valid hostname as described by RFC-1123. */ host?: pulumi.Input; /** * 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. */ isEnabled?: pulumi.Input; /** * The resource id of this reference. Values must match the regular expression [\w\s-.]+. */ name?: pulumi.Input; /** * The port number this target connects to on the given host. Value must be between 1 and 65535, inclusive. */ port?: pulumi.Input; /** * Immutable. The protocol used by this TargetServer. * Possible values are: `HTTP`, `HTTP2`, `GRPC_TARGET`, `GRPC`, `EXTERNAL_CALLOUT`. */ protocol?: pulumi.Input; /** * 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. */ sSlInfo?: pulumi.Input; } /** * The set of arguments for constructing a TargetServer resource. */ export interface TargetServerArgs { /** * A human-readable description of this TargetServer. */ description?: pulumi.Input; /** * The Apigee environment group associated with the Apigee environment, * in the format `organizations/{{org_name}}/environments/{{env_name}}`. */ envId: pulumi.Input; /** * The host name this target connects to. Value must be a valid hostname as described by RFC-1123. */ host: pulumi.Input; /** * 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. */ isEnabled?: pulumi.Input; /** * The resource id of this reference. Values must match the regular expression [\w\s-.]+. */ name?: pulumi.Input; /** * The port number this target connects to on the given host. Value must be between 1 and 65535, inclusive. */ port: pulumi.Input; /** * Immutable. The protocol used by this TargetServer. * Possible values are: `HTTP`, `HTTP2`, `GRPC_TARGET`, `GRPC`, `EXTERNAL_CALLOUT`. */ protocol?: pulumi.Input; /** * 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. */ sSlInfo?: pulumi.Input; }