Files
opentf/website/source/docs/providers/aws/d/alb.html.markdown
Chris Marchesi 4845f8de39 provider/aws: Add aws_alb data source (#10196)
* provider/aws: Add aws_alb data source

This adds the aws_alb data source for getting information on an AWS
Application Load Balancer.

The schema is nearly the same as the resource of the same name, with
most of the resource population logic de-coupled into its own function
so that they can be shared between the resource and data source.

* provider/aws: aws_alb data source language revisions

 * Multiple/zero result error slightly updated to be a bit more
   specific.
 * Fixed relic of the copy of the resource docs (resource -> data
   source)
2016-11-21 10:27:44 +02:00

1.0 KiB

layout, page_title, sidebar_current, description
layout page_title sidebar_current description
aws AWS: aws_alb docs-aws-datasource-alb Provides an Application Load Balancer data source.

aws_alb

Provides information about an Application Load Balancer.

This data source can prove useful when a module accepts an ALB as an input variable and needs to, for example, determine the security groups associated with it, etc.

Example Usage

variable "alb_arn" {
  type    = "string"
  default = ""
}

variable "alb_name" {
  type    = "string"
  default = ""
}

data "aws_alb" "test" {
  arn  = "${var.alb_arn}"
  name = "${var.alb_arn}"
}

Argument Reference

The following arguments are supported:

  • arn - (Optional) The full ARN of the load balancer.
  • name - (Optional) The unique name of the load balancer.

~> NOTE: When both arn and name are specified, arn takes precedence.

Attributes Reference

See the ALB Resource for details on the returned attributes - they are identical.