github.com/ottenhoff/terraform@v0.7.0-rc1.0.20160607213102-ac2d195cc560/website/source/docs/providers/aws/d/availability_zones.html.markdown (about)

     1  ---
     2  layout: "aws"
     3  page_title: "AWS: aws_availability_zones"
     4  sidebar_current: "docs-aws-datasource-availability-zones"
     5  description: |-
     6      Provides a list of availability zones which can be used by an AWS account
     7  ---
     8  
     9  # aws\_availability\_zones
    10  
    11  The Availability Zones data source allows access to the list of AWS
    12  Availability Zones which can be accessed by an AWS account within the region
    13  configured in the provider.
    14  
    15  ## Example Usage
    16  
    17  ```
    18  # Declare the data source
    19  data "aws_availability_zones" "zones" {}
    20  
    21  # Create a subnet in each availability zone
    22  resource "aws_subnet" "public" {
    23      count = "${length(data.aws_availability_zones.zones.instance)}"
    24      
    25      availability_zone = "${data.aws_availability_zones.zones.instance[count.index]}"
    26  
    27      # Other properties...
    28  }
    29  ```
    30  
    31  ## Argument Reference
    32  
    33  There are no arguments for this data source.
    34  
    35  ## Attributes Reference
    36  
    37  The following attributes are exported:
    38  
    39  * `instance` - A list of the availability zone names available to the account.