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

Fix the following panic in aws security_group #1492

Merged

Conversation

sakazuki
Copy link
Contributor

IpPermission.IpProtocol can get the value "-1"
https://github.com/aws/aws-sdk-go-v2/blob/main/service/ec2/types/types.go#L7263-L7270

But when IpPermission.IpProtocol is "-1" then, the following panic occurs

2022/09/29 18:34:28 aws importing... sg
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x4d70abf]

goroutine 1 [running]:
github.com/GoogleCloudPlatform/terraformer/providers/aws.fromPort(...)
        /home/runner/work/terraformer/terraformer/providers/aws/sg.go:362

@sakazuki sakazuki force-pushed the fix_aws_security_group branch 2 times, most recently from 20f30de to a23e9e4 Compare October 26, 2022 06:21
```
2022/09/29 18:34:28 aws importing... sg
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x4d70abf]

goroutine 1 [running]:
github.com/GoogleCloudPlatform/terraformer/providers/aws.fromPort(...)
        /home/runner/work/terraformer/terraformer/providers/aws/sg.go:362
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants