Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
resource/aws_ec2_transit_gateway_route: Prevent crash with externally…
… removed attachment Reference: #7111 Previous output from acceptance testing: ``` === CONT TestAccAWSEc2TransitGatewayRoute_disappears_TransitGatewayAttachment panic: runtime error: index out of range goroutine 1025 [running]: github.com/terraform-providers/terraform-provider-aws/aws.resourceAwsEc2TransitGatewayRouteRead(0xc0007f84d0, 0x42c6e00, 0xc000904700, 0xc0007f84d0, 0x0) /Users/bflad/go/src/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ec2_transit_gateway_route.go:128 +0x8e6 github.com/terraform-providers/terraform-provider-aws/vendor/github.com/hashicorp/terraform/helper/schema.(*Resource).Refresh(0xc0004f8b60, 0xc0009630e0, 0x42c6e00, 0xc000904700, 0xc000547cb0, 0xc00071cf01, 0xc00074c550) /Users/bflad/go/src/github.com/terraform-providers/terraform-provider-aws/vendor/github.com/hashicorp/terraform/helper/schema/resource.go:352 +0x160 ``` Output from acceptance testing: ``` --- PASS: TestAccAWSEc2TransitGatewayRoute_disappears (310.87s) --- PASS: TestAccAWSEc2TransitGatewayRoute_basic (314.08s) --- PASS: TestAccAWSEc2TransitGatewayRoute_disappears_TransitGatewayAttachment (336.06s) ```
- Loading branch information