Class Attachment
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
instancesdefined 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
using Pulumi;
using Aws = Pulumi.Aws;
class MyStack : Stack
{
public MyStack()
{
// Create a new load balancer attachment
var baz = new Aws.Elb.Attachment("baz", new Aws.Elb.AttachmentArgs
{
Elb = aws_elb.Bar.Id,
Instance = aws_instance.Foo.Id,
});
}
}
Inherited Members
Namespace: Pulumi.Aws.ElasticLoadBalancing
Assembly: Pulumi.Aws.dll
Syntax
[Obsolete("aws.elasticloadbalancing.Attachment has been deprecated in favor of aws.elb.Attachment")]
public class Attachment : CustomResource
Constructors
View SourceAttachment(String, AttachmentArgs, CustomResourceOptions)
Create a Attachment resource with the given unique name, arguments, and options.
Declaration
public Attachment(string name, AttachmentArgs args, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resource |
| AttachmentArgs | args | The arguments used to populate this resource's properties |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Properties
View SourceElb
The name of the ELB.
Declaration
public Output<string> Elb { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Instance
Instance ID to place in the ELB pool.
Declaration
public Output<string> Instance { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Methods
View SourceGet(String, Input<String>, AttachmentState, CustomResourceOptions)
Get an existing Attachment resource's state with the given name, ID, and optional extra properties used to qualify the lookup.
Declaration
public static Attachment Get(string name, Input<string> id, AttachmentState state = null, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resulting resource. |
| Input<System.String> | id | The unique provider ID of the resource to lookup. |
| AttachmentState | state | Any extra arguments used during the lookup. |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Returns
| Type | Description |
|---|---|
| Attachment |