getTargetGroup

Deprecated

aws.elasticloadbalancingv2.getTargetGroup has been deprecated in favor of aws.lb.getTargetGroup

Note: aws.alb.TargetGroup is known as aws.lb.TargetGroup. The functionality is identical. Provides information about a Load Balancer Target Group. This data source can prove useful when a module accepts an LB Target Group as an input variable and needs to know its attributes. It can also be used to get the ARN of an LB Target Group for use in other resources, given LB Target Group name.

Example Usage

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.lb.LbFunctions;
import com.pulumi.aws.lb.inputs.GetTargetGroupArgs;
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) {
final var config = ctx.config();
final var lbTgArn = config.get("lbTgArn").orElse("");
final var lbTgName = config.get("lbTgName").orElse("");
final var test = LbFunctions.getTargetGroup(GetTargetGroupArgs.builder()
.arn(lbTgArn)
.name(lbTgName)
.build());
}
}

Return

A collection of values returned by getTargetGroup.

Parameters

argument

A collection of arguments for invoking getTargetGroup.


suspend fun getTargetGroup(arn: String? = null, name: String? = null, tags: Map<String, String>? = null): GetTargetGroupResult

Deprecated

aws.elasticloadbalancingv2.getTargetGroup has been deprecated in favor of aws.lb.getTargetGroup

Return

A collection of values returned by getTargetGroup.

Parameters

arn

Full ARN of the target group.

name

Unique name of the target group.

tags

Mapping of tags, each pair of which must exactly match a pair on the desired target group.

NOTE: When both arn and name are specified, arn takes precedence. tags has the lowest precedence.

See also


Deprecated

aws.elasticloadbalancingv2.getTargetGroup has been deprecated in favor of aws.lb.getTargetGroup

Return

A collection of values returned by getTargetGroup.

Parameters

argument

Builder for com.pulumi.aws.elasticloadbalancingv2.kotlin.inputs.GetTargetGroupPlainArgs.

See also