UNPKG

@pulumi/aws

Version:

A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.

96 lines (95 loc) 3.77 kB
import * as pulumi from "@pulumi/pulumi"; /** * Attaches an EC2 instance to an Elastic Load Balancer (ELB). For attaching resources with Application Load Balancer (ALB) or Network Load Balancer (NLB), see the `aws.lb.TargetGroupAttachment` resource. * * > **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 Elastic Load Balancer resource with * `instances` defined in-line. At this time you cannot use an ELB with in-line * instances in conjunction with an ELB Attachment resource. 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 attachment * const baz = new aws.elb.Attachment("baz", { * elb: bar.id, * instance: foo.id, * }); * ``` */ export declare class Attachment extends pulumi.CustomResource { /** * Get an existing Attachment 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<pulumi.ID>, state?: AttachmentState, opts?: pulumi.CustomResourceOptions): Attachment; /** * Returns true if the given object is an instance of Attachment. 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 Attachment; /** * The name of the ELB. */ readonly elb: pulumi.Output<string>; /** * Instance ID to place in the ELB pool. */ readonly instance: pulumi.Output<string>; /** * 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<string>; /** * Create a Attachment 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: AttachmentArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering Attachment resources. */ export interface AttachmentState { /** * The name of the ELB. */ elb?: pulumi.Input<string>; /** * Instance ID to place in the ELB pool. */ instance?: pulumi.Input<string>; /** * 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<string>; } /** * The set of arguments for constructing a Attachment resource. */ export interface AttachmentArgs { /** * The name of the ELB. */ elb: pulumi.Input<string>; /** * Instance ID to place in the ELB pool. */ instance: pulumi.Input<string>; /** * 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<string>; }