import * as pulumi from "@pulumi/pulumi"; /** * Represents a Target gRPC Proxy resource. A target gRPC proxy is a component * of load balancers intended for load balancing gRPC traffic. Global forwarding * rules reference a target gRPC proxy. The Target gRPC Proxy references * a URL map which specifies how traffic routes to gRPC backend services. * * To get more information about TargetGrpcProxy, see: * * * [API documentation](https://cloud.google.com/compute/docs/reference/rest/v1/targetGrpcProxies) * * How-to Guides * * [Using Target gRPC Proxies](https://cloud.google.com/traffic-director/docs/proxyless-overview) * * ## Example Usage * * ### Target Grpc Proxy Basic * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as gcp from "@pulumi/gcp"; * * const defaultHealthCheck = new gcp.compute.HealthCheck("default", { * name: "healthcheck", * timeoutSec: 1, * checkIntervalSec: 1, * grpcHealthCheck: { * portName: "health-check-port", * portSpecification: "USE_NAMED_PORT", * grpcServiceName: "testservice", * }, * }); * const home = new gcp.compute.BackendService("home", { * name: "backend", * portName: "grpc", * protocol: "GRPC", * timeoutSec: 10, * healthChecks: defaultHealthCheck.id, * loadBalancingScheme: "INTERNAL_SELF_MANAGED", * }); * const urlmap = new gcp.compute.URLMap("urlmap", { * name: "urlmap", * description: "a description", * defaultService: home.id, * hostRules: [{ * hosts: ["mysite.com"], * pathMatcher: "allpaths", * }], * pathMatchers: [{ * name: "allpaths", * defaultService: home.id, * routeRules: [{ * priority: 1, * headerAction: { * requestHeadersToRemoves: ["RemoveMe2"], * requestHeadersToAdds: [{ * headerName: "AddSomethingElse", * headerValue: "MyOtherValue", * replace: true, * }], * responseHeadersToRemoves: ["RemoveMe3"], * responseHeadersToAdds: [{ * headerName: "AddMe", * headerValue: "MyValue", * replace: false, * }], * }, * matchRules: [{ * fullPathMatch: "a full path", * headerMatches: [{ * headerName: "someheader", * exactMatch: "match this exactly", * invertMatch: true, * }], * ignoreCase: true, * metadataFilters: [{ * filterMatchCriteria: "MATCH_ANY", * filterLabels: [{ * name: "PLANET", * value: "MARS", * }], * }], * queryParameterMatches: [{ * name: "a query parameter", * presentMatch: true, * }], * }], * urlRedirect: { * hostRedirect: "A host", * httpsRedirect: false, * pathRedirect: "some/path", * redirectResponseCode: "TEMPORARY_REDIRECT", * stripQuery: true, * }, * }], * }], * tests: [{ * service: home.id, * host: "hi.com", * path: "/home", * }], * }); * const _default = new gcp.compute.TargetGrpcProxy("default", { * name: "proxy", * urlMap: urlmap.id, * validateForProxyless: true, * }); * ``` * * ## Import * * TargetGrpcProxy can be imported using any of these accepted formats: * * * `projects/{{project}}/global/targetGrpcProxies/{{name}}` * * * `{{project}}/{{name}}` * * * `{{name}}` * * When using the `pulumi import` command, TargetGrpcProxy can be imported using one of the formats above. For example: * * ```sh * $ pulumi import gcp:compute/targetGrpcProxy:TargetGrpcProxy default projects/{{project}}/global/targetGrpcProxies/{{name}} * ``` * * ```sh * $ pulumi import gcp:compute/targetGrpcProxy:TargetGrpcProxy default {{project}}/{{name}} * ``` * * ```sh * $ pulumi import gcp:compute/targetGrpcProxy:TargetGrpcProxy default {{name}} * ``` */ export declare class TargetGrpcProxy extends pulumi.CustomResource { /** * Get an existing TargetGrpcProxy 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?: TargetGrpcProxyState, opts?: pulumi.CustomResourceOptions): TargetGrpcProxy; /** * Returns true if the given object is an instance of TargetGrpcProxy. 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 TargetGrpcProxy; /** * Creation timestamp in RFC3339 text format. */ readonly creationTimestamp: pulumi.Output; /** * An optional description of this resource. */ readonly description: pulumi.Output; /** * Fingerprint of this resource. A hash of the contents stored in * this object. This field is used in optimistic locking. This field * will be ignored when inserting a TargetGrpcProxy. An up-to-date * fingerprint must be provided in order to patch/update the * TargetGrpcProxy; otherwise, the request will fail with error * 412 conditionNotMet. To see the latest fingerprint, make a get() * request to retrieve the TargetGrpcProxy. A base64-encoded string. */ readonly fingerprint: pulumi.Output; /** * 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. */ readonly name: pulumi.Output; /** * The ID of the project in which the resource belongs. * If it is not provided, the provider project is used. */ readonly project: pulumi.Output; /** * The URI of the created resource. */ readonly selfLink: pulumi.Output; /** * Server-defined URL with id for the resource. */ readonly selfLinkWithId: pulumi.Output; /** * URL to the UrlMap resource that defines the mapping from URL to * the BackendService. The protocol field in the BackendService * must be set to GRPC. */ readonly urlMap: pulumi.Output; /** * If true, indicates that the BackendServices referenced by * the urlMap may be accessed by gRPC applications without using * a sidecar proxy. This will enable configuration checks on urlMap * and its referenced BackendServices to not allow unsupported features. * A gRPC application must use "xds:///" scheme in the target URI * of the service it is connecting to. If false, indicates that the * BackendServices referenced by the urlMap will be accessed by gRPC * applications via a sidecar proxy. In this case, a gRPC application * must not use "xds:///" scheme in the target URI of the service * it is connecting to */ readonly validateForProxyless: pulumi.Output; /** * Create a TargetGrpcProxy 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?: TargetGrpcProxyArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering TargetGrpcProxy resources. */ export interface TargetGrpcProxyState { /** * Creation timestamp in RFC3339 text format. */ creationTimestamp?: pulumi.Input; /** * An optional description of this resource. */ description?: pulumi.Input; /** * Fingerprint of this resource. A hash of the contents stored in * this object. This field is used in optimistic locking. This field * will be ignored when inserting a TargetGrpcProxy. An up-to-date * fingerprint must be provided in order to patch/update the * TargetGrpcProxy; otherwise, the request will fail with error * 412 conditionNotMet. To see the latest fingerprint, make a get() * request to retrieve the TargetGrpcProxy. A base64-encoded string. */ fingerprint?: pulumi.Input; /** * 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. */ name?: pulumi.Input; /** * The ID of the project in which the resource belongs. * If it is not provided, the provider project is used. */ project?: pulumi.Input; /** * The URI of the created resource. */ selfLink?: pulumi.Input; /** * Server-defined URL with id for the resource. */ selfLinkWithId?: pulumi.Input; /** * URL to the UrlMap resource that defines the mapping from URL to * the BackendService. The protocol field in the BackendService * must be set to GRPC. */ urlMap?: pulumi.Input; /** * If true, indicates that the BackendServices referenced by * the urlMap may be accessed by gRPC applications without using * a sidecar proxy. This will enable configuration checks on urlMap * and its referenced BackendServices to not allow unsupported features. * A gRPC application must use "xds:///" scheme in the target URI * of the service it is connecting to. If false, indicates that the * BackendServices referenced by the urlMap will be accessed by gRPC * applications via a sidecar proxy. In this case, a gRPC application * must not use "xds:///" scheme in the target URI of the service * it is connecting to */ validateForProxyless?: pulumi.Input; } /** * The set of arguments for constructing a TargetGrpcProxy resource. */ export interface TargetGrpcProxyArgs { /** * An optional description of this resource. */ description?: pulumi.Input; /** * 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. */ name?: pulumi.Input; /** * The ID of the project in which the resource belongs. * If it is not provided, the provider project is used. */ project?: pulumi.Input; /** * URL to the UrlMap resource that defines the mapping from URL to * the BackendService. The protocol field in the BackendService * must be set to GRPC. */ urlMap?: pulumi.Input; /** * If true, indicates that the BackendServices referenced by * the urlMap may be accessed by gRPC applications without using * a sidecar proxy. This will enable configuration checks on urlMap * and its referenced BackendServices to not allow unsupported features. * A gRPC application must use "xds:///" scheme in the target URI * of the service it is connecting to. If false, indicates that the * BackendServices referenced by the urlMap will be accessed by gRPC * applications via a sidecar proxy. In this case, a gRPC application * must not use "xds:///" scheme in the target URI of the service * it is connecting to */ validateForProxyless?: pulumi.Input; }