-
Notifications
You must be signed in to change notification settings - Fork 9.2k
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
resource/aws_ami_launch_permission: Prevent panic reading public permissions #6224
Conversation
… omission panic Also parallelizes other cases of removing launch permissions and AMI. Previously: ``` === CONT TestAccAWSAMILaunchPermission_Disappears_LaunchPermission_Public panic: runtime error: invalid memory address or nil pointer dereference [signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x2abb7a7] goroutine 1240 [running]: github.com/terraform-providers/terraform-provider-aws/aws.hasLaunchPermission(0xc00000e1e0, 0xc0009a2240, 0x15, 0xc0007aa480, 0xc, 0xc0005c8000, 0xc00099b700, 0x1870888) /Users/bflad/go/src/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ami_launch_permission.go:109 +0x137 github.com/terraform-providers/terraform-provider-aws/aws.resourceAwsAmiLaunchPermissionExists(0xc0005c8000, 0x3e0b7e0, 0xc000c26300, 0xc0005c8000, 0x0, 0x0) /Users/bflad/go/src/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ami_launch_permission.go:41 +0x101 ``` Now: ``` --- PASS: TestAccAWSAMILaunchPermission_Disappears_LaunchPermission (335.48s) --- PASS: TestAccAWSAMILaunchPermission_Disappears_LaunchPermission_Public (345.99s) --- PASS: TestAccAWSAMILaunchPermission_Basic (346.17s) --- PASS: TestAccAWSAMILaunchPermission_Disappears_AMI (353.34s) ```
I have added acceptance testing which now covers the panic. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍
This has been released in version 1.42.0 of the AWS provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. |
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! |
Fixes #6222
Changes proposed in this pull request:
*
since the field might not existPreviously:
Now: