Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

data-source/aws_db_instance: Prevent crash with EC2 Classic #3619

Merged
merged 1 commit into from
Mar 6, 2018

Conversation

bflad
Copy link
Contributor

@bflad bflad commented Mar 5, 2018

Previously (before code changes):

 make testacc TEST=./aws TESTARGS='-run=TestAccAWSDbInstanceDataSource_ec2Classic'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws -v -run=TestAccAWSDbInstanceDataSource_ec2Classic -timeout 120m
=== RUN   TestAccAWSDbInstanceDataSource_ec2Classic
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x10 pc=0x24a79af]

goroutine 305 [running]:
github.com/terraform-providers/terraform-provider-aws/aws.dataSourceAwsDbInstanceRead(0xc420b9e9a0, 0x345c2a0, 0xc4201ef400, 0xc420b9e9a0, 0x0)
	/Users/bflad/go/src/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_db_instance.go:255 +0x77f
...
FAIL	github.com/terraform-providers/terraform-provider-aws/aws	264.867s
make: *** [testacc] Error 1

Now passes (including consolidation of endpoint/basic acceptance testing):

make testacc TEST=./aws TESTARGS='-run=TestAccAWSDbInstanceDataSource_ec2Classic'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws -v -run=TestAccAWSDbInstanceDataSource_ec2Classic -timeout 120m
=== RUN   TestAccAWSDbInstanceDataSource_ec2Classic
--- PASS: TestAccAWSDbInstanceDataSource_ec2Classic (403.07s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	403.113s

make testacc TEST=./aws TESTARGS='-run=TestAccAWSDbInstanceDataSource_basic'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws -v -run=TestAccAWSDbInstanceDataSource_ -timeout 120m
=== RUN   TestAccAWSDbInstanceDataSource_basic
--- PASS: TestAccAWSDbInstanceDataSource_basic (439.64s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	439.64s

@bflad bflad added bug Addresses a defect in current functionality. crash Results from or addresses a Terraform crash or kernel panic. service/rds Issues and PRs that pertain to the rds service. labels Mar 5, 2018
@bflad bflad added this to the v1.11.0 milestone Mar 5, 2018
@ghost ghost added the size/M Managed by automation to categorize the size of a PR. label Mar 5, 2018
@bflad bflad requested a review from a team March 5, 2018 18:35
@bflad bflad merged commit 8c53ea1 into master Mar 6, 2018
@bflad bflad deleted the b-aws_db_instance-no-dbsubnetgroup-crash branch March 6, 2018 00:55
bflad added a commit that referenced this pull request Mar 6, 2018
@bflad
Copy link
Contributor Author

bflad commented Mar 9, 2018

This has been released in version 1.11.0 of the AWS provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.

@ghost
Copy link

ghost commented Apr 7, 2020

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thanks!

@ghost ghost locked and limited conversation to collaborators Apr 7, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Addresses a defect in current functionality. crash Results from or addresses a Terraform crash or kernel panic. service/rds Issues and PRs that pertain to the rds service. size/M Managed by automation to categorize the size of a PR.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants