github.com/vtorhonen/terraform@v0.9.0-beta2.0.20170307220345-5d894e4ffda7/website/source/docs/providers/aws/r/vpc_endpoint.html.markdown (about) 1 --- 2 layout: "aws" 3 page_title: "AWS: aws_vpc_endpoint" 4 sidebar_current: "docs-aws-resource-vpc-endpoint" 5 description: |- 6 Provides a VPC Endpoint resource. 7 --- 8 9 # aws\_vpc\_endpoint 10 11 Provides a VPC Endpoint resource. 12 13 ~> **NOTE on VPC Endpoints and VPC Endpoint Route Table Associations:** Terraform provides 14 both a standalone [VPC Endpoint Route Table Association](vpc_endpoint_route_table_association.html) 15 (an association between a VPC endpoint and a single `route_table_id`) and a VPC Endpoint resource 16 with a `route_table_ids` attribute. Do not use the same route table ID in both a VPC Endpoint resource 17 and a VPC Endpoint Route Table Association resource. Doing so will cause a conflict of associations 18 and will overwrite the association. 19 20 ## Example Usage 21 22 Basic usage: 23 24 ``` 25 resource "aws_vpc_endpoint" "private-s3" { 26 vpc_id = "${aws_vpc.main.id}" 27 service_name = "com.amazonaws.us-west-2.s3" 28 } 29 ``` 30 31 ## Argument Reference 32 33 The following arguments are supported: 34 35 * `vpc_id` - (Required) The ID of the VPC in which the endpoint will be used. 36 * `service_name` - (Required) The AWS service name, in the form `com.amazonaws.region.service`. 37 * `policy` - (Optional) A policy to attach to the endpoint that controls access to the service. 38 * `route_table_ids` - (Optional) One or more route table IDs. 39 40 ## Attributes Reference 41 42 The following attributes are exported: 43 44 * `id` - The ID of the VPC endpoint. 45 * `prefix_list_id` - The prefix list ID of the exposed service. 46 * `cidr_blocks` - The list of CIDR blocks for the exposed service. 47 48 49 ## Import 50 51 VPC Endpoints can be imported using the `vpc endpoint id`, e.g. 52 53 ``` 54 $ terraform import aws_vpc_endpoint.endpoint1 vpce-3ecf2a57 55 ```