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

Crash importing firehose delivery stream #3833

Closed
grahamj opened this issue Mar 19, 2018 · 6 comments · Fixed by #3834
Closed

Crash importing firehose delivery stream #3833

grahamj opened this issue Mar 19, 2018 · 6 comments · Fixed by #3834
Labels
bug Addresses a defect in current functionality. crash Results from or addresses a Terraform crash or kernel panic. service/firehose Issues and PRs that pertain to the firehose service.
Milestone

Comments

@grahamj
Copy link

grahamj commented Mar 19, 2018

Terraform Version

Terraform v0.11.4

  • provider.aws v1.11.0

Affected Resource(s)

  • aws_kinesis_firehose_delivery_stream

Terraform Configuration Files

terraform {
  backend "s3" {}
}

data "terraform_remote_state" "common" {
  # Snipped
}

resource "aws_kinesis_firehose_delivery_stream" "import" {
  # Stuff
}

Panic Output

panic: runtime error: index out of range
2018-03-19T11:05:50.631-0400 [DEBUG] plugin.terraform-provider-aws_v1.11.0_x4:
2018-03-19T11:05:50.631-0400 [DEBUG] plugin.terraform-provider-aws_v1.11.0_x4: goroutine 102 [running]:
2018-03-19T11:05:50.631-0400 [DEBUG] plugin.terraform-provider-aws_v1.11.0_x4: github.com/terraform-providers/terraform-provider-aws/aws.resourceAwsKinesisFirehoseDeliveryStream.func1(0xc4202c05b0, 0x3230a80, 0xc420092a00, 0x24, 0xc4202587a8, 0xc420294001, 0x316e8a0, 0xc4205c99c0)
2018-03-19T11:05:50.631-0400 [DEBUG] plugin.terraform-provider-aws_v1.11.0_x4: 	/opt/teamcity-agent/work/222ea50a1b4f75f4/src/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_kinesis_firehose_delivery_stream.go:383 +0x275
2018-03-19T11:05:50.631-0400 [DEBUG] plugin.terraform-provider-aws_v1.11.0_x4: github.com/terraform-providers/terraform-provider-aws/vendor/github.com/hashicorp/terraform/helper/schema.(*Provider).ImportState(0xc420203f80, 0xc420903770, 0xc4205d1140, 0x36, 0x10be37f, 0x2d7d140, 0x2d7d140, 0xc420064301, 0x6172b20)
2018-03-19T11:05:50.631-0400 [DEBUG] plugin.terraform-provider-aws_v1.11.0_x4: 	/opt/teamcity-agent/work/222ea50a1b4f75f4/src/github.com/terraform-providers/terraform-provider-aws/vendor/github.com/hashicorp/terraform/helper/schema/provider.go:365 +0x322
2018-03-19T11:05:50.631-0400 [DEBUG] plugin.terraform-provider-aws_v1.11.0_x4: github.com/terraform-providers/terraform-provider-aws/vendor/github.com/hashicorp/terraform/plugin.(*ResourceProviderServer).ImportState(0xc420148ac0, 0xc4205c97c0, 0xc4205c99a0, 0x0, 0x0)
2018-03-19T11:05:50.631-0400 [DEBUG] plugin.terraform-provider-aws_v1.11.0_x4: 	/opt/teamcity-agent/work/222ea50a1b4f75f4/src/github.com/terraform-providers/terraform-provider-aws/vendor/github.com/hashicorp/terraform/plugin/resource_provider.go:560 +0x5d
2018-03-19T11:05:50.631-0400 [DEBUG] plugin.terraform-provider-aws_v1.11.0_x4: reflect.Value.call(0xc420304900, 0xc420512118, 0x13, 0x364b02f, 0x4, 0xc4205faf20, 0x3, 0x3, 0x8, 0xc4205f2e80, ...)
2018-03-19T11:05:50.631-0400 [DEBUG] plugin.terraform-provider-aws_v1.11.0_x4: 	/usr/local/go/src/reflect/value.go:434 +0x905
2018-03-19T11:05:50.631-0400 [DEBUG] plugin.terraform-provider-aws_v1.11.0_x4: reflect.Value.Call(0xc420304900, 0xc420512118, 0x13, 0xc4205f2f20, 0x3, 0x3, 0xc4205f2f20, 0xc4205f2f28, 0xc4205ca900)
2018-03-19T11:05:50.631-0400 [DEBUG] plugin.terraform-provider-aws_v1.11.0_x4: 	/usr/local/go/src/reflect/value.go:302 +0xa4
2018-03-19T11:05:50.631-0400 [DEBUG] plugin.terraform-provider-aws_v1.11.0_x4: net/rpc.(*service).call(0xc42037e140, 0xc420364230, 0xc420014898, 0xc420386780, 0xc420532460, 0x2d7d100, 0xc4205c97c0, 0x16, 0x2d7d140, 0xc4205c99a0, ...)
2018-03-19T11:05:50.631-0400 [DEBUG] plugin.terraform-provider-aws_v1.11.0_x4: 	/usr/local/go/src/net/rpc/server.go:381 +0x142
2018-03-19T11:05:50.631-0400 [DEBUG] plugin.terraform-provider-aws_v1.11.0_x4: created by net/rpc.(*Server).ServeCodec
2018-03-19T11:05:50.631-0400 [DEBUG] plugin.terraform-provider-aws_v1.11.0_x4: 	/usr/local/go/src/net/rpc/server.go:475 +0x36b
2018/03/19 11:05:50 [ERROR] root: eval: *terraform.EvalImportState, err: import aws_kinesis_firehose_delivery_stream.import (id: arn:aws:firehose:us-east1:XXXXXXXXX:XXXXXXXXX): unexpected EOF
2018/03/19 11:05:50 [ERROR] root: eval: *terraform.EvalSequence, err: import aws_kinesis_firehose_delivery_stream.import (id: arn:aws:firehose:us-east1:XXXXXXXXX:XXXXXXXXX): unexpected EOF
2018/03/19 11:05:50 [TRACE] [walkImport] Exiting eval tree: aws_kinesis_firehose_delivery_stream.import (import id: arn:aws:firehose:us-east1:XXXXXXXXX:XXXXXXXXX)
2018/03/19 11:05:50 [TRACE] dag/walk: upstream errored, not walking "provider.aws (close)"
2018/03/19 11:05:50 [TRACE] dag/walk: upstream errored, not walking "root"
2018/03/19 11:05:50 [DEBUG] plugin: waiting for all plugin processes to complete...
2018-03-19T11:05:50.634-0400 [WARN ] plugin: error closing client during Kill: err="connection is shut down"
2018-03-19T11:05:50.638-0400 [DEBUG] plugin: plugin process exited: path=blah/.terraform/plugins/darwin_amd64/terraform-provider-aws_v1.11.0_x4

