Skip to content

Commit

Permalink
Merge pull request #4895 from ewbankkit/issue-4894
Browse files Browse the repository at this point in the history
r/aws_vpn_gateway_attachment: Correct error code for missing VPN gateway
  • Loading branch information
bflad authored Jun 21, 2018
2 parents c0550e7 + 59fb15e commit 5ca5175
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions aws/resource_aws_vpn_gateway_attachment.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ func resourceAwsVpnGatewayAttachmentRead(d *schema.ResourceData, meta interface{

if err != nil {
awsErr, ok := err.(awserr.Error)
if ok && awsErr.Code() == "InvalidVPNGatewayID.NotFound" {
if ok && awsErr.Code() == "InvalidVpnGatewayID.NotFound" {
log.Printf("[WARN] VPN Gateway %q not found.", vgwId)
d.SetId("")
return nil
Expand Down Expand Up @@ -130,7 +130,7 @@ func resourceAwsVpnGatewayAttachmentDelete(d *schema.ResourceData, meta interfac
awsErr, ok := err.(awserr.Error)
if ok {
switch awsErr.Code() {
case "InvalidVPNGatewayID.NotFound":
case "InvalidVpnGatewayID.NotFound":
return nil
case "InvalidVpnGatewayAttachment.NotFound":
return nil
Expand Down Expand Up @@ -176,7 +176,7 @@ func vpnGatewayAttachmentStateRefresh(conn *ec2.EC2, vpcId, vgwId string) resour
awsErr, ok := err.(awserr.Error)
if ok {
switch awsErr.Code() {
case "InvalidVPNGatewayID.NotFound":
case "InvalidVpnGatewayID.NotFound":
fallthrough
case "InvalidVpnGatewayAttachment.NotFound":
return nil, "", nil
Expand Down

0 comments on commit 5ca5175

Please sign in to comment.