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.
variable "lb_tg_arn" {
type = string
default = ""
}
variable "lb_tg_name" {
type = string
default = ""
}
data "aws_lb_target_group" "test" {
arn = var.lb_tg_arn
name = var.lb_tg_name
}
This data source supports the following arguments:
arn
- (Optional) Full ARN of the target group.name
- (Optional) Unique name of the target group.tags
- (Optional) Mapping of tags, each pair of which must exactly match a pair on the desired target group.See the LB Target Group Resource for details on the returned attributes - they are identical.
read
- (Default 20m
)