import * as core from "@terrascript/core"; export interface StickinessArgs extends core.SchemaArgs { cookieDuration?: number | core.NumberOut; cookieName?: string | core.StringOut; enabled?: boolean | core.BooleanOut; type: string | core.StringOut; } export class Stickiness extends core.Schema { @core.attr(Number) public cookieDuration?: number | core.NumberOut; @core.attr(String) public cookieName?: string | core.StringOut; @core.attr(Boolean) public enabled?: boolean | core.BooleanOut; @core.attr(String) public type!: string | core.StringOut; } export interface HealthCheckArgs extends core.SchemaArgs { enabled?: boolean | core.BooleanOut; healthyThreshold?: number | core.NumberOut; interval?: number | core.NumberOut; matcher?: string | core.StringOut; path?: string | core.StringOut; port?: string | core.StringOut; protocol?: string | core.StringOut; timeout?: number | core.NumberOut; unhealthyThreshold?: number | core.NumberOut; } export class HealthCheck extends core.Schema { @core.attr(Boolean) public enabled?: boolean | core.BooleanOut; @core.attr(Number) public healthyThreshold?: number | core.NumberOut; @core.attr(Number) public interval?: number | core.NumberOut; @core.attr(String, { computed: true }) public matcher?: string | core.StringOut; @core.attr(String, { computed: true }) public path?: string | core.StringOut; @core.attr(String) public port?: string | core.StringOut; @core.attr(String) public protocol?: string | core.StringOut; @core.attr(Number, { computed: true }) public timeout?: number | core.NumberOut; @core.attr(Number) public unhealthyThreshold?: number | core.NumberOut; } export interface LbTargetGroupArgs extends core.ResourceArgs { /** * (Optional) Whether to terminate connections at the end of the deregistration timeout on Network Load * Balancers. See [doc](https://docs.aws.amazon.com/elasticloadbalancing/latest/network/load-balancer- * target-groups.html#deregistration-delay) for more information. Default is `false`. */ connectionTermination?: boolean | core.BooleanOut; /** * (Optional) Amount time for Elastic Load Balancing to wait before changing the state of a deregisteri * ng target from draining to unused. The range is 0-3600 seconds. The default value is 300 seconds. */ deregistrationDelay?: string | core.StringOut; /** * (Optional, Maximum of 1) Health Check configuration block. Detailed below. */ healthCheck?: HealthCheck; ipAddressType?: string | core.StringOut; /** * (Optional) Whether the request and response headers exchanged between the load balancer and the Lamb * da function include arrays of values or strings. Only applies when `target_type` is `lambda`. Defaul * t is `false`. */ lambdaMultiValueHeadersEnabled?: boolean | core.BooleanOut; /** * (Optional) Determines how the load balancer selects targets when routing requests. Only applicable f * or Application Load Balancer Target Groups. The value is `round_robin` or `least_outstanding_request * s`. The default is `round_robin`. */ loadBalancingAlgorithmType?: string | core.StringOut; /** * (Optional, Forces new resource) Name of the target group. If omitted, Terraform will assign a random * , unique name. */ name?: string | core.StringOut; /** * (Optional, Forces new resource) Creates a unique name beginning with the specified prefix. Conflicts * with `name`. Cannot be longer than 6 characters. */ namePrefix?: string | core.StringOut; /** * (May be required, Forces new resource) Port on which targets receive traffic, unless overridden when * registering a specific target. Required when `target_type` is `instance`, `ip` or `alb`. Does not a * pply when `target_type` is `lambda`. */ port?: number | core.NumberOut; /** * (Optional) Whether client IP preservation is enabled. See [doc](https://docs.aws.amazon.com/elasticl * oadbalancing/latest/network/load-balancer-target-groups.html#client-ip-preservation) for more inform * ation. */ preserveClientIp?: string | core.StringOut; /** * (May be required, Forces new resource) Protocol to use for routing traffic to the targets. Should be * one of `GENEVE`, `HTTP`, `HTTPS`, `TCP`, `TCP_UDP`, `TLS`, or `UDP`. Required when `target_type` is * instance`, `ip` or `alb`. Does not apply when `target_type` is `lambda`. */ protocol?: string | core.StringOut; /** * (Optional, Forces new resource) Only applicable when `protocol` is `HTTP` or `HTTPS`. The protocol v * ersion. Specify GRPC to send requests to targets using gRPC. Specify HTTP2 to send requests to targe * ts using HTTP/2. The default is HTTP1, which sends requests to targets using HTTP/1.1 */ protocolVersion?: string | core.StringOut; /** * (Optional) Whether to enable support for proxy protocol v2 on Network Load Balancers. See [doc](http * s://docs.aws.amazon.com/elasticloadbalancing/latest/network/load-balancer-target-groups.html#proxy-p * rotocol) for more information. Default is `false`. */ proxyProtocolV2?: boolean | core.BooleanOut; /** * (Optional) Amount time for targets to warm up before the load balancer sends them a full share of re * quests. The range is 30-900 seconds or 0 to disable. The default value is 0 seconds. */ slowStart?: number | core.NumberOut; /** * (Optional, Maximum of 1) Stickiness configuration block. Detailed below. */ stickiness?: Stickiness; /** * (Optional) Map of tags to assign to the resource. If configured with a provider [`default_tags` conf * iguration block](https://registry.terraform.io/providers/hashicorp/aws/latest/docs#default_tags-conf * iguration-block) present, tags with matching keys will overwrite those defined at the provider-level * . */ tags?: core.Map | core.MapOut; /** * A map of tags assigned to the resource, including those inherited from the provider [`default_tags` * configuration block](https://registry.terraform.io/providers/hashicorp/aws/latest/docs#default_tags- * configuration-block). */ tagsAll?: core.Map | core.MapOut; /** * (May be required, Forces new resource) Type of target that you must specify when registering targets * with this target group. See [doc](https://docs.aws.amazon.com/elasticloadbalancing/latest/APIRefere * nce/API_CreateTargetGroup.html) for supported values. The default is `instance`. */ targetType?: string | core.StringOut; /** * (Optional, Forces new resource) Identifier of the VPC in which to create the target group. Required * when `target_type` is `instance`, `ip` or `alb`. Does not apply when `target_type` is `lambda`. */ vpcId?: string | core.StringOut; } export class LbTargetGroup extends core.Resource { /** * ARN of the Target Group (matches `id`). */ @core.attr(String, { computed: true }) public arn!: string | core.StringOut; /** * ARN suffix for use with CloudWatch Metrics. */ @core.attr(String, { computed: true }) public arnSuffix!: string | core.StringOut; /** * (Optional) Whether to terminate connections at the end of the deregistration timeout on Network Load * Balancers. See [doc](https://docs.aws.amazon.com/elasticloadbalancing/latest/network/load-balancer- * target-groups.html#deregistration-delay) for more information. Default is `false`. */ @core.attr(Boolean) public connectionTermination?: boolean | core.BooleanOut; /** * (Optional) Amount time for Elastic Load Balancing to wait before changing the state of a deregisteri * ng target from draining to unused. The range is 0-3600 seconds. The default value is 300 seconds. */ @core.attr(String) public deregistrationDelay?: string | core.StringOut; /** * (Optional, Maximum of 1) Health Check configuration block. Detailed below. */ @core.attr(HealthCheck, { computed: true }) public healthCheck?: HealthCheck; /** * ARN of the Target Group (matches `arn`). */ @core.attr(String, { computed: true }) public id!: string | core.StringOut; @core.attr(String, { computed: true }) public ipAddressType?: string | core.StringOut; /** * (Optional) Whether the request and response headers exchanged between the load balancer and the Lamb * da function include arrays of values or strings. Only applies when `target_type` is `lambda`. Defaul * t is `false`. */ @core.attr(Boolean) public lambdaMultiValueHeadersEnabled?: boolean | core.BooleanOut; /** * (Optional) Determines how the load balancer selects targets when routing requests. Only applicable f * or Application Load Balancer Target Groups. The value is `round_robin` or `least_outstanding_request * s`. The default is `round_robin`. */ @core.attr(String, { computed: true }) public loadBalancingAlgorithmType?: string | core.StringOut; /** * (Optional, Forces new resource) Name of the target group. If omitted, Terraform will assign a random * , unique name. */ @core.attr(String, { computed: true }) public name?: string | core.StringOut; /** * (Optional, Forces new resource) Creates a unique name beginning with the specified prefix. Conflicts * with `name`. Cannot be longer than 6 characters. */ @core.attr(String) public namePrefix?: string | core.StringOut; /** * (May be required, Forces new resource) Port on which targets receive traffic, unless overridden when * registering a specific target. Required when `target_type` is `instance`, `ip` or `alb`. Does not a * pply when `target_type` is `lambda`. */ @core.attr(Number) public port?: number | core.NumberOut; /** * (Optional) Whether client IP preservation is enabled. See [doc](https://docs.aws.amazon.com/elasticl * oadbalancing/latest/network/load-balancer-target-groups.html#client-ip-preservation) for more inform * ation. */ @core.attr(String, { computed: true }) public preserveClientIp?: string | core.StringOut; /** * (May be required, Forces new resource) Protocol to use for routing traffic to the targets. Should be * one of `GENEVE`, `HTTP`, `HTTPS`, `TCP`, `TCP_UDP`, `TLS`, or `UDP`. Required when `target_type` is * instance`, `ip` or `alb`. Does not apply when `target_type` is `lambda`. */ @core.attr(String) public protocol?: string | core.StringOut; /** * (Optional, Forces new resource) Only applicable when `protocol` is `HTTP` or `HTTPS`. The protocol v * ersion. Specify GRPC to send requests to targets using gRPC. Specify HTTP2 to send requests to targe * ts using HTTP/2. The default is HTTP1, which sends requests to targets using HTTP/1.1 */ @core.attr(String, { computed: true }) public protocolVersion?: string | core.StringOut; /** * (Optional) Whether to enable support for proxy protocol v2 on Network Load Balancers. See [doc](http * s://docs.aws.amazon.com/elasticloadbalancing/latest/network/load-balancer-target-groups.html#proxy-p * rotocol) for more information. Default is `false`. */ @core.attr(Boolean) public proxyProtocolV2?: boolean | core.BooleanOut; /** * (Optional) Amount time for targets to warm up before the load balancer sends them a full share of re * quests. The range is 30-900 seconds or 0 to disable. The default value is 0 seconds. */ @core.attr(Number) public slowStart?: number | core.NumberOut; /** * (Optional, Maximum of 1) Stickiness configuration block. Detailed below. */ @core.attr(Stickiness, { computed: true }) public stickiness?: Stickiness; /** * (Optional) Map of tags to assign to the resource. If configured with a provider [`default_tags` conf * iguration block](https://registry.terraform.io/providers/hashicorp/aws/latest/docs#default_tags-conf * iguration-block) present, tags with matching keys will overwrite those defined at the provider-level * . */ @core.attr(String, { kind: "map" }) public tags?: core.Map | core.MapOut; /** * A map of tags assigned to the resource, including those inherited from the provider [`default_tags` * configuration block](https://registry.terraform.io/providers/hashicorp/aws/latest/docs#default_tags- * configuration-block). */ @core.attr(String, { computed: true, kind: "map" }) public tagsAll?: core.Map | core.MapOut; /** * (May be required, Forces new resource) Type of target that you must specify when registering targets * with this target group. See [doc](https://docs.aws.amazon.com/elasticloadbalancing/latest/APIRefere * nce/API_CreateTargetGroup.html) for supported values. The default is `instance`. */ @core.attr(String) public targetType?: string | core.StringOut; /** * (Optional, Forces new resource) Identifier of the VPC in which to create the target group. Required * when `target_type` is `instance`, `ip` or `alb`. Does not apply when `target_type` is `lambda`. */ @core.attr(String) public vpcId?: string | core.StringOut; constructor(name: string, args?: LbTargetGroupArgs) { super(name, "aws_lb_target_group", args); } public override getNamespace(): string { return "aws_elb"; } }