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

tests/autoscaling_launch_configuration: TestAccAutoScalingLaunchConfiguration_RootBlockDevice_amiDisappears panic #22971

Closed
anGie44 opened this issue Feb 6, 2022 · 2 comments · Fixed by #22972
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

@anGie44
Copy link
Contributor

anGie44 commented Feb 6, 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

Terraform CLI and Terraform AWS Provider Version

Affected Resource(s)

  • aws_ami_copy

Test panic output

------- Stdout: -------
=== RUN   TestAccAutoScalingLaunchConfiguration_RootBlockDevice_amiDisappears
=== PAUSE TestAccAutoScalingLaunchConfiguration_RootBlockDevice_amiDisappears
=== CONT  TestAccAutoScalingLaunchConfiguration_RootBlockDevice_amiDisappears

------- Stderr: -------
panic: Invalid address to set: []string{"boot_mode"}

goroutine 459 [running]:
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*ResourceData).Set(0xc002290700, {0x89fd455, 0x9}, {0x68a7200, 0x0})
	/var/lib/teamcity/go/pkg/mod/github.com/hashicorp/terraform-plugin-sdk/v2@v2.10.1/helper/schema/resource_data.go:230 +0x2a5
github.com/hashicorp/terraform-provider-aws/internal/service/ec2.resourceAMIRead(0xc002290700, {0x76ef580, 0xc000f36a80})
	/opt/teamcity-agent/work/87cd0779df5e20c9/internal/service/ec2/ami.go:426 +0x6f0
github.com/hashicorp/terraform-provider-aws/internal/service/ec2.resourceAMICopyCreate(0xc002290700, {0x76ef580, 0xc000f36a80})
	/opt/teamcity-agent/work/87cd0779df5e20c9/internal/service/ec2/ami_copy.go:285 +0x6de
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).create(0xc0022ae8a0, {0x99b0678, 0xc002680f40}, 0x2, {0x76ef580, 0xc000f36a80})
	/var/lib/teamcity/go/pkg/mod/github.com/hashicorp/terraform-plugin-sdk/v2@v2.10.1/helper/schema/resource.go:329 +0x178
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).Apply(0xc00098a0e0, {0x99b0678, 0xc002680f40}, 0xc0022dc9c0, 0xc002290580, {0x76ef580, 0xc000f36a80})
	/var/lib/teamcity/go/pkg/mod/github.com/hashicorp/terraform-plugin-sdk/v2@v2.10.1/helper/schema/resource.go:467 +0x871
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*GRPCProviderServer).ApplyResourceChange(0xc00279bc80, {0x99b0678, 0xc002680f40}, 0xc002a54c80)
	/var/lib/teamcity/go/pkg/mod/github.com/hashicorp/terraform-plugin-sdk/v2@v2.10.1/helper/schema/grpc_provider.go:977 +0xd8a
github.com/hashicorp/terraform-plugin-go/tfprotov5/tf5server.(*server).ApplyResourceChange(0xc00175b200, {0x99b0720, 0xc002a4ff20}, 0xc002a742a0)
	/var/lib/teamcity/go/pkg/mod/github.com/hashicorp/terraform-plugin-go@v0.5.0/tfprotov5/tf5server/server.go:603 +0x30e
github.com/hashicorp/terraform-plugin-go/tfprotov5/internal/tfplugin5._Provider_ApplyResourceChange_Handler({0x87a4320, 0xc00175b200}, {0x99b0720, 0xc002a4ff20}, 0xc002a4bce0, 0x0)
	/var/lib/teamcity/go/pkg/mod/github.com/hashicorp/terraform-plugin-go@v0.5.0/tfprotov5/internal/tfplugin5/tfplugin5_grpc.pb.go:380 +0x170
google.golang.org/grpc.(*Server).processUnaryRPC(0xc001024e00, {0x9aa3ec8, 0xc002fb3080}, 0xc0023f0b00, 0xc0022b0ae0, 0xf06e320, 0x0)
	/var/lib/teamcity/go/pkg/mod/google.golang.org/grpc@v1.32.0/server.go:1194 +0xc8f
google.golang.org/grpc.(*Server).handleStream(0xc001024e00, {0x9aa3ec8, 0xc002fb3080}, 0xc0023f0b00, 0x0)
	/var/lib/teamcity/go/pkg/mod/google.golang.org/grpc@v1.32.0/server.go:1517 +0xa2a
google.golang.org/grpc.(*Server).serveStreams.func1.2()
	/var/lib/teamcity/go/pkg/mod/google.golang.org/grpc@v1.32.0/server.go:859 +0x98
created by google.golang.org/grpc.(*Server).serveStreams.func1
	/var/lib/teamcity/go/pkg/mod/google.golang.org/grpc@v1.32.0/server.go:857 +0x294

Notes:

  • Additional tests are failing with a similar error:
    • TestAccEC2AMIFromInstance_
    • TestAccEC2AMILaunchPermission_
    • TestAccEC2AMICopy_

Relates:

Code reference:

@anGie44 anGie44 added bug Addresses a defect in current functionality. crash Results from or addresses a Terraform crash or kernel panic. labels Feb 6, 2022
@github-actions github-actions bot added the service/ec2 Issues and PRs that pertain to the ec2 service. label Feb 6, 2022
@anGie44 anGie44 added this to the v4.0.0 milestone Feb 6, 2022
@github-actions
Copy link

This functionality has been released in v4.0.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 16, 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