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

     1  ---
     2  layout: "aws"
     3  page_title: "AWS: aws_vpc_endpoint_service"
     4  sidebar_current: "docs-aws-datasource-vpc-endpoint-service"
     5  description: |-
     6      Provides details about a specific AWS service that can be specified when creating a VPC endpoint.
     7  ---
     8  
     9  # aws\_vpc\_endpoint\_service
    10  
    11  The VPC Endpoint Service data source allows access to a specific AWS
    12  service that can be specified when creating a VPC endpoint within the region
    13  configured in the provider.
    14  
    15  ## Example Usage
    16  
    17  ```hcl
    18  # Declare the data source
    19  data "aws_vpc_endpoint_service" "s3" {
    20    service = "s3"
    21  }
    22  
    23  # Create a VPC
    24  resource "aws_vpc" "foo" {
    25    cidr_block = "10.0.0.0/16"
    26  }
    27  
    28  # Create a VPC endpoint
    29  resource "aws_vpc_endpoint" "ep" {
    30    vpc_id       = "${aws_vpc.foo.id}"
    31    service_name = "${data.aws_vpc_endpoint_service.s3.service_name}"
    32  }
    33  ```
    34  
    35  ## Argument Reference
    36  
    37  The arguments of this data source act as filters for querying the available VPC endpoint services.
    38  The given filters must match exactly one VPC endpoint service whose data will be exported as attributes.
    39  
    40  * `service` - (Required) The common name of the AWS service (e.g. `s3`).
    41  
    42  ## Attributes Reference
    43  
    44  The following attributes are exported:
    45  
    46  * `service_name` - The service name of the AWS service that can be specified when creating a VPC endpoint.