Command

AWS_PROFILE=XXX terraform import aws_kinesis_firehose_delivery_stream.import arn:aws:firehose:us-east1:XXXXXXXXX:XXXXX

Sorry, I don't have time right now to sanitize the crash.log but if you really need it just shout. Hopefully the above should point you in the right direction.

@bflad bflad added bug Addresses a defect in current functionality. crash Results from or addresses a Terraform crash or kernel panic. service/firehose Issues and PRs that pertain to the firehose service. labels Mar 19, 2018
@bflad
Copy link
Contributor

bflad commented Mar 19, 2018

@grahamj its crashing due to a missing / in the last section of ARN you provided. Can you double check it matches the expected stream ARN format or if your ARN for some reason does not match this format?

arn:PARTITION:firehose:REGION:ACCOUNTID:deliverystream/example

In the meantime, I'll submit a PR that correctly returns the error instead of the panic.

@bflad
Copy link
Contributor

bflad commented Mar 19, 2018

This PR will provide an error message instead of panic on import ARNs missing deliverystream/: #3834

@bflad bflad added this to the v1.12.0 milestone Mar 19, 2018
@bflad
Copy link
Contributor

bflad commented Mar 20, 2018

The fix for the aws_kinesis_firehose_delivery_stream import to correctly throw an error instead of panic has been merged into master and will release with v1.12.0 of the AWS provider, likely later this week. 👍

@bflad
Copy link
Contributor

bflad commented Mar 23, 2018

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

@grahamj
Copy link
Author

grahamj commented Mar 27, 2018

Oops I guess that was my bad providing an invalid ARN. An improved error message will certainly be helpful next time. Thanks!

@ghost
Copy link

ghost commented Apr 7, 2020

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!

@ghost ghost locked and limited conversation to collaborators Apr 7, 2020
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/firehose Issues and PRs that pertain to the firehose service.
Projects
None yet
2 participants