UNPKG

@cdktf/provider-google

Version:

Prebuilt google Provider for Terraform CDK (cdktf)

878 lines 127 kB
/** * Copyright (c) HashiCorp, Inc. * SPDX-License-Identifier: MPL-2.0 */ import { Construct } from 'constructs'; import * as cdktf from 'cdktf'; export interface ComputeBackendServiceConfig extends cdktf.TerraformMetaArguments { /** * Lifetime of cookies in seconds if session_affinity is * GENERATED_COOKIE. If set to 0, the cookie is non-persistent and lasts * only until the end of the browser session (or equivalent). The * maximum allowed value for TTL is one day. * * When the load balancing scheme is INTERNAL, this field is not used. * * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/6.36.0/docs/resources/compute_backend_service#affinity_cookie_ttl_sec ComputeBackendService#affinity_cookie_ttl_sec} */ readonly affinityCookieTtlSec?: number; /** * Compress text responses using Brotli or gzip compression, based on the client's Accept-Encoding header. Possible values: ["AUTOMATIC", "DISABLED"] * * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/6.36.0/docs/resources/compute_backend_service#compression_mode ComputeBackendService#compression_mode} */ readonly compressionMode?: string; /** * Time for which instance will be drained (not accept new * connections, but still work to finish started). * * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/6.36.0/docs/resources/compute_backend_service#connection_draining_timeout_sec ComputeBackendService#connection_draining_timeout_sec} */ readonly connectionDrainingTimeoutSec?: number; /** * Headers that the HTTP/S load balancer should add to proxied * requests. * * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/6.36.0/docs/resources/compute_backend_service#custom_request_headers ComputeBackendService#custom_request_headers} */ readonly customRequestHeaders?: string[]; /** * Headers that the HTTP/S load balancer should add to proxied * responses. * * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/6.36.0/docs/resources/compute_backend_service#custom_response_headers ComputeBackendService#custom_response_headers} */ readonly customResponseHeaders?: string[]; /** * An optional description of this resource. * * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/6.36.0/docs/resources/compute_backend_service#description ComputeBackendService#description} */ readonly description?: string; /** * The resource URL for the edge security policy associated with this backend service. * * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/6.36.0/docs/resources/compute_backend_service#edge_security_policy ComputeBackendService#edge_security_policy} */ readonly edgeSecurityPolicy?: string; /** * If true, enable Cloud CDN for this BackendService. * * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/6.36.0/docs/resources/compute_backend_service#enable_cdn ComputeBackendService#enable_cdn} */ readonly enableCdn?: boolean | cdktf.IResolvable; /** * Specifies the canary migration state. Possible values are PREPARE, TEST_BY_PERCENTAGE, and * TEST_ALL_TRAFFIC. * * To begin the migration from EXTERNAL to EXTERNAL_MANAGED, the state must be changed to * PREPARE. The state must be changed to TEST_ALL_TRAFFIC before the loadBalancingScheme can be * changed to EXTERNAL_MANAGED. Optionally, the TEST_BY_PERCENTAGE state can be used to migrate * traffic by percentage using externalManagedMigrationTestingPercentage. * * Rolling back a migration requires the states to be set in reverse order. So changing the * scheme from EXTERNAL_MANAGED to EXTERNAL requires the state to be set to TEST_ALL_TRAFFIC at * the same time. Optionally, the TEST_BY_PERCENTAGE state can be used to migrate some traffic * back to EXTERNAL or PREPARE can be used to migrate all traffic back to EXTERNAL. Possible values: ["PREPARE", "TEST_BY_PERCENTAGE", "TEST_ALL_TRAFFIC"] * * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/6.36.0/docs/resources/compute_backend_service#external_managed_migration_state ComputeBackendService#external_managed_migration_state} */ readonly externalManagedMigrationState?: string; /** * Determines the fraction of requests that should be processed by the Global external * Application Load Balancer. * * The value of this field must be in the range [0, 100]. * * Session affinity options will slightly affect this routing behavior, for more details, * see: Session Affinity. * * This value can only be set if the loadBalancingScheme in the backend service is set to * EXTERNAL (when using the Classic ALB) and the migration state is TEST_BY_PERCENTAGE. * * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/6.36.0/docs/resources/compute_backend_service#external_managed_migration_testing_percentage ComputeBackendService#external_managed_migration_testing_percentage} */ readonly externalManagedMigrationTestingPercentage?: number; /** * The set of URLs to the HttpHealthCheck or HttpsHealthCheck resource * for health checking this BackendService. Currently at most one health * check can be specified. * * A health check must be specified unless the backend service uses an internet * or serverless NEG as a backend. * * For internal load balancing, a URL to a HealthCheck resource must be specified instead. * * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/6.36.0/docs/resources/compute_backend_service#health_checks ComputeBackendService#health_checks} */ readonly healthChecks?: string[]; /** * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/6.36.0/docs/resources/compute_backend_service#id ComputeBackendService#id} * * Please be aware that the id field is automatically added to all resources in Terraform providers using a Terraform provider SDK version below 2. * If you experience problems setting this value it might not be settable. Please take a look at the provider documentation to ensure it should be settable. */ readonly id?: string; /** * Specifies preference of traffic to the backend (from the proxy and from the client for proxyless gRPC). Possible values: ["IPV4_ONLY", "PREFER_IPV6", "IPV6_ONLY"] * * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/6.36.0/docs/resources/compute_backend_service#ip_address_selection_policy ComputeBackendService#ip_address_selection_policy} */ readonly ipAddressSelectionPolicy?: string; /** * Indicates whether the backend service will be used with internal or * external load balancing. A backend service created for one type of * load balancing cannot be used with the other. For more information, refer to * [Choosing a load balancer](https://cloud.google.com/load-balancing/docs/backend-service). Default value: "EXTERNAL" Possible values: ["EXTERNAL", "INTERNAL_SELF_MANAGED", "INTERNAL_MANAGED", "EXTERNAL_MANAGED"] * * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/6.36.0/docs/resources/compute_backend_service#load_balancing_scheme ComputeBackendService#load_balancing_scheme} */ readonly loadBalancingScheme?: string; /** * The load balancing algorithm used within the scope of the locality. * The possible values are: * * * 'ROUND_ROBIN': This is a simple policy in which each healthy backend * is selected in round robin order. * * * 'LEAST_REQUEST': An O(1) algorithm which selects two random healthy * hosts and picks the host which has fewer active requests. * * * 'RING_HASH': The ring/modulo hash load balancer implements consistent * hashing to backends. The algorithm has the property that the * addition/removal of a host from a set of N hosts only affects * 1/N of the requests. * * * 'RANDOM': The load balancer selects a random healthy host. * * * 'ORIGINAL_DESTINATION': Backend host is selected based on the client * connection metadata, i.e., connections are opened * to the same address as the destination address of * the incoming connection before the connection * was redirected to the load balancer. * * * 'MAGLEV': used as a drop in replacement for the ring hash load balancer. * Maglev is not as stable as ring hash but has faster table lookup * build times and host selection times. For more information about * Maglev, refer to https://ai.google/research/pubs/pub44824 * * * 'WEIGHTED_MAGLEV': Per-instance weighted Load Balancing via health check * reported weights. Only applicable to loadBalancingScheme * EXTERNAL. If set, the Backend Service must * configure a non legacy HTTP-based Health Check, and * health check replies are expected to contain * non-standard HTTP response header field * X-Load-Balancing-Endpoint-Weight to specify the * per-instance weights. If set, Load Balancing is weight * based on the per-instance weights reported in the last * processed health check replies, as long as every * instance either reported a valid weight or had * UNAVAILABLE_WEIGHT. Otherwise, Load Balancing remains * equal-weight. * * * 'WEIGHTED_ROUND_ROBIN': Per-endpoint weighted round-robin Load Balancing using weights computed * from Backend reported Custom Metrics. If set, the Backend Service * responses are expected to contain non-standard HTTP response header field * X-Endpoint-Load-Metrics. The reported metrics * to use for computing the weights are specified via the * backends[].customMetrics fields. * * locality_lb_policy is applicable to either: * * * A regional backend service with the service_protocol set to HTTP, HTTPS, HTTP2 or H2C, * and loadBalancingScheme set to INTERNAL_MANAGED. * * A global backend service with the load_balancing_scheme set to INTERNAL_SELF_MANAGED. * * A regional backend service with loadBalancingScheme set to EXTERNAL (External Network * Load Balancing). Only MAGLEV and WEIGHTED_MAGLEV values are possible for External * Network Load Balancing. The default is MAGLEV. * * If session_affinity is not NONE, and locality_lb_policy is not set to MAGLEV, WEIGHTED_MAGLEV, * or RING_HASH, session affinity settings will not take effect. * * Only ROUND_ROBIN and RING_HASH are supported when the backend service is referenced * by a URL map that is bound to target gRPC proxy that has validate_for_proxyless * field set to true. Possible values: ["ROUND_ROBIN", "LEAST_REQUEST", "RING_HASH", "RANDOM", "ORIGINAL_DESTINATION", "MAGLEV", "WEIGHTED_MAGLEV", "WEIGHTED_ROUND_ROBIN"] * * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/6.36.0/docs/resources/compute_backend_service#locality_lb_policy ComputeBackendService#locality_lb_policy} */ readonly localityLbPolicy?: string; /** * 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]([-a-z0-9]*[a-z0-9])?' 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. * * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/6.36.0/docs/resources/compute_backend_service#name ComputeBackendService#name} */ readonly name: string; /** * Name of backend port. The same name should appear in the instance * groups referenced by this service. Required when the load balancing * scheme is EXTERNAL. * * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/6.36.0/docs/resources/compute_backend_service#port_name ComputeBackendService#port_name} */ readonly portName?: string; /** * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/6.36.0/docs/resources/compute_backend_service#project ComputeBackendService#project} */ readonly project?: string; /** * The protocol this BackendService uses to communicate with backends. * The default is HTTP. Possible values are HTTP, HTTPS, HTTP2, H2C, TCP, SSL, UDP * or GRPC. Refer to the documentation for the load balancers or for Traffic Director * for more information. Must be set to GRPC when the backend service is referenced * by a URL map that is bound to target gRPC proxy. Possible values: ["HTTP", "HTTPS", "HTTP2", "TCP", "SSL", "UDP", "GRPC", "UNSPECIFIED", "H2C"] * * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/6.36.0/docs/resources/compute_backend_service#protocol ComputeBackendService#protocol} */ readonly protocol?: string; /** * The security policy associated with this backend service. * * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/6.36.0/docs/resources/compute_backend_service#security_policy ComputeBackendService#security_policy} */ readonly securityPolicy?: string; /** * URL to networkservices.ServiceLbPolicy resource. * Can only be set if load balancing scheme is EXTERNAL, EXTERNAL_MANAGED, INTERNAL_MANAGED or INTERNAL_SELF_MANAGED and the scope is global. * * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/6.36.0/docs/resources/compute_backend_service#service_lb_policy ComputeBackendService#service_lb_policy} */ readonly serviceLbPolicy?: string; /** * Type of session affinity to use. The default is NONE. Session affinity is * not applicable if the protocol is UDP. Possible values: ["NONE", "CLIENT_IP", "CLIENT_IP_PORT_PROTO", "CLIENT_IP_PROTO", "GENERATED_COOKIE", "HEADER_FIELD", "HTTP_COOKIE", "STRONG_COOKIE_AFFINITY"] * * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/6.36.0/docs/resources/compute_backend_service#session_affinity ComputeBackendService#session_affinity} */ readonly sessionAffinity?: string; /** * The backend service timeout has a different meaning depending on the type of load balancer. * For more information see, [Backend service settings](https://cloud.google.com/compute/docs/reference/rest/v1/backendServices). * The default is 30 seconds. * The full range of timeout values allowed goes from 1 through 2,147,483,647 seconds. * * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/6.36.0/docs/resources/compute_backend_service#timeout_sec ComputeBackendService#timeout_sec} */ readonly timeoutSec?: number; /** * backend block * * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/6.36.0/docs/resources/compute_backend_service#backend ComputeBackendService#backend} */ readonly backend?: ComputeBackendServiceBackend[] | cdktf.IResolvable; /** * cdn_policy block * * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/6.36.0/docs/resources/compute_backend_service#cdn_policy ComputeBackendService#cdn_policy} */ readonly cdnPolicy?: ComputeBackendServiceCdnPolicy; /** * circuit_breakers block * * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/6.36.0/docs/resources/compute_backend_service#circuit_breakers ComputeBackendService#circuit_breakers} */ readonly circuitBreakers?: ComputeBackendServiceCircuitBreakers; /** * consistent_hash block * * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/6.36.0/docs/resources/compute_backend_service#consistent_hash ComputeBackendService#consistent_hash} */ readonly consistentHash?: ComputeBackendServiceConsistentHash; /** * custom_metrics block * * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/6.36.0/docs/resources/compute_backend_service#custom_metrics ComputeBackendService#custom_metrics} */ readonly customMetrics?: ComputeBackendServiceCustomMetrics[] | cdktf.IResolvable; /** * iap block * * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/6.36.0/docs/resources/compute_backend_service#iap ComputeBackendService#iap} */ readonly iap?: ComputeBackendServiceIap; /** * locality_lb_policies block * * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/6.36.0/docs/resources/compute_backend_service#locality_lb_policies ComputeBackendService#locality_lb_policies} */ readonly localityLbPolicies?: ComputeBackendServiceLocalityLbPolicies[] | cdktf.IResolvable; /** * log_config block * * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/6.36.0/docs/resources/compute_backend_service#log_config ComputeBackendService#log_config} */ readonly logConfig?: ComputeBackendServiceLogConfig; /** * max_stream_duration block * * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/6.36.0/docs/resources/compute_backend_service#max_stream_duration ComputeBackendService#max_stream_duration} */ readonly maxStreamDuration?: ComputeBackendServiceMaxStreamDuration; /** * outlier_detection block * * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/6.36.0/docs/resources/compute_backend_service#outlier_detection ComputeBackendService#outlier_detection} */ readonly outlierDetection?: ComputeBackendServiceOutlierDetection; /** * security_settings block * * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/6.36.0/docs/resources/compute_backend_service#security_settings ComputeBackendService#security_settings} */ readonly securitySettings?: ComputeBackendServiceSecuritySettings; /** * strong_session_affinity_cookie block * * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/6.36.0/docs/resources/compute_backend_service#strong_session_affinity_cookie ComputeBackendService#strong_session_affinity_cookie} */ readonly strongSessionAffinityCookie?: ComputeBackendServiceStrongSessionAffinityCookie; /** * timeouts block * * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/6.36.0/docs/resources/compute_backend_service#timeouts ComputeBackendService#timeouts} */ readonly timeouts?: ComputeBackendServiceTimeouts; } export interface ComputeBackendServiceBackendCustomMetrics { /** * If true, the metric data is collected and reported to Cloud * Monitoring, but is not used for load balancing. * * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/6.36.0/docs/resources/compute_backend_service#dry_run ComputeBackendService#dry_run} */ readonly dryRun: boolean | cdktf.IResolvable; /** * Optional parameter to define a target utilization for the Custom Metrics * balancing mode. The valid range is <code>[0.0, 1.0]</code>. * * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/6.36.0/docs/resources/compute_backend_service#max_utilization ComputeBackendService#max_utilization} */ readonly maxUtilization?: number; /** * Name of a custom utilization signal. The name must be 1-64 characters * long and match the regular expression [a-z]([-_.a-z0-9]*[a-z0-9])? which * means the first character must be a lowercase letter, and all following * characters must be a dash, period, underscore, lowercase letter, or * digit, except the last character, which cannot be a dash, period, or * underscore. For usage guidelines, see Custom Metrics balancing mode. This * field can only be used for a global or regional backend service with the * loadBalancingScheme set to <code>EXTERNAL_MANAGED</code>, * <code>INTERNAL_MANAGED</code> <code>INTERNAL_SELF_MANAGED</code>. * * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/6.36.0/docs/resources/compute_backend_service#name ComputeBackendService#name} */ readonly name: string; } export declare function computeBackendServiceBackendCustomMetricsToTerraform(struct?: ComputeBackendServiceBackendCustomMetrics | cdktf.IResolvable): any; export declare function computeBackendServiceBackendCustomMetricsToHclTerraform(struct?: ComputeBackendServiceBackendCustomMetrics | cdktf.IResolvable): any; export declare class ComputeBackendServiceBackendCustomMetricsOutputReference extends cdktf.ComplexObject { private isEmptyObject; private resolvableValue?; /** * @param terraformResource The parent resource * @param terraformAttribute The attribute on the parent resource this class is referencing * @param complexObjectIndex the index of this item in the list * @param complexObjectIsFromSet whether the list is wrapping a set (will add tolist() to be able to access an item via an index) */ constructor(terraformResource: cdktf.IInterpolatingParent, terraformAttribute: string, complexObjectIndex: number, complexObjectIsFromSet: boolean); get internalValue(): ComputeBackendServiceBackendCustomMetrics | cdktf.IResolvable | undefined; set internalValue(value: ComputeBackendServiceBackendCustomMetrics | cdktf.IResolvable | undefined); private _dryRun?; get dryRun(): boolean | cdktf.IResolvable; set dryRun(value: boolean | cdktf.IResolvable); get dryRunInput(): boolean | cdktf.IResolvable | undefined; private _maxUtilization?; get maxUtilization(): number; set maxUtilization(value: number); resetMaxUtilization(): void; get maxUtilizationInput(): number | undefined; private _name?; get name(): string; set name(value: string); get nameInput(): string | undefined; } export declare class ComputeBackendServiceBackendCustomMetricsList extends cdktf.ComplexList { protected terraformResource: cdktf.IInterpolatingParent; protected terraformAttribute: string; protected wrapsSet: boolean; internalValue?: ComputeBackendServiceBackendCustomMetrics[] | cdktf.IResolvable; /** * @param terraformResource The parent resource * @param terraformAttribute The attribute on the parent resource this class is referencing * @param wrapsSet whether the list is wrapping a set (will add tolist() to be able to access an item via an index) */ constructor(terraformResource: cdktf.IInterpolatingParent, terraformAttribute: string, wrapsSet: boolean); /** * @param index the index of the item to return */ get(index: number): ComputeBackendServiceBackendCustomMetricsOutputReference; } export interface ComputeBackendServiceBackend { /** * Specifies the balancing mode for this backend. * * For global HTTP(S) or TCP/SSL load balancing, the default is * UTILIZATION. Valid values are UTILIZATION, RATE (for HTTP(S)), * CUSTOM_METRICS (for HTTP(s)) and CONNECTION (for TCP/SSL). * * See the [Backend Services Overview](https://cloud.google.com/load-balancing/docs/backend-service#balancing-mode) * for an explanation of load balancing modes. Default value: "UTILIZATION" Possible values: ["UTILIZATION", "RATE", "CONNECTION", "CUSTOM_METRICS"] * * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/6.36.0/docs/resources/compute_backend_service#balancing_mode ComputeBackendService#balancing_mode} */ readonly balancingMode?: string; /** * A multiplier applied to the group's maximum servicing capacity * (based on UTILIZATION, RATE or CONNECTION). * * Default value is 1, which means the group will serve up to 100% * of its configured capacity (depending on balancingMode). A * setting of 0 means the group is completely drained, offering * 0% of its available Capacity. Valid range is [0.0,1.0]. * * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/6.36.0/docs/resources/compute_backend_service#capacity_scaler ComputeBackendService#capacity_scaler} */ readonly capacityScaler?: number; /** * An optional description of this resource. * Provide this property when you create the resource. * * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/6.36.0/docs/resources/compute_backend_service#description ComputeBackendService#description} */ readonly description?: string; /** * The fully-qualified URL of an Instance Group or Network Endpoint * Group resource. In case of instance group this defines the list * of instances that serve traffic. Member virtual machine * instances from each instance group must live in the same zone as * the instance group itself. No two backends in a backend service * are allowed to use same Instance Group resource. * * For Network Endpoint Groups this defines list of endpoints. All * endpoints of Network Endpoint Group must be hosted on instances * located in the same zone as the Network Endpoint Group. * * Backend services cannot mix Instance Group and * Network Endpoint Group backends. * * Note that you must specify an Instance Group or Network Endpoint * Group resource using the fully-qualified URL, rather than a * partial URL. * * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/6.36.0/docs/resources/compute_backend_service#group ComputeBackendService#group} */ readonly group: string; /** * The max number of simultaneous connections for the group. Can * be used with either CONNECTION or UTILIZATION balancing modes. * * For CONNECTION mode, either maxConnections or one * of maxConnectionsPerInstance or maxConnectionsPerEndpoint, * as appropriate for group type, must be set. * * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/6.36.0/docs/resources/compute_backend_service#max_connections ComputeBackendService#max_connections} */ readonly maxConnections?: number; /** * The max number of simultaneous connections that a single backend * network endpoint can handle. This is used to calculate the * capacity of the group. Can be used in either CONNECTION or * UTILIZATION balancing modes. * * For CONNECTION mode, either * maxConnections or maxConnectionsPerEndpoint must be set. * * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/6.36.0/docs/resources/compute_backend_service#max_connections_per_endpoint ComputeBackendService#max_connections_per_endpoint} */ readonly maxConnectionsPerEndpoint?: number; /** * The max number of simultaneous connections that a single * backend instance can handle. This is used to calculate the * capacity of the group. Can be used in either CONNECTION or * UTILIZATION balancing modes. * * For CONNECTION mode, either maxConnections or * maxConnectionsPerInstance must be set. * * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/6.36.0/docs/resources/compute_backend_service#max_connections_per_instance ComputeBackendService#max_connections_per_instance} */ readonly maxConnectionsPerInstance?: number; /** * The max requests per second (RPS) of the group. * * Can be used with either RATE or UTILIZATION balancing modes, * but required if RATE mode. For RATE mode, either maxRate or one * of maxRatePerInstance or maxRatePerEndpoint, as appropriate for * group type, must be set. * * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/6.36.0/docs/resources/compute_backend_service#max_rate ComputeBackendService#max_rate} */ readonly maxRate?: number; /** * The max requests per second (RPS) that a single backend network * endpoint can handle. This is used to calculate the capacity of * the group. Can be used in either balancing mode. For RATE mode, * either maxRate or maxRatePerEndpoint must be set. * * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/6.36.0/docs/resources/compute_backend_service#max_rate_per_endpoint ComputeBackendService#max_rate_per_endpoint} */ readonly maxRatePerEndpoint?: number; /** * The max requests per second (RPS) that a single backend * instance can handle. This is used to calculate the capacity of * the group. Can be used in either balancing mode. For RATE mode, * either maxRate or maxRatePerInstance must be set. * * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/6.36.0/docs/resources/compute_backend_service#max_rate_per_instance ComputeBackendService#max_rate_per_instance} */ readonly maxRatePerInstance?: number; /** * Used when balancingMode is UTILIZATION. This ratio defines the * CPU utilization target for the group. Valid range is [0.0, 1.0]. * * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/6.36.0/docs/resources/compute_backend_service#max_utilization ComputeBackendService#max_utilization} */ readonly maxUtilization?: number; /** * This field indicates whether this backend should be fully utilized before sending traffic to backends * with default preference. This field cannot be set when loadBalancingScheme is set to 'EXTERNAL'. The possible values are: * - PREFERRED: Backends with this preference level will be filled up to their capacity limits first, * based on RTT. * - DEFAULT: If preferred backends don't have enough capacity, backends in this layer would be used and * traffic would be assigned based on the load balancing algorithm you use. This is the default Possible values: ["PREFERRED", "DEFAULT"] * * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/6.36.0/docs/resources/compute_backend_service#preference ComputeBackendService#preference} */ readonly preference?: string; /** * custom_metrics block * * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/6.36.0/docs/resources/compute_backend_service#custom_metrics ComputeBackendService#custom_metrics} */ readonly customMetrics?: ComputeBackendServiceBackendCustomMetrics[] | cdktf.IResolvable; } export declare function computeBackendServiceBackendToTerraform(struct?: ComputeBackendServiceBackend | cdktf.IResolvable): any; export declare function computeBackendServiceBackendToHclTerraform(struct?: ComputeBackendServiceBackend | cdktf.IResolvable): any; export declare class ComputeBackendServiceBackendOutputReference extends cdktf.ComplexObject { private isEmptyObject; private resolvableValue?; /** * @param terraformResource The parent resource * @param terraformAttribute The attribute on the parent resource this class is referencing * @param complexObjectIndex the index of this item in the list * @param complexObjectIsFromSet whether the list is wrapping a set (will add tolist() to be able to access an item via an index) */ constructor(terraformResource: cdktf.IInterpolatingParent, terraformAttribute: string, complexObjectIndex: number, complexObjectIsFromSet: boolean); get internalValue(): ComputeBackendServiceBackend | cdktf.IResolvable | undefined; set internalValue(value: ComputeBackendServiceBackend | cdktf.IResolvable | undefined); private _balancingMode?; get balancingMode(): string; set balancingMode(value: string); resetBalancingMode(): void; get balancingModeInput(): string | undefined; private _capacityScaler?; get capacityScaler(): number; set capacityScaler(value: number); resetCapacityScaler(): void; get capacityScalerInput(): number | undefined; private _description?; get description(): string; set description(value: string); resetDescription(): void; get descriptionInput(): string | undefined; private _group?; get group(): string; set group(value: string); get groupInput(): string | undefined; private _maxConnections?; get maxConnections(): number; set maxConnections(value: number); resetMaxConnections(): void; get maxConnectionsInput(): number | undefined; private _maxConnectionsPerEndpoint?; get maxConnectionsPerEndpoint(): number; set maxConnectionsPerEndpoint(value: number); resetMaxConnectionsPerEndpoint(): void; get maxConnectionsPerEndpointInput(): number | undefined; private _maxConnectionsPerInstance?; get maxConnectionsPerInstance(): number; set maxConnectionsPerInstance(value: number); resetMaxConnectionsPerInstance(): void; get maxConnectionsPerInstanceInput(): number | undefined; private _maxRate?; get maxRate(): number; set maxRate(value: number); resetMaxRate(): void; get maxRateInput(): number | undefined; private _maxRatePerEndpoint?; get maxRatePerEndpoint(): number; set maxRatePerEndpoint(value: number); resetMaxRatePerEndpoint(): void; get maxRatePerEndpointInput(): number | undefined; private _maxRatePerInstance?; get maxRatePerInstance(): number; set maxRatePerInstance(value: number); resetMaxRatePerInstance(): void; get maxRatePerInstanceInput(): number | undefined; private _maxUtilization?; get maxUtilization(): number; set maxUtilization(value: number); resetMaxUtilization(): void; get maxUtilizationInput(): number | undefined; private _preference?; get preference(): string; set preference(value: string); resetPreference(): void; get preferenceInput(): string | undefined; private _customMetrics; get customMetrics(): ComputeBackendServiceBackendCustomMetricsList; putCustomMetrics(value: ComputeBackendServiceBackendCustomMetrics[] | cdktf.IResolvable): void; resetCustomMetrics(): void; get customMetricsInput(): cdktf.IResolvable | ComputeBackendServiceBackendCustomMetrics[] | undefined; } export declare class ComputeBackendServiceBackendList extends cdktf.ComplexList { protected terraformResource: cdktf.IInterpolatingParent; protected terraformAttribute: string; protected wrapsSet: boolean; internalValue?: ComputeBackendServiceBackend[] | cdktf.IResolvable; /** * @param terraformResource The parent resource * @param terraformAttribute The attribute on the parent resource this class is referencing * @param wrapsSet whether the list is wrapping a set (will add tolist() to be able to access an item via an index) */ constructor(terraformResource: cdktf.IInterpolatingParent, terraformAttribute: string, wrapsSet: boolean); /** * @param index the index of the item to return */ get(index: number): ComputeBackendServiceBackendOutputReference; } export interface ComputeBackendServiceCdnPolicyBypassCacheOnRequestHeaders { /** * The header field name to match on when bypassing cache. Values are case-insensitive. * * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/6.36.0/docs/resources/compute_backend_service#header_name ComputeBackendService#header_name} */ readonly headerName: string; } export declare function computeBackendServiceCdnPolicyBypassCacheOnRequestHeadersToTerraform(struct?: ComputeBackendServiceCdnPolicyBypassCacheOnRequestHeaders | cdktf.IResolvable): any; export declare function computeBackendServiceCdnPolicyBypassCacheOnRequestHeadersToHclTerraform(struct?: ComputeBackendServiceCdnPolicyBypassCacheOnRequestHeaders | cdktf.IResolvable): any; export declare class ComputeBackendServiceCdnPolicyBypassCacheOnRequestHeadersOutputReference extends cdktf.ComplexObject { private isEmptyObject; private resolvableValue?; /** * @param terraformResource The parent resource * @param terraformAttribute The attribute on the parent resource this class is referencing * @param complexObjectIndex the index of this item in the list * @param complexObjectIsFromSet whether the list is wrapping a set (will add tolist() to be able to access an item via an index) */ constructor(terraformResource: cdktf.IInterpolatingParent, terraformAttribute: string, complexObjectIndex: number, complexObjectIsFromSet: boolean); get internalValue(): ComputeBackendServiceCdnPolicyBypassCacheOnRequestHeaders | cdktf.IResolvable | undefined; set internalValue(value: ComputeBackendServiceCdnPolicyBypassCacheOnRequestHeaders | cdktf.IResolvable | undefined); private _headerName?; get headerName(): string; set headerName(value: string); get headerNameInput(): string | undefined; } export declare class ComputeBackendServiceCdnPolicyBypassCacheOnRequestHeadersList extends cdktf.ComplexList { protected terraformResource: cdktf.IInterpolatingParent; protected terraformAttribute: string; protected wrapsSet: boolean; internalValue?: ComputeBackendServiceCdnPolicyBypassCacheOnRequestHeaders[] | cdktf.IResolvable; /** * @param terraformResource The parent resource * @param terraformAttribute The attribute on the parent resource this class is referencing * @param wrapsSet whether the list is wrapping a set (will add tolist() to be able to access an item via an index) */ constructor(terraformResource: cdktf.IInterpolatingParent, terraformAttribute: string, wrapsSet: boolean); /** * @param index the index of the item to return */ get(index: number): ComputeBackendServiceCdnPolicyBypassCacheOnRequestHeadersOutputReference; } export interface ComputeBackendServiceCdnPolicyCacheKeyPolicy { /** * If true requests to different hosts will be cached separately. * * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/6.36.0/docs/resources/compute_backend_service#include_host ComputeBackendService#include_host} */ readonly includeHost?: boolean | cdktf.IResolvable; /** * Allows HTTP request headers (by name) to be used in the * cache key. * * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/6.36.0/docs/resources/compute_backend_service#include_http_headers ComputeBackendService#include_http_headers} */ readonly includeHttpHeaders?: string[]; /** * Names of cookies to include in cache keys. * * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/6.36.0/docs/resources/compute_backend_service#include_named_cookies ComputeBackendService#include_named_cookies} */ readonly includeNamedCookies?: string[]; /** * If true, http and https requests will be cached separately. * * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/6.36.0/docs/resources/compute_backend_service#include_protocol ComputeBackendService#include_protocol} */ readonly includeProtocol?: boolean | cdktf.IResolvable; /** * If true, include query string parameters in the cache key * according to query_string_whitelist and * query_string_blacklist. If neither is set, the entire query * string will be included. * * If false, the query string will be excluded from the cache * key entirely. * * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/6.36.0/docs/resources/compute_backend_service#include_query_string ComputeBackendService#include_query_string} */ readonly includeQueryString?: boolean | cdktf.IResolvable; /** * Names of query string parameters to exclude in cache keys. * * All other parameters will be included. Either specify * query_string_whitelist or query_string_blacklist, not both. * '&' and '=' will be percent encoded and not treated as * delimiters. * * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/6.36.0/docs/resources/compute_backend_service#query_string_blacklist ComputeBackendService#query_string_blacklist} */ readonly queryStringBlacklist?: string[]; /** * Names of query string parameters to include in cache keys. * * All other parameters will be excluded. Either specify * query_string_whitelist or query_string_blacklist, not both. * '&' and '=' will be percent encoded and not treated as * delimiters. * * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/6.36.0/docs/resources/compute_backend_service#query_string_whitelist ComputeBackendService#query_string_whitelist} */ readonly queryStringWhitelist?: string[]; } export declare function computeBackendServiceCdnPolicyCacheKeyPolicyToTerraform(struct?: ComputeBackendServiceCdnPolicyCacheKeyPolicyOutputReference | ComputeBackendServiceCdnPolicyCacheKeyPolicy): any; export declare function computeBackendServiceCdnPolicyCacheKeyPolicyToHclTerraform(struct?: ComputeBackendServiceCdnPolicyCacheKeyPolicyOutputReference | ComputeBackendServiceCdnPolicyCacheKeyPolicy): any; export declare class ComputeBackendServiceCdnPolicyCacheKeyPolicyOutputReference extends cdktf.ComplexObject { private isEmptyObject; /** * @param terraformResource The parent resource * @param terraformAttribute The attribute on the parent resource this class is referencing */ constructor(terraformResource: cdktf.IInterpolatingParent, terraformAttribute: string); get internalValue(): ComputeBackendServiceCdnPolicyCacheKeyPolicy | undefined; set internalValue(value: ComputeBackendServiceCdnPolicyCacheKeyPolicy | undefined); private _includeHost?; get includeHost(): boolean | cdktf.IResolvable; set includeHost(value: boolean | cdktf.IResolvable); resetIncludeHost(): void; get includeHostInput(): boolean | cdktf.IResolvable | undefined; private _includeHttpHeaders?; get includeHttpHeaders(): string[]; set includeHttpHeaders(value: string[]); resetIncludeHttpHeaders(): void; get includeHttpHeadersInput(): string[] | undefined; private _includeNamedCookies?; get includeNamedCookies(): string[]; set includeNamedCookies(value: string[]); resetIncludeNamedCookies(): void; get includeNamedCookiesInput(): string[] | undefined; private _includeProtocol?; get includeProtocol(): boolean | cdktf.IResolvable; set includeProtocol(value: boolean | cdktf.IResolvable); resetIncludeProtocol(): void; get includeProtocolInput(): boolean | cdktf.IResolvable | undefined; private _includeQueryString?; get includeQueryString(): boolean | cdktf.IResolvable; set includeQueryString(value: boolean | cdktf.IResolvable); resetIncludeQueryString(): void; get includeQueryStringInput(): boolean | cdktf.IResolvable | undefined; private _queryStringBlacklist?; get queryStringBlacklist(): string[]; set queryStringBlacklist(value: string[]); resetQueryStringBlacklist(): void; get queryStringBlacklistInput(): string[] | undefined; private _queryStringWhitelist?; get queryStringWhitelist(): string[]; set queryStringWhitelist(value: string[]); resetQueryStringWhitelist(): void; get queryStringWhitelistInput(): string[] | undefined; } export interface ComputeBackendServiceCdnPolicyNegativeCachingPolicy { /** * The HTTP status code to define a TTL against. Only HTTP status codes 300, 301, 308, 404, 405, 410, 421, 451 and 501 * can be specified as values, and you cannot specify a status code more than once. * * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/6.36.0/docs/resources/compute_backend_service#code ComputeBackendService#code} */ readonly code?: number; /** * The TTL (in seconds) for which to cache responses with the corresponding status code. The maximum allowed value is 1800s * (30 minutes), noting that infrequently accessed objects may be evicted from the cache before the defined TTL. * * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/6.36.0/docs/resources/compute_backend_service#ttl ComputeBackendService#ttl} */ readonly ttl?: number; } export declare function computeBackendServiceCdnPolicyNegativeCachingPolicyToTerraform(struct?: ComputeBackendServiceCdnPolicyNegativeCachingPolicy | cdktf.IResolvable): any; export declare function computeBackendServiceCdnPolicyNegativeCachingPolicyToHclTerraform(struct?: ComputeBackendServiceCdnPolicyNegativeCachingPolicy | cdktf.IResolvable): any; export declare class ComputeBackendServiceCdnPolicyNegativeCachingPolicyOutputReference extends cdktf.ComplexObject { private isEmptyObject; private resolvableValue?; /** * @param terraformResource The parent resource * @param terraformAttribute The attribute on the parent resource this class is referencing * @param complexObjectIndex the index of this item in the list * @param complexObjectIsFromSet whether the list is wrapping a set (will add tolist() to be able to access an item via an index) */ constructor(terraformResource: cdktf.IInterpolatingParent, terraformAttribute: string, complexObjectIndex: number, complexObjectIsFromSet: boolean); get internalValue(): ComputeBackendServiceCdnPolicyNegativeCachingPolicy | cdktf.IResolvable | undefined; set internalValue(value: ComputeBackendServiceCdnPolicyNegativeCachingPolicy | cdktf.IResolvable | undefined); private _code?; get code(): number; set code(value: number); resetCode(): void; get codeInput(): number | undefined; private _ttl?; get ttl(): number; set ttl(value: number); resetTtl(): void; get ttlInput(): number | undefined; } export declare class ComputeBackendServiceCdnPolicyNegativeCachingPolicyList extends cdktf.ComplexList { protected terraformResource: cdktf.IInterpolatingParent; protected terraformAttribute: string; protected wrapsSet: boolean; internalValue?: ComputeBackendServiceCdnPolicyNegativeCachingPolicy[] | cdktf.IResolvable; /** * @param terraformResource The parent resource * @param terraformAttribute The attribute on the parent resource this class is referencing * @param wrapsSet whether the list is wrapping a set (will add tolist() to be able to access an item via an index) */ constructor(terraformResource: cdktf.IInterpolatingParent, terraformAttribute: string, wrapsSet: boolean); /** * @param index the index of the item to return */ get(index: number): ComputeBackendServiceCdnPolicyNegativeCachingPolicyOutputReference; } export interface ComputeBackendServiceCdnPolicy { /** * Specifies the cache setting for all responses from this backend. * The possible values are: USE_ORIGIN_HEADERS, FORCE_CACHE_ALL and CACHE_ALL_STATIC Possible values: ["USE_ORIGIN_HEADERS", "FORCE_CACHE_ALL", "CACHE_ALL_STATIC"] * * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/6.36.0/docs/resources/compute_backend_service#cache_mode ComputeBackendService#cache_mode} */ readonly cacheMode?: string; /** * Specifies the maximum allowed TTL for cached content served by this origin. * * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/6.36.0/docs/resources/compute_backend_service#client_ttl ComputeBackendService#client_ttl} */ readonly clientTtl?: number; /** * Specifies the default TTL for cached content served by this origin for responses * that do not