TargetGroupAttachment

class TargetGroupAttachment : KotlinCustomResource

Provides the ability to register a target with an AWS VPC Lattice Target Group.

Example Usage

Basic Usage

import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = new aws.vpclattice.TargetGroupAttachment("example", {
targetGroupIdentifier: exampleAwsVpclatticeTargetGroup.id,
target: {
id: exampleAwsLb.arn,
port: 80,
},
});
import pulumi
import pulumi_aws as aws
example = aws.vpclattice.TargetGroupAttachment("example",
target_group_identifier=example_aws_vpclattice_target_group["id"],
target={
"id": example_aws_lb["arn"],
"port": 80,
})
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var example = new Aws.VpcLattice.TargetGroupAttachment("example", new()
{
TargetGroupIdentifier = exampleAwsVpclatticeTargetGroup.Id,
Target = new Aws.VpcLattice.Inputs.TargetGroupAttachmentTargetArgs
{
Id = exampleAwsLb.Arn,
Port = 80,
},
});
});
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/vpclattice"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := vpclattice.NewTargetGroupAttachment(ctx, "example", &vpclattice.TargetGroupAttachmentArgs{
TargetGroupIdentifier: pulumi.Any(exampleAwsVpclatticeTargetGroup.Id),
Target: &vpclattice.TargetGroupAttachmentTargetArgs{
Id: pulumi.Any(exampleAwsLb.Arn),
Port: pulumi.Int(80),
},
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.vpclattice.TargetGroupAttachment;
import com.pulumi.aws.vpclattice.TargetGroupAttachmentArgs;
import com.pulumi.aws.vpclattice.inputs.TargetGroupAttachmentTargetArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var example = new TargetGroupAttachment("example", TargetGroupAttachmentArgs.builder()
.targetGroupIdentifier(exampleAwsVpclatticeTargetGroup.id())
.target(TargetGroupAttachmentTargetArgs.builder()
.id(exampleAwsLb.arn())
.port(80)
.build())
.build());
}
}
resources:
example:
type: aws:vpclattice:TargetGroupAttachment
properties:
targetGroupIdentifier: ${exampleAwsVpclatticeTargetGroup.id}
target:
id: ${exampleAwsLb.arn}
port: 80

Properties

Link copied to clipboard
val id: Output<String>
Link copied to clipboard
val pulumiChildResources: Set<KotlinResource>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

The target.

Link copied to clipboard

The ID or Amazon Resource Name (ARN) of the target group.

Link copied to clipboard
val urn: Output<String>