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

[Bug]: Crash while trying to add a Timestream table to my infrastructure #38504

Closed
TheCois opened this issue Jul 24, 2024 · 4 comments · Fixed by #38512
Closed

[Bug]: Crash while trying to add a Timestream table to my infrastructure #38504

TheCois opened this issue Jul 24, 2024 · 4 comments · Fixed by #38512
Assignees
Labels
bug Addresses a defect in current functionality. crash Results from or addresses a Terraform crash or kernel panic. service/timestreamwrite Issues and PRs that pertain to the timestreamwrite service.
Milestone

Comments

@TheCois
Copy link

TheCois commented Jul 24, 2024

Terraform Core Version

1.9.2

AWS Provider Version

5.59.0

Affected Resource(s)

I am running the following Terraform script

provider "aws" {
  region = "eu-west-1"
}

resource "aws_timestreamwrite_database" "samples_db" {
  database_name = "NewSamplesDB"
}

resource "aws_timestreamwrite_table" "main_table" {
  database_name = aws_timestreamwrite_database.samples_db.database_name
  table_name    = "DataPoints"

  magnetic_store_write_properties {
    enable_magnetic_store_writes = true
  }

  retention_properties {
    magnetic_store_retention_period_in_days = 365
    memory_store_retention_period_in_hours  = 8
  }
}

Expected Behavior

The command should return with a success response.
A new Database should be created in my AWS account, and within that Database, a Table called Datapoints should be created.

Actual Behavior

The command line shows:

Plan: 2 to add, 0 to change, 0 to destroy.
aws_timestreamwrite_database.samples_db: Creating...
aws_timestreamwrite_database.samples_db: Creation complete after 1s [id=NewSamplesDB]
aws_timestreamwrite_table.main_table: Creating...

And then a crash report (as provided below)

Relevant Error/Panic Output Snippet

╷
│ Error: Plugin did not respond
│
│   with aws_timestreamwrite_table.main_table,
│   on main.tf line 10, in resource "aws_timestreamwrite_table" "main_table":
│   10: resource "aws_timestreamwrite_table" "main_table" {
│
│ The plugin encountered an error, and failed to respond to the
│ plugin.(*GRPCProvider).ApplyResourceChange call. The plugin logs may contain
│ more details.
╵

Stack trace from the terraform-provider-aws_v5.59.0_x5 plugin:

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

goroutine 104 [running]:
github.com/hashicorp/terraform-provider-aws/internal/service/timestreamwrite.resourceTableRead({0x1ab870c8, 0xc003388120}, 0xc002e3c180, {0x1a8d3a00?, 0xc002f4ea90?})
	github.com/hashicorp/terraform-provider-aws/internal/service/timestreamwrite/table.go:236 +0x318
github.com/hashicorp/terraform-provider-aws/internal/service/timestreamwrite.resourceTableCreate({0x1ab870c8, 0xc003388120}, 0xc002e3c180, {0x1a8d3a00, 0xc002f4ea90})
	github.com/hashicorp/terraform-provider-aws/internal/service/timestreamwrite/table.go:216 +0x5d2
github.com/hashicorp/terraform-provider-aws/internal/provider.New.(*wrappedResource).Create.interceptedHandler[...].func8(0xc002e3c180?, {0x1a8d3a00?, 0xc002f4ea90})
	github.com/hashicorp/terraform-provider-aws/internal/provider/intercept.go:113 +0x283
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).create(0x1ab870c8?, {0x1ab870c8?, 0xc0031db770?}, 0xd?, {0x1a8d3a00?, 0xc002f4ea90?})
	github.com/hashicorp/terraform-plugin-sdk/v2@v2.34.0/helper/schema/resource.go:801 +0x7a
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).Apply(0xc0032dc8c0, {0x1ab870c8, 0xc0031db770}, 0xc0031311e0, 0xc002e3c000, {0x1a8d3a00, 0xc002f4ea90})
	github.com/hashicorp/terraform-plugin-sdk/v2@v2.34.0/helper/schema/resource.go:937 +0xa89
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*GRPCProviderServer).ApplyResourceChange(0xc00162b080, {0x1ab870c8?, 0xc0031db6b0?}, 0xc0031f0320)
	github.com/hashicorp/terraform-plugin-sdk/v2@v2.34.0/helper/schema/grpc_provider.go:1153 +0xd5c
github.com/hashicorp/terraform-plugin-mux/tf5muxserver.(*muxServer).ApplyResourceChange(0xc00154f730, {0x1ab870c8?, 0xc0031db3e0?}, 0xc0031f0320)
	github.com/hashicorp/terraform-plugin-mux@v0.16.0/tf5muxserver/mux_server_ApplyResourceChange.go:36 +0x193
github.com/hashicorp/terraform-plugin-go/tfprotov5/tf5server.(*server).ApplyResourceChange(0xc0014ba960, {0x1ab870c8?, 0xc0031dac00?}, 0xc001382c40)
	github.com/hashicorp/terraform-plugin-go@v0.23.0/tfprotov5/tf5server/server.go:865 +0x3d0
github.com/hashicorp/terraform-plugin-go/tfprotov5/internal/tfplugin5._Provider_ApplyResourceChange_Handler({0x1a6a7140, 0xc0014ba960}, {0x1ab870c8, 0xc0031dac00}, 0xc002f45d00, 0x0)
	github.com/hashicorp/terraform-plugin-go@v0.23.0/tfprotov5/internal/tfplugin5/tfplugin5_grpc.pb.go:518 +0x1a6
google.golang.org/grpc.(*Server).processUnaryRPC(0xc000333800, {0x1ab870c8, 0xc0031dab70}, {0x1abe74c0, 0xc000dcd980}, 0xc0031c79e0, 0xc003eb9c80, 0x242eb138, 0x0)
	google.golang.org/grpc@v1.63.2/server.go:1369 +0xdf8
google.golang.org/grpc.(*Server).handleStream(0xc000333800, {0x1abe74c0, 0xc000dcd980}, 0xc0031c79e0)
	google.golang.org/grpc@v1.63.2/server.go:1780 +0xe8b
google.golang.org/grpc.(*Server).serveStreams.func2.1()
	google.golang.org/grpc@v1.63.2/server.go:1019 +0x8b
created by google.golang.org/grpc.(*Server).serveStreams.func2 in goroutine 43
	google.golang.org/grpc@v1.63.2/server.go:1030 +0x125

Error: The terraform-provider-aws_v5.59.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.

Terraform Configuration Files

https://gist.github.com/TheCois/16f236034dfa4bd8ddd9c51ff4397be6

Steps to Reproduce

Have Terraform 1.9.2 installed
Have the AWS provider 5.59.0 installed
Create a subfolder containing the main.tf file (for which the gist link was provided above)

Run the commands:

terraform init
terraform apply -auto-approve

Debug Output

No response

Panic Output

No response

Important Factoids

No response

References

No response

Would you like to implement a fix?

None

@TheCois TheCois added the bug Addresses a defect in current functionality. label Jul 24, 2024
@github-actions github-actions bot added the crash Results from or addresses a Terraform crash or kernel panic. label Jul 24, 2024
Copy link

Community Note

Voting for Prioritization

  • Please vote on this issue by adding a 👍 reaction to the original post to help the community and maintainers prioritize this request.
  • Please see our prioritization guide for information on how we prioritize.
  • 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.

Volunteering to Work on This Issue

  • If you are interested in working on this issue, please leave a comment.
  • If this would be your first contribution, please review the contribution guide.

@github-actions github-actions bot added the service/timestreamwrite Issues and PRs that pertain to the timestreamwrite service. label Jul 24, 2024
@terraform-aws-provider terraform-aws-provider bot added the needs-triage Waiting for first response or review from a maintainer. label Jul 24, 2024
@ewbankkit ewbankkit removed the needs-triage Waiting for first response or review from a maintainer. label Jul 24, 2024
@ewbankkit ewbankkit self-assigned this Jul 24, 2024
@terraform-aws-provider terraform-aws-provider bot added the prioritized Part of the maintainer teams immediate focus. To be addressed within the current quarter. label Jul 24, 2024
Copy link

Warning

This issue has been closed, meaning that any additional comments are hard for our team to see. Please assume that the maintainers will not see them.

Ongoing conversations amongst community members are welcome, however, the issue will be locked after 30 days. Moving conversations to another venue, such as the AWS Provider forum, is recommended. If you have additional concerns, please open a new issue, referencing this one where needed.

@github-actions github-actions bot added this to the v5.60.0 milestone Jul 24, 2024
@github-actions github-actions bot removed the prioritized Part of the maintainer teams immediate focus. To be addressed within the current quarter. label Jul 25, 2024
Copy link

This functionality has been released in v5.60.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!

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 Aug 26, 2024
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/timestreamwrite Issues and PRs that pertain to the timestreamwrite service.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants