github.com/nathanielks/terraform@v0.6.1-0.20170509030759-13e1a62319dc/website/source/docs/providers/aws/d/region.html.markdown (about)

     1  ---
     2  layout: "aws"
     3  page_title: "AWS: aws_region"
     4  sidebar_current: "docs-aws-datasource-region"
     5  description: |-
     6      Provides details about a specific service region
     7  ---
     8  
     9  # aws\_region
    10  
    11  `aws_region` provides details about a specific AWS region.
    12  
    13  As well as validating a given region name (and optionally obtaining its
    14  endpoint) this resource can be used to discover the name of the region
    15  configured within the provider. The latter can be useful in a child module
    16  which is inheriting an AWS provider configuration from its parent module.
    17  
    18  ## Example Usage
    19  
    20  The following example shows how the resource might be used to obtain
    21  the name of the AWS region configured on the provider.
    22  
    23  ```hcl
    24  data "aws_region" "current" {
    25    current = true
    26  }
    27  ```
    28  
    29  ## Argument Reference
    30  
    31  The arguments of this data source act as filters for querying the available
    32  regions. The given filters must match exactly one region whose data will be
    33  exported as attributes.
    34  
    35  * `name` - (Optional) The full name of the region to select.
    36  
    37  * `current` - (Optional) Set to `true` to match only the region configured
    38    in the provider. (It is not meaningful to set this to `false`.)
    39  
    40  * `endpoint` - (Optional) The endpoint of the region to select.
    41  
    42  At least one of the above attributes should be provided to ensure that only
    43  one region is matched.
    44  
    45  ## Attributes Reference
    46  
    47  The following attributes are exported:
    48  
    49  * `name` - The name of the selected region.
    50  
    51  * `current` - `true` if the selected region is the one configured on the
    52    provider, or `false` otherwise.
    53  
    54  * `endpoint` - The endpoint for the selected region.