import * as core from "@terrascript/core"; export interface AccessLogsArgs extends core.SchemaArgs { bucket: string | core.StringOut; enabled?: boolean | core.BooleanOut; prefix?: string | core.StringOut; } export class AccessLogs extends core.Schema { @core.attr(String) public bucket!: string | core.StringOut; @core.attr(Boolean) public enabled?: boolean | core.BooleanOut; @core.attr(String) public prefix?: string | core.StringOut; } export interface SubnetMappingArgs extends core.SchemaArgs { allocationId?: string | core.StringOut; ipv6Address?: string | core.StringOut; outpostId: string | core.StringOut; privateIpv4Address?: string | core.StringOut; subnetId: string | core.StringOut; } export class SubnetMapping extends core.Schema { @core.attr(String) public allocationId?: string | core.StringOut; @core.attr(String) public ipv6Address?: string | core.StringOut; @core.attr(String, { computed: true }) public outpostId!: string | core.StringOut; @core.attr(String) public privateIpv4Address?: string | core.StringOut; @core.attr(String) public subnetId!: string | core.StringOut; } export interface LbArgs extends core.ResourceArgs { /** * (Optional) An Access Logs block. Access Logs documented below. */ accessLogs?: AccessLogs; /** * (Optional) The ID of the customer owned ipv4 pool to use for this load balancer. */ customerOwnedIpv4Pool?: string | core.StringOut; /** * (Optional) Determines how the load balancer handles requests that might pose a security risk to an a * pplication due to HTTP desync. Valid values are `monitor`, `defensive` (default), `strictest`. */ desyncMitigationMode?: string | core.StringOut; /** * (Optional) Indicates whether HTTP headers with header fields that are not valid are removed by the l * oad balancer (true) or routed to targets (false). The default is false. Elastic Load Balancing requi * res that message header names contain only alphanumeric characters and hyphens. Only valid for Load * Balancers of type `application`. */ dropInvalidHeaderFields?: boolean | core.BooleanOut; /** * (Optional) If true, cross-zone load balancing of the load balancer will be enabled. */ enableCrossZoneLoadBalancing?: boolean | core.BooleanOut; /** * (Optional) If true, deletion of the load balancer will be disabled via */ enableDeletionProtection?: boolean | core.BooleanOut; /** * (Optional) Indicates whether HTTP/2 is enabled in `application` load balancers. Defaults to `true`. */ enableHttp2?: boolean | core.BooleanOut; /** * (Optional) Indicates whether to allow a WAF-enabled load balancer to route requests to targets if it * is unable to forward the request to AWS WAF. Defaults to `false`. */ enableWafFailOpen?: boolean | core.BooleanOut; /** * (Optional) The time in seconds that the connection is allowed to be idle. Only valid for Load Balanc * ers of type `application`. Default: 60. */ idleTimeout?: number | core.NumberOut; /** * (Optional) If true, the LB will be internal. */ internal?: boolean | core.BooleanOut; /** * (Optional) The type of IP addresses used by the subnets for your load balancer. The possible values * are `ipv4` and `dualstack` */ ipAddressType?: string | core.StringOut; /** * (Optional) The type of load balancer to create. Possible values are `application`, `gateway`, or `ne * twork`. The default value is `application`. */ loadBalancerType?: string | core.StringOut; /** * (Optional) The name of the LB. This name must be unique within your AWS account, can have a maximum * of 32 characters, */ name?: string | core.StringOut; /** * (Optional) Creates a unique name beginning with the specified prefix. Conflicts with `name`. */ namePrefix?: string | core.StringOut; /** * (Optional) Indicates whether the Application Load Balancer should preserve the Host header in the HT * TP request and send it to the target without any change. Defaults to `false`. */ preserveHostHeader?: boolean | core.BooleanOut; /** * (Optional) A list of security group IDs to assign to the LB. Only valid for Load Balancers of type ` * application`. */ securityGroups?: core.Array | core.ArrayOut; /** * (Optional) A subnet mapping block as documented below. */ subnetMapping?: core.Array | core.ArrayOut; /** * (Optional) A list of subnet IDs to attach to the LB. Subnets */ subnets?: core.Array | core.ArrayOut; /** * (Optional) A map of tags to assign to the resource. If configured with a provider [`default_tags` co * nfiguration block](https://registry.terraform.io/providers/hashicorp/aws/latest/docs#default_tags-co * nfiguration-block) present, tags with matching keys will overwrite those defined at the provider-lev * el. */ 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; } export class Lb extends core.Resource { /** * (Optional) An Access Logs block. Access Logs documented below. */ @core.attr(AccessLogs) public accessLogs?: AccessLogs; /** * The ARN of the load balancer (matches `id`). */ @core.attr(String, { computed: true }) public arn!: string | core.StringOut; /** * The ARN suffix for use with CloudWatch Metrics. */ @core.attr(String, { computed: true }) public arnSuffix!: string | core.StringOut; /** * (Optional) The ID of the customer owned ipv4 pool to use for this load balancer. */ @core.attr(String) public customerOwnedIpv4Pool?: string | core.StringOut; /** * (Optional) Determines how the load balancer handles requests that might pose a security risk to an a * pplication due to HTTP desync. Valid values are `monitor`, `defensive` (default), `strictest`. */ @core.attr(String) public desyncMitigationMode?: string | core.StringOut; /** * The DNS name of the load balancer. */ @core.attr(String, { computed: true }) public dnsName!: string | core.StringOut; /** * (Optional) Indicates whether HTTP headers with header fields that are not valid are removed by the l * oad balancer (true) or routed to targets (false). The default is false. Elastic Load Balancing requi * res that message header names contain only alphanumeric characters and hyphens. Only valid for Load * Balancers of type `application`. */ @core.attr(Boolean) public dropInvalidHeaderFields?: boolean | core.BooleanOut; /** * (Optional) If true, cross-zone load balancing of the load balancer will be enabled. */ @core.attr(Boolean) public enableCrossZoneLoadBalancing?: boolean | core.BooleanOut; /** * (Optional) If true, deletion of the load balancer will be disabled via */ @core.attr(Boolean) public enableDeletionProtection?: boolean | core.BooleanOut; /** * (Optional) Indicates whether HTTP/2 is enabled in `application` load balancers. Defaults to `true`. */ @core.attr(Boolean) public enableHttp2?: boolean | core.BooleanOut; /** * (Optional) Indicates whether to allow a WAF-enabled load balancer to route requests to targets if it * is unable to forward the request to AWS WAF. Defaults to `false`. */ @core.attr(Boolean) public enableWafFailOpen?: boolean | core.BooleanOut; /** * The ARN of the load balancer (matches `arn`). */ @core.attr(String, { computed: true }) public id!: string | core.StringOut; /** * (Optional) The time in seconds that the connection is allowed to be idle. Only valid for Load Balanc * ers of type `application`. Default: 60. */ @core.attr(Number) public idleTimeout?: number | core.NumberOut; /** * (Optional) If true, the LB will be internal. */ @core.attr(Boolean, { computed: true }) public internal?: boolean | core.BooleanOut; /** * (Optional) The type of IP addresses used by the subnets for your load balancer. The possible values * are `ipv4` and `dualstack` */ @core.attr(String, { computed: true }) public ipAddressType?: string | core.StringOut; /** * (Optional) The type of load balancer to create. Possible values are `application`, `gateway`, or `ne * twork`. The default value is `application`. */ @core.attr(String) public loadBalancerType?: string | core.StringOut; /** * (Optional) The name of the LB. This name must be unique within your AWS account, can have a maximum * of 32 characters, */ @core.attr(String, { computed: true }) public name?: string | core.StringOut; /** * (Optional) Creates a unique name beginning with the specified prefix. Conflicts with `name`. */ @core.attr(String) public namePrefix?: string | core.StringOut; /** * (Optional) Indicates whether the Application Load Balancer should preserve the Host header in the HT * TP request and send it to the target without any change. Defaults to `false`. */ @core.attr(Boolean) public preserveHostHeader?: boolean | core.BooleanOut; /** * (Optional) A list of security group IDs to assign to the LB. Only valid for Load Balancers of type ` * application`. */ @core.attr(String, { computed: true, kind: "array" }) public securityGroups?: core.Array | core.ArrayOut; /** * (Optional) A subnet mapping block as documented below. */ @core.attr(SubnetMapping, { computed: true, kind: "array" }) public subnetMapping?: | core.Array | core.ArrayOut; /** * (Optional) A list of subnet IDs to attach to the LB. Subnets */ @core.attr(String, { computed: true, kind: "array" }) public subnets?: core.Array | core.ArrayOut; /** * (Optional) A map of tags to assign to the resource. If configured with a provider [`default_tags` co * nfiguration block](https://registry.terraform.io/providers/hashicorp/aws/latest/docs#default_tags-co * nfiguration-block) present, tags with matching keys will overwrite those defined at the provider-lev * el. */ @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; @core.attr(String, { computed: true }) public vpcId!: string | core.StringOut; /** * The canonical hosted zone ID of the load balancer (to be used in a Route 53 Alias record). */ @core.attr(String, { computed: true }) public zoneId!: string | core.StringOut; constructor(name: string, args?: LbArgs) { super(name, "aws_lb", args); } public override getNamespace(): string { return "aws_elb"; } }