Provides information about a Load Balancer.
This data source can prove useful when a module accepts an LB as an input variable and needs to, for example, determine the security groups associated with it, etc.
variable "lb_arn" {
type = string
default = ""
}
variable "lb_name" {
type = string
default = ""
}
data "aws_lb" "test" {
arn = var.lb_arn
name = var.lb_name
}
This data source supports the following arguments:
arn
- (Optional) Full ARN of the load balancer.name
- (Optional) Unique name of the load balancer.tags
- (Optional) Mapping of tags, each pair of which must exactly match a pair on the desired load balancer.See the LB Resource for details on the returned attributes - they are identical.
read
- (Default 20m
)