Skip to content

Commit

Permalink
Add 'acceptance_required' to the aws_vpc_endpoint_service data source.
Browse files Browse the repository at this point in the history
  • Loading branch information
ewbankkit committed Dec 1, 2017
1 parent 75aa5ab commit 3c9f57d
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 0 deletions.
5 changes: 5 additions & 0 deletions aws/data_source_aws_vpc_endpoint_service.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@ func dataSourceAwsVpcEndpointService() *schema.Resource {
Type: schema.TypeBool,
Computed: true,
},
"acceptance_required": {
Type: schema.TypeBool,
Computed: true,
},
"availability_zones": &schema.Schema{
Type: schema.TypeSet,
Elem: &schema.Schema{Type: schema.TypeString},
Expand Down Expand Up @@ -79,6 +83,7 @@ func dataSourceAwsVpcEndpointServiceRead(d *schema.ResourceData, meta interface{
d.Set("service_type", sd.ServiceType[0].ServiceType)
d.Set("owner", sd.Owner)
d.Set("vpc_endpoint_policy_supported", sd.VpcEndpointPolicySupported)
d.Set("acceptance_required", sd.AcceptanceRequired)
d.Set("availability_zones", flattenStringList(sd.AvailabilityZones))
d.Set("private_dns_name", sd.PrivateDnsName)
d.Set("base_endpoint_dns_names", flattenStringList(sd.BaseEndpointDnsNames))
Expand Down
4 changes: 4 additions & 0 deletions aws/data_source_aws_vpc_endpoint_service_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ func TestAccDataSourceAwsVpcEndpointService_gateway(t *testing.T) {
"data.aws_vpc_endpoint_service.s3", "owner", "amazon"),
resource.TestCheckResourceAttr(
"data.aws_vpc_endpoint_service.s3", "vpc_endpoint_policy_supported", "true"),
resource.TestCheckResourceAttr(
"data.aws_vpc_endpoint_service.s3", "acceptance_required", "false"),
resource.TestCheckResourceAttr(
"data.aws_vpc_endpoint_service.s3", "availability_zones.#", "3"),
resource.TestCheckResourceAttr(
Expand Down Expand Up @@ -58,6 +60,8 @@ func TestAccDataSourceAwsVpcEndpointService_interface(t *testing.T) {
"data.aws_vpc_endpoint_service.ec2", "owner", "amazon"),
resource.TestCheckResourceAttr(
"data.aws_vpc_endpoint_service.ec2", "vpc_endpoint_policy_supported", "false"),
resource.TestCheckResourceAttr(
"data.aws_vpc_endpoint_service.ec2", "acceptance_required", "false"),
resource.TestCheckResourceAttr(
"data.aws_vpc_endpoint_service.ec2", "availability_zones.2487133097", "us-west-2a"),
resource.TestCheckResourceAttr(
Expand Down
1 change: 1 addition & 0 deletions website/docs/d/vpc_endpoint_service.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ The following attributes are exported:
* `service_type` - The service type, `Gateway` or `Interface`.
* `owner` - The AWS account ID of the service owner or `amazon`.
* `vpc_endpoint_policy_supported` - Whether or not the service supports endpoint policies - `true` or `false`.
* `acceptance_required` - Whether or not VPC endpoint connection requests to the service must be accepted by the service owner - `true` or `false`.
* `availability_zones` - The Availability Zones in which the service is available.
* `private_dns_name` - The private DNS name for the service. Applicable for services of type `Interface`.
* `base_endpoint_dns_names` - The DNS names for the service.

0 comments on commit 3c9f57d

Please sign in to comment.