import * as pulumi from "@pulumi/pulumi"; import * as inputs from "../types/input"; import * as outputs from "../types/output"; /** * Provides an Elastic Load Balancer resource, also known as a "Classic * Load Balancer" after the release of * Application/Network Load Balancers. * * > **NOTE on ELB Instances and ELB Attachments:** This provider currently * provides both a standalone ELB Attachment resource * (describing an instance attached to an ELB), and an ELB resource with * `instances` defined in-line. At this time you cannot use an ELB with in-line * instances in conjunction with a ELB Attachment resources. Doing so will cause a * conflict and will overwrite attachments. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * // Create a new load balancer * const bar = new aws.elb.LoadBalancer("bar", { * accessLogs: { * bucket: "foo", * bucketPrefix: "bar", * interval: 60, * }, * healthCheck: { * healthyThreshold: 2, * unhealthyThreshold: 2, * timeout: 3, * target: "HTTP:8000/", * interval: 30, * }, * listeners: [ * { * instancePort: 8000, * instanceProtocol: "http", * lbPort: 80, * lbProtocol: "http", * }, * { * instancePort: 8000, * instanceProtocol: "http", * lbPort: 443, * lbProtocol: "https", * sslCertificateId: "arn:aws:iam::123456789012:server-certificate/certName", * }, * ], * name: "foobar-elb", * availabilityZones: [ * "us-west-2a", * "us-west-2b", * "us-west-2c", * ], * instances: [foo.id], * crossZoneLoadBalancing: true, * idleTimeout: 400, * connectionDraining: true, * connectionDrainingTimeout: 400, * tags: { * Name: "foobar-elb", * }, * }); * ``` * * ## Import * * ### Identity Schema * * #### Required * * * `name` (String) Name of the ELB. * * #### Optional * * * `accountId` (String) AWS Account where this resource is managed. * * `region` (String) Region where this resource is managed. * * Using `pulumi import`, import ELBs using the `name`. For example: * * ```sh * $ pulumi import aws:elb/loadBalancer:LoadBalancer example elb-production-12345 * ``` */ export declare class LoadBalancer extends pulumi.CustomResource { /** * Get an existing LoadBalancer 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?: LoadBalancerState, opts?: pulumi.CustomResourceOptions): LoadBalancer; /** * Returns true if the given object is an instance of LoadBalancer. 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 LoadBalancer; /** * An Access Logs block. Access Logs documented below. */ readonly accessLogs: pulumi.Output; /** * The ARN of the ELB */ readonly arn: pulumi.Output; /** * The AZ's to serve traffic in. */ readonly availabilityZones: pulumi.Output; /** * Boolean to enable connection draining. Default: `false` */ readonly connectionDraining: pulumi.Output; /** * The time in seconds to allow for connections to drain. Default: `300` */ readonly connectionDrainingTimeout: pulumi.Output; /** * Enable cross-zone load balancing. Default: `true` */ readonly crossZoneLoadBalancing: pulumi.Output; /** * Determines how the load balancer handles requests that might pose a security risk to an application due to HTTP desync. Valid values are `monitor`, `defensive` (default), `strictest`. */ readonly desyncMitigationMode: pulumi.Output; /** * The DNS name of the ELB */ readonly dnsName: pulumi.Output; /** * A healthCheck block. Health Check documented below. */ readonly healthCheck: pulumi.Output; /** * The time in seconds that the connection is allowed to be idle. Default: `60` */ readonly idleTimeout: pulumi.Output; /** * A list of instance ids to place in the ELB pool. */ readonly instances: pulumi.Output; /** * If true, ELB will be an internal ELB. */ readonly internal: pulumi.Output; /** * A list of listener blocks. Listeners documented below. */ readonly listeners: pulumi.Output; /** * The name of the ELB. By default generated by this provider. */ readonly name: pulumi.Output; /** * Creates a unique name beginning with the specified * prefix. Conflicts with `name`. */ readonly namePrefix: pulumi.Output; /** * Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration. */ readonly region: pulumi.Output; /** * A list of security group IDs to assign to the ELB. * Only valid if creating an ELB within a VPC */ readonly securityGroups: pulumi.Output; /** * The name of the security group that you can use as * part of your inbound rules for your load balancer's back-end application * instances. Use this for Classic or Default VPC only. */ readonly sourceSecurityGroup: pulumi.Output; /** * The ID of the security group that you can use as * part of your inbound rules for your load balancer's back-end application * instances. Only available on ELBs launched in a VPC. */ readonly sourceSecurityGroupId: pulumi.Output; /** * A list of subnet IDs to attach to the ELB. When an update to subnets will remove all current subnets, this will force a new resource. */ readonly subnets: pulumi.Output; /** * A map of tags to assign to the resource. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. * * Exactly one of `availabilityZones` or `subnets` must be specified: this * determines if the ELB exists in a VPC or in EC2-classic. */ readonly tags: pulumi.Output<{ [key: string]: string; } | undefined>; /** * A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. */ readonly tagsAll: pulumi.Output<{ [key: string]: string; }>; /** * The canonical hosted zone ID of the ELB (to be used in a Route 53 Alias record) */ readonly zoneId: pulumi.Output; /** * Create a LoadBalancer 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: LoadBalancerArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering LoadBalancer resources. */ export interface LoadBalancerState { /** * An Access Logs block. Access Logs documented below. */ accessLogs?: pulumi.Input; /** * The ARN of the ELB */ arn?: pulumi.Input; /** * The AZ's to serve traffic in. */ availabilityZones?: pulumi.Input[] | undefined>; /** * Boolean to enable connection draining. Default: `false` */ connectionDraining?: pulumi.Input; /** * The time in seconds to allow for connections to drain. Default: `300` */ connectionDrainingTimeout?: pulumi.Input; /** * Enable cross-zone load balancing. Default: `true` */ crossZoneLoadBalancing?: pulumi.Input; /** * Determines how the load balancer handles requests that might pose a security risk to an application due to HTTP desync. Valid values are `monitor`, `defensive` (default), `strictest`. */ desyncMitigationMode?: pulumi.Input; /** * The DNS name of the ELB */ dnsName?: pulumi.Input; /** * A healthCheck block. Health Check documented below. */ healthCheck?: pulumi.Input; /** * The time in seconds that the connection is allowed to be idle. Default: `60` */ idleTimeout?: pulumi.Input; /** * A list of instance ids to place in the ELB pool. */ instances?: pulumi.Input[] | undefined>; /** * If true, ELB will be an internal ELB. */ internal?: pulumi.Input; /** * A list of listener blocks. Listeners documented below. */ listeners?: pulumi.Input[] | undefined>; /** * The name of the ELB. By default generated by this provider. */ name?: pulumi.Input; /** * Creates a unique name beginning with the specified * prefix. Conflicts with `name`. */ namePrefix?: pulumi.Input; /** * Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration. */ region?: pulumi.Input; /** * A list of security group IDs to assign to the ELB. * Only valid if creating an ELB within a VPC */ securityGroups?: pulumi.Input[] | undefined>; /** * The name of the security group that you can use as * part of your inbound rules for your load balancer's back-end application * instances. Use this for Classic or Default VPC only. */ sourceSecurityGroup?: pulumi.Input; /** * The ID of the security group that you can use as * part of your inbound rules for your load balancer's back-end application * instances. Only available on ELBs launched in a VPC. */ sourceSecurityGroupId?: pulumi.Input; /** * A list of subnet IDs to attach to the ELB. When an update to subnets will remove all current subnets, this will force a new resource. */ subnets?: pulumi.Input[] | undefined>; /** * A map of tags to assign to the resource. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. * * Exactly one of `availabilityZones` or `subnets` must be specified: this * determines if the ELB exists in a VPC or in EC2-classic. */ tags?: pulumi.Input<{ [key: string]: pulumi.Input; } | undefined>; /** * A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. */ tagsAll?: pulumi.Input<{ [key: string]: pulumi.Input; } | undefined>; /** * The canonical hosted zone ID of the ELB (to be used in a Route 53 Alias record) */ zoneId?: pulumi.Input; } /** * The set of arguments for constructing a LoadBalancer resource. */ export interface LoadBalancerArgs { /** * An Access Logs block. Access Logs documented below. */ accessLogs?: pulumi.Input; /** * The AZ's to serve traffic in. */ availabilityZones?: pulumi.Input[] | undefined>; /** * Boolean to enable connection draining. Default: `false` */ connectionDraining?: pulumi.Input; /** * The time in seconds to allow for connections to drain. Default: `300` */ connectionDrainingTimeout?: pulumi.Input; /** * Enable cross-zone load balancing. Default: `true` */ crossZoneLoadBalancing?: pulumi.Input; /** * Determines how the load balancer handles requests that might pose a security risk to an application due to HTTP desync. Valid values are `monitor`, `defensive` (default), `strictest`. */ desyncMitigationMode?: pulumi.Input; /** * A healthCheck block. Health Check documented below. */ healthCheck?: pulumi.Input; /** * The time in seconds that the connection is allowed to be idle. Default: `60` */ idleTimeout?: pulumi.Input; /** * A list of instance ids to place in the ELB pool. */ instances?: pulumi.Input[] | undefined>; /** * If true, ELB will be an internal ELB. */ internal?: pulumi.Input; /** * A list of listener blocks. Listeners documented below. */ listeners: pulumi.Input[]>; /** * The name of the ELB. By default generated by this provider. */ name?: pulumi.Input; /** * Creates a unique name beginning with the specified * prefix. Conflicts with `name`. */ namePrefix?: pulumi.Input; /** * Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration. */ region?: pulumi.Input; /** * A list of security group IDs to assign to the ELB. * Only valid if creating an ELB within a VPC */ securityGroups?: pulumi.Input[] | undefined>; /** * The name of the security group that you can use as * part of your inbound rules for your load balancer's back-end application * instances. Use this for Classic or Default VPC only. */ sourceSecurityGroup?: pulumi.Input; /** * A list of subnet IDs to attach to the ELB. When an update to subnets will remove all current subnets, this will force a new resource. */ subnets?: pulumi.Input[] | undefined>; /** * A map of tags to assign to the resource. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. * * Exactly one of `availabilityZones` or `subnets` must be specified: this * determines if the ELB exists in a VPC or in EC2-classic. */ tags?: pulumi.Input<{ [key: string]: pulumi.Input; } | undefined>; } //# sourceMappingURL=loadBalancer.d.ts.map