From 3b21fbc1bc5059ed7485ac3211f1fbffb87ce1a5 Mon Sep 17 00:00:00 2001 From: clint shryock Date: Fri, 18 Dec 2015 14:18:30 -0600 Subject: [PATCH] provider/aws: Update VPC Endpoint to correctly set route table ids, and read after update --- builtin/providers/aws/resource_aws_vpc_endpoint.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/builtin/providers/aws/resource_aws_vpc_endpoint.go b/builtin/providers/aws/resource_aws_vpc_endpoint.go index c35e5f948..1b971c64d 100644 --- a/builtin/providers/aws/resource_aws_vpc_endpoint.go +++ b/builtin/providers/aws/resource_aws_vpc_endpoint.go @@ -103,7 +103,9 @@ func resourceAwsVPCEndpointRead(d *schema.ResourceData, meta interface{}) error d.Set("vpc_id", vpce.VpcId) d.Set("policy", normalizeJson(*vpce.PolicyDocument)) d.Set("service_name", vpce.ServiceName) - d.Set("route_table_ids", vpce.RouteTableIds) + if err := d.Set("route_table_ids", aws.StringValueSlice(vpce.RouteTableIds)); err != nil { + return err + } return nil } @@ -142,7 +144,7 @@ func resourceAwsVPCEndpointUpdate(d *schema.ResourceData, meta interface{}) erro } log.Printf("[DEBUG] VPC Endpoint %q updated", input.VpcEndpointId) - return nil + return resourceAwsVPCEndpointRead(d, meta) } func resourceAwsVPCEndpointDelete(d *schema.ResourceData, meta interface{}) error {