awsx.lb.TargetGroupAttachment
Attach an EC2 instance or Lambda to a Load Balancer. This will create required permissions if attaching to a Lambda Function.
Create TargetGroupAttachment Resource
new TargetGroupAttachment(name: string, args?: TargetGroupAttachmentArgs, opts?: CustomResourceOptions);
@overload
def TargetGroupAttachment(resource_name: str,
opts: Optional[ResourceOptions] = None,
instance: Optional[pulumi_aws.ec2.Instance] = None,
instance_id: Optional[str] = None,
lambda_: Optional[pulumi_aws.lambda_.Function] = None,
lambda_arn: Optional[str] = None,
target_group: Optional[pulumi_aws.lb.TargetGroup] = None,
target_group_arn: Optional[str] = None)
@overload
def TargetGroupAttachment(resource_name: str,
args: Optional[TargetGroupAttachmentArgs] = None,
opts: Optional[ResourceOptions] = None)
func NewTargetGroupAttachment(ctx *Context, name string, args *TargetGroupAttachmentArgs, opts ...ResourceOption) (*TargetGroupAttachment, error)
public TargetGroupAttachment(string name, TargetGroupAttachmentArgs? args = null, CustomResourceOptions? opts = null)
public TargetGroupAttachment(String name, TargetGroupAttachmentArgs args)
public TargetGroupAttachment(String name, TargetGroupAttachmentArgs args, CustomResourceOptions options)
type: awsx:lb:TargetGroupAttachment
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args TargetGroupAttachmentArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args TargetGroupAttachmentArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args TargetGroupAttachmentArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args TargetGroupAttachmentArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args TargetGroupAttachmentArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
TargetGroupAttachment Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
The TargetGroupAttachment resource accepts the following input properties:
- Instance
Pulumi.
Aws. Ec2. Instance EC2 Instance to attach to the Target Group. Exactly 1 of [instance], [instanceId], [lambda] or [lambdaArn] must be provided.
- Instance
Id string ID of an EC2 Instance to attach to the Target Group. Exactly 1 of [instance], [instanceId], [lambda] or [lambdaArn] must be provided.
- Lambda
Pulumi.
Aws. Lambda. Function Lambda Function to attach to the Target Group. Exactly 1 of [instance], [instanceId], [lambda] or [lambdaArn] must be provided.
- Lambda
Arn string ARN of a Lambda Function to attach to the Target Group. Exactly 1 of [instance], [instanceId], [lambda] or [lambdaArn] must be provided.
- Target
Group Pulumi.Aws. LB. Target Group Target Group to attach to. Exactly one of [targetGroup] or [targetGroupArn] must be specified.
- Target
Group stringArn ARN of the Target Group to attach to. Exactly one of [targetGroup] or [targetGroupArn] must be specified.
- Instance Instance
EC2 Instance to attach to the Target Group. Exactly 1 of [instance], [instanceId], [lambda] or [lambdaArn] must be provided.
- Instance
Id string ID of an EC2 Instance to attach to the Target Group. Exactly 1 of [instance], [instanceId], [lambda] or [lambdaArn] must be provided.
- Lambda Function
Lambda Function to attach to the Target Group. Exactly 1 of [instance], [instanceId], [lambda] or [lambdaArn] must be provided.
- Lambda
Arn string ARN of a Lambda Function to attach to the Target Group. Exactly 1 of [instance], [instanceId], [lambda] or [lambdaArn] must be provided.
- Target
Group TargetGroup Target Group to attach to. Exactly one of [targetGroup] or [targetGroupArn] must be specified.
- Target
Group stringArn ARN of the Target Group to attach to. Exactly one of [targetGroup] or [targetGroupArn] must be specified.
- instance Instance
EC2 Instance to attach to the Target Group. Exactly 1 of [instance], [instanceId], [lambda] or [lambdaArn] must be provided.
- instance
Id String ID of an EC2 Instance to attach to the Target Group. Exactly 1 of [instance], [instanceId], [lambda] or [lambdaArn] must be provided.
- lambda Function
Lambda Function to attach to the Target Group. Exactly 1 of [instance], [instanceId], [lambda] or [lambdaArn] must be provided.
- lambda
Arn String ARN of a Lambda Function to attach to the Target Group. Exactly 1 of [instance], [instanceId], [lambda] or [lambdaArn] must be provided.
- target
Group TargetGroup Target Group to attach to. Exactly one of [targetGroup] or [targetGroupArn] must be specified.
- target
Group StringArn ARN of the Target Group to attach to. Exactly one of [targetGroup] or [targetGroupArn] must be specified.
- instance
pulumi
Aws.ec2. Instance EC2 Instance to attach to the Target Group. Exactly 1 of [instance], [instanceId], [lambda] or [lambdaArn] must be provided.
- instance
Id string ID of an EC2 Instance to attach to the Target Group. Exactly 1 of [instance], [instanceId], [lambda] or [lambdaArn] must be provided.
- lambda
pulumi
Aws.lambda. Function Lambda Function to attach to the Target Group. Exactly 1 of [instance], [instanceId], [lambda] or [lambdaArn] must be provided.
- lambda
Arn string ARN of a Lambda Function to attach to the Target Group. Exactly 1 of [instance], [instanceId], [lambda] or [lambdaArn] must be provided.
- target
Group pulumiAws. Target Group Target Group to attach to. Exactly one of [targetGroup] or [targetGroupArn] must be specified.
- target
Group stringArn ARN of the Target Group to attach to. Exactly one of [targetGroup] or [targetGroupArn] must be specified.
- instance Instance
EC2 Instance to attach to the Target Group. Exactly 1 of [instance], [instanceId], [lambda] or [lambdaArn] must be provided.
- instance_
id str ID of an EC2 Instance to attach to the Target Group. Exactly 1 of [instance], [instanceId], [lambda] or [lambdaArn] must be provided.
- lambda_ Function
Lambda Function to attach to the Target Group. Exactly 1 of [instance], [instanceId], [lambda] or [lambdaArn] must be provided.
- lambda_
arn str ARN of a Lambda Function to attach to the Target Group. Exactly 1 of [instance], [instanceId], [lambda] or [lambdaArn] must be provided.
- target_
group TargetGroup Target Group to attach to. Exactly one of [targetGroup] or [targetGroupArn] must be specified.
- target_
group_ strarn ARN of the Target Group to attach to. Exactly one of [targetGroup] or [targetGroupArn] must be specified.
- instance aws:ec2:Instance
EC2 Instance to attach to the Target Group. Exactly 1 of [instance], [instanceId], [lambda] or [lambdaArn] must be provided.
- instance
Id String ID of an EC2 Instance to attach to the Target Group. Exactly 1 of [instance], [instanceId], [lambda] or [lambdaArn] must be provided.
- lambda aws:lambda:Function
Lambda Function to attach to the Target Group. Exactly 1 of [instance], [instanceId], [lambda] or [lambdaArn] must be provided.
- lambda
Arn String ARN of a Lambda Function to attach to the Target Group. Exactly 1 of [instance], [instanceId], [lambda] or [lambdaArn] must be provided.
- target
Group aws::TargetGroup Target Group to attach to. Exactly one of [targetGroup] or [targetGroupArn] must be specified.
- target
Group StringArn ARN of the Target Group to attach to. Exactly one of [targetGroup] or [targetGroupArn] must be specified.
Outputs
All input properties are implicitly available as output properties. Additionally, the TargetGroupAttachment resource produces the following output properties:
- Attachment
Pulumi.
Aws. LB. Target Group Attachment Underlying Target Group Attachment resource
- Lambda
Permission Pulumi.Aws. Lambda. Permission Auto-created Lambda permission, if targeting a Lambda function
- Target
Group TargetAttachment Group Attachment Underlying Target Group Attachment resource
- Lambda
Permission Permission Auto-created Lambda permission, if targeting a Lambda function
- target
Group TargetAttachment Group Attachment Underlying Target Group Attachment resource
- lambda
Permission Permission Auto-created Lambda permission, if targeting a Lambda function
- target
Group pulumiAttachment Aws. Target Group Attachment Underlying Target Group Attachment resource
- lambda
Permission pulumiAws.lambda. Permission Auto-created Lambda permission, if targeting a Lambda function
- target_
group_ Targetattachment Group Attachment Underlying Target Group Attachment resource
- lambda_
permission Permission Auto-created Lambda permission, if targeting a Lambda function
- target
Group aws::TargetAttachment Group Attachment Underlying Target Group Attachment resource
- lambda
Permission aws:lambda:Permission Auto-created Lambda permission, if targeting a Lambda function
Package Details
- Repository
- AWSx (Pulumi Crosswalk for AWS) pulumi/pulumi-awsx
- License
- Apache-2.0