Target Group Attachment Args
data class TargetGroupAttachmentArgs(val target: Output<TargetGroupAttachmentTargetArgs>? = null, val targetGroupIdentifier: Output<String>? = null) : ConvertibleToJava<TargetGroupAttachmentArgs>
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,
},
});
Content copied to clipboard
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,
})
Content copied to clipboard
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,
},
});
});
Content copied to clipboard
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
})
}
Content copied to clipboard
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());
}
}
Content copied to clipboard
resources:
example:
type: aws:vpclattice:TargetGroupAttachment
properties:
targetGroupIdentifier: ${exampleAwsVpclatticeTargetGroup.id}
target:
id: ${exampleAwsLb.arn}
port: 80
Content copied to clipboard
Constructors
Link copied to clipboard
constructor(target: Output<TargetGroupAttachmentTargetArgs>? = null, targetGroupIdentifier: Output<String>? = null)