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

aws_ec2_availability_zone_group create crashes provider v4.10.0 #24391

Closed
ewbankkit opened this issue Apr 25, 2022 · 2 comments · Fixed by #24422
Closed

aws_ec2_availability_zone_group create crashes provider v4.10.0 #24391

ewbankkit opened this issue Apr 25, 2022 · 2 comments · Fixed by #24422
Assignees
Labels
bug Addresses a defect in current functionality. crash Results from or addresses a Terraform crash or kernel panic. service/ec2 Issues and PRs that pertain to the ec2 service.
Milestone

Comments

@ewbankkit
Copy link
Contributor

ewbankkit commented Apr 25, 2022

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment
resource "aws_ec2_availability_zone_group" "example" {
  group_name    = "test"
  opt_in_status = "opted-in"
}
Stack trace from the terraform-provider-aws_v4.10.0_x5 plugin:

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x28 pc=0x5abad96]

goroutine 131 [running]:
github.com/hashicorp/terraform-provider-aws/internal/service/ec2.resourceAvailabilityZoneGroupRead(0xc002129d80, {0x7997760, 0xc00073e000})
	github.com/hashicorp/terraform-provider-aws/internal/service/ec2/availability_zone_group.go:88 +0x216
github.com/hashicorp/terraform-provider-aws/internal/service/ec2.resourceAvailabilityZoneGroupCreate(0xc002129d80, {0x7997760, 0xc00073e000})
	github.com/hashicorp/terraform-provider-aws/internal/service/ec2/availability_zone_group.go:55 +0xff
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).create(0x9cfc600, {0x9cfc600, 0xc002137710}, 0xd, {0x7997760, 0xc00073e000})
	github.com/hashicorp/terraform-plugin-sdk/v2@v2.13.0/helper/schema/resource.go:696 +0x178
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).Apply(0xc000eb4fc0, {0x9cfc600, 0xc002137710}, 0xc00213e340, 0xc002129c00, {0x7997760, 0xc00073e000})
	github.com/hashicorp/terraform-plugin-sdk/v2@v2.13.0/helper/schema/resource.go:838 +0x9ba
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*GRPCProviderServer).ApplyResourceChange(0xc00000ca80, {0x9cfc558, 0xc00212acc0}, 0xc002132a50)
	github.com/hashicorp/terraform-plugin-sdk/v2@v2.13.0/helper/schema/grpc_provider.go:1021 +0xe3c
github.com/hashicorp/terraform-plugin-go/tfprotov5/tf5server.(*server).ApplyResourceChange(0xc001f51040, {0x9cfc600, 0xc002136e70}, 0xc00078abd0)
	github.com/hashicorp/terraform-plugin-go@v0.8.0/tfprotov5/tf5server/server.go:812 +0x56b
github.com/hashicorp/terraform-plugin-go/tfprotov5/internal/tfplugin5._Provider_ApplyResourceChange_Handler({0x8a8f8c0, 0xc001f51040}, {0x9cfc600, 0xc002136e70}, 0xc002130660, 0x0)
	github.com/hashicorp/terraform-plugin-go@v0.8.0/tfprotov5/internal/tfplugin5/tfplugin5_grpc.pb.go:385 +0x170
google.golang.org/grpc.(*Server).processUnaryRPC(0xc000220fc0, {0x9df9c80, 0xc0018e1860}, 0xc002138360, 0xc001f57230, 0xf54c4a0, 0x0)
	google.golang.org/grpc@v1.45.0/server.go:1282 +0xccf
google.golang.org/grpc.(*Server).handleStream(0xc000220fc0, {0x9df9c80, 0xc0018e1860}, 0xc002138360, 0x0)
	google.golang.org/grpc@v1.45.0/server.go:1619 +0xa2a
google.golang.org/grpc.(*Server).serveStreams.func1.2()
	google.golang.org/grpc@v1.45.0/server.go:921 +0x98
created by google.golang.org/grpc.(*Server).serveStreams.func1
	google.golang.org/grpc@v1.45.0/server.go:919 +0x294

Error: The terraform-provider-aws_v4.10.0_x5 plugin crashed!

This is always indicative of a bug within the plugin. It would be immensely
helpful if you could report the crash with the plugin's maintainers so that it
can be fixed. The output above should help diagnose the issue.

╷
│ Error: Plugin did not respond
│ 
│   with module.terraform-aws-availability-zone-group.aws_ec2_availability_zone_group.availability_zone_group,
│   on .terraform/modules/terraform-aws-availability-zone-group/main.tf line 1, in resource "aws_ec2_availability_zone_group" "availability_zone_group":
│    1: resource "aws_ec2_availability_zone_group" "availability_zone_group" {
│ 
│ The plugin encountered an error, and failed to respond to the
│ plugin.(*GRPCProvider).ApplyResourceChange call. The plugin logs may
│ contain more details.
╵
2022-04-18T15:12:21.076Z [DEBUG] provider: plugin exited

func resourceAvailabilityZoneGroupRead(d *schema.ResourceData, meta interface{}) error {
conn := meta.(*conns.AWSClient).EC2Conn
availabilityZone, err := ec2DescribeAvailabilityZoneGroup(conn, d.Id())
if err != nil {
return fmt.Errorf("error describing EC2 Availability Zone Group (%s): %w", d.Id(), err)
}
if aws.StringValue(availabilityZone.OptInStatus) == ec2.AvailabilityZoneOptInStatusOptInNotRequired {
return fmt.Errorf("unnecessary handling of EC2 Availability Zone Group (%s), status: %s", d.Id(), ec2.AvailabilityZoneOptInStatusOptInNotRequired)
}

@github-actions github-actions bot added bug Addresses a defect in current functionality. crash Results from or addresses a Terraform crash or kernel panic. service/ec2 Issues and PRs that pertain to the ec2 service. labels Apr 25, 2022
@ewbankkit ewbankkit self-assigned this Apr 25, 2022
@github-actions github-actions bot added this to the v4.12.0 milestone Apr 26, 2022
@github-actions
Copy link

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

For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you!

@github-actions
Copy link

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 have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 29, 2022
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/ec2 Issues and PRs that pertain to the ec2 service.
Projects
None yet
1 participant