Skip to content

Commit

Permalink
Upgrade terraform plugin SDK version 2
Browse files Browse the repository at this point in the history
  • Loading branch information
angelabad committed Aug 23, 2020
1 parent ced4d00 commit 7ef0d4c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions aws/data_source_aws_ec2_client_vpn_endpoint.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (

"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/service/ec2"
"github.com/hashicorp/terraform-plugin-sdk/helper/schema"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
"github.com/terraform-providers/terraform-provider-aws/aws/internal/keyvaluetags"
)

Expand Down Expand Up @@ -136,15 +136,15 @@ func dataSourceAwsEc2ClientVpnEndpointRead(d *schema.ResourceData, meta interfac

resp, err := conn.DescribeClientVpnEndpoints(input)
if err != nil {
return fmt.Errorf("Error getting Client Vpn Endpoint: %v", err)
return fmt.Errorf("error getting Client Vpn Endpoint: %v", err)
}

if resp == nil || len(resp.ClientVpnEndpoints) == 0 {
return errors.New("Error reading EC2 Client Vpn Endpoint: no results found")
return errors.New("error reading EC2 Client Vpn Endpoint: no results found")
}

if len(resp.ClientVpnEndpoints) > 1 {
return errors.New("Error reading EC2 Client Vpn Endpoint: multiple results found, try adjusting search criteria")
return errors.New("error reading EC2 Client Vpn Endpoint: multiple results found, try adjusting search criteria")
}

endpoint := resp.ClientVpnEndpoints[0]
Expand Down
2 changes: 1 addition & 1 deletion aws/data_source_aws_ec2_client_vpn_endpoint_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"regexp"
"testing"

"github.com/hashicorp/terraform-plugin-sdk/helper/resource"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource"
)

func TestAccAWSEc2ClientVpnEndpointDataSource_basic(t *testing.T) {
Expand Down

0 comments on commit 7ef0d4c

Please sign in to comment.