hashicorp / terraform-provider-aws

The AWS Provider enables Terraform to manage AWS resources.
https://registry.terraform.io/providers/hashicorp/aws
Mozilla Public License 2.0
9.81k stars 9.16k forks source link

Terraform crash error:TERRAFORM CRASH #4278

Closed shuqichen closed 6 years ago

shuqichen commented 6 years ago

Hi there,

Thank you for opening an issue. Please note that we try to keep the Terraform issue tracker reserved for bug reports and feature requests. For general usage questions, please see: https://www.terraform.io/community.html.

Terraform Version

C02VVAHYHTD6:prod chenshu$ terraform -v Terraform v0.11.3

Your version of Terraform is out of date! The latest version is 0.11.7. You can update by downloading from www.terraform.io/downloads.html

Affected Resource(s)

all aws resources.

Debug Output

C02VVAHYHTD6:prod chenshu$ terraform plan -target=module.web3-302 Refreshing Terraform state in-memory prior to plan... The refreshed state will be used to calculate this plan, but will not be persisted to local or remote state storage.

aws_security_group.tr_elb_sg: Refreshing state... (ID: sg-5049b52f) aws_iam_role.tr_web_role: Refreshing state... (ID: tr_web_role) aws_alb_target_group.tr_tg_prod: Refreshing state... (ID: arn:aws:elasticloadbalancing:us-east-1:.../tr-alb-tg-bearhug302/0c72c1e12d5de228) aws_s3_bucket.tr_chef_config: Refreshing state... (ID: tr_chef_config_prod) aws_iam_instance_profile.tr_webIprofile: Refreshing state... (ID: tr_web_Iprofile) aws_security_group.tr_web_sg: Refreshing state... (ID: sg-4949b536) aws_alb.tr_v3_alb: Refreshing state... (ID: arn:aws:elasticloadbalancing:us-east-1:...alancer/app/tr-alb-v3/5abe3f9fcbadf44c) aws_alb_listener.http_listener: Refreshing state... (ID: arn:aws:elasticloadbalancing:us-east-1:...b-v3/5abe3f9fcbadf44c/fa7c59c938ef0878)

Error: Error refreshing state: 1 error(s) occurred:

panic: interface conversion: interface {} is nil, not s3.GetBucketLifecycleConfigurationOutput 2018-04-19T20:18:24.227+0800 [DEBUG] plugin.terraform-provider-aws_v1.15.0_x4: 2018-04-19T20:18:24.227+0800 [DEBUG] plugin.terraform-provider-aws_v1.15.0_x4: goroutine 61 [running]: 2018-04-19T20:18:24.227+0800 [DEBUG] plugin.terraform-provider-aws_v1.15.0_x4: github.com/terraform-providers/terraform-provider-aws/aws.resourceAwsS3BucketRead(0xc42026aaf0, 0x33854c0, 0xc4200b6000, 0xc42026aaf0, 0x0) 2018-04-19T20:18:24.227+0800 [DEBUG] plugin.terraform-provider-aws_v1.15.0_x4: /opt/teamcity-agent/work/222ea50a1b4f75f4/src/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_s3_bucket.go:894 +0x5b98 2018-04-19T20:18:24.227+0800 [DEBUG] plugin.terraform-provider-aws_v1.15.0_x4: github.com/terraform-providers/terraform-provider-aws/vendor/github.com/hashicorp/terraform/helper/schema.(Resource).Refresh(0xc4202c7570, 0xc4206f06e0, 0x33854c0, 0xc4200b6000, 0xc420830e78, 0xc4203a2a01, 0x800010825a2) 2018-04-19T20:18:24.227+0800 [DEBUG] plugin.terraform-provider-aws_v1.15.0_x4: /opt/teamcity-agent/work/222ea50a1b4f75f4/src/github.com/terraform-providers/terraform-provider-aws/vendor/github.com/hashicorp/terraform/helper/schema/resource.go:354 +0x17e 2018-04-19T20:18:24.227+0800 [DEBUG] plugin.terraform-provider-aws_v1.15.0_x4: github.com/terraform-providers/terraform-provider-aws/vendor/github.com/hashicorp/terraform/helper/schema.(Provider).Refresh(0xc42034b030, 0xc4206f05f0, 0xc4206f06e0, 0x64bdf78, 0x0, 0x2a5) 2018-04-19T20:18:24.227+0800 [DEBUG] plugin.terraform-provider-aws_v1.15.0_x4: /opt/teamcity-agent/work/222ea50a1b4f75f4/src/github.com/terraform-providers/terraform-provider-aws/vendor/github.com/hashicorp/terraform/helper/schema/provider.go:308 +0x9a 2018-04-19T20:18:24.227+0800 [DEBUG] plugin.terraform-provider-aws_v1.15.0_x4: github.com/terraform-providers/terraform-provider-aws/vendor/github.com/hashicorp/terraform/plugin.(ResourceProviderServer).Refresh(0xc42082e700, 0xc42073fb80, 0xc42073fc50, 0x0, 0x0) 2018-04-19T20:18:24.227+0800 [DEBUG] plugin.terraform-provider-aws_v1.15.0_x4: /opt/teamcity-agent/work/222ea50a1b4f75f4/src/github.com/terraform-providers/terraform-provider-aws/vendor/github.com/hashicorp/terraform/plugin/resource_provider.go:549 +0x4e 2018-04-19T20:18:24.227+0800 [DEBUG] plugin.terraform-provider-aws_v1.15.0_x4: reflect.Value.call(0xc4203a4cc0, 0xc420186070, 0x13, 0x37c93a6, 0x4, 0xc4203a2f20, 0x3, 0x3, 0x0, 0x0, ...) 2018-04-19T20:18:24.228+0800 [DEBUG] plugin.terraform-provider-aws_v1.15.0_x4: /usr/local/go/src/reflect/value.go:434 +0x905 2018-04-19T20:18:24.228+0800 [DEBUG] plugin.terraform-provider-aws_v1.15.0_x4: reflect.Value.Call(0xc4203a4cc0, 0xc420186070, 0x13, 0xc4204a9720, 0x3, 0x3, 0x0, 0x0, 0x0) 2018-04-19T20:18:24.228+0800 [DEBUG] plugin.terraform-provider-aws_v1.15.0_x4: /usr/local/go/src/reflect/value.go:302 +0xa4 2018-04-19T20:18:24.228+0800 [DEBUG] plugin.terraform-provider-aws_v1.15.0_x4: net/rpc.(service).call(0xc42016a3c0, 0xc420182190, 0xc42018c120, 0xc4201d8580, 0xc42071e300, 0x2ea0be0, 0xc42073fb80, 0x16, 0x2ea0c20, 0xc42073fc50, ...) 2018-04-19T20:18:24.228+0800 [DEBUG] plugin.terraform-provider-aws_v1.15.0_x4: /usr/local/go/src/net/rpc/server.go:381 +0x142 2018-04-19T20:18:24.228+0800 [DEBUG] plugin.terraform-provider-aws_v1.15.0_x4: created by net/rpc.(Server).ServeCodec 2018-04-19T20:18:24.228+0800 [DEBUG] plugin.terraform-provider-aws_v1.15.0_x4: /usr/local/go/src/net/rpc/server.go:475 +0x36b 2018/04/19 20:18:24 [ERROR] root.s3: eval: terraform.EvalRefresh, err: aws_s3_bucket.tr_chef_config: unexpected EOF 2018/04/19 20:18:24 [ERROR] root.s3: eval: terraform.EvalSequence, err: aws_s3_bucket.tr_chef_config: unexpected EOF 2018/04/19 20:18:24 [TRACE] [walkRefresh] Exiting eval tree: module.s3.aws_s3_bucket.tr_chef_config 2018/04/19 20:18:24 [TRACE] dag/walk: upstream errored, not walking "module.s3.output.chef_bucket_name" 2018/04/19 20:18:24 [TRACE] dag/walk: upstream errored, not walking "module.web3-302.var.chef_bucket_name" 2018/04/19 20:18:24 [TRACE] dag/walk: upstream errored, not walking "module.web3-302.data.template_file.web-userdata" 2018/04/19 20:18:24 [TRACE] dag/walk: upstream errored, not walking "module.s3.output.chef_bucket_arn" 2018/04/19 20:18:24 [TRACE] dag/walk: upstream errored, not walking "provider.template (close)" 2018/04/19 20:18:24 [TRACE] dag/walk: upstream errored, not walking "module.web3-302.aws_launch_configuration.tr_lc_prod" 2018/04/19 20:18:24 [TRACE] dag/walk: upstream errored, not walking "module.web3-302.aws_autoscaling_group.tr_asg_prod" 2018/04/19 20:18:24 [TRACE] dag/walk: upstream errored, not walking "module.web3-302.output.tr_lc_prod" 2018/04/19 20:18:24 [TRACE] dag/walk: upstream errored, not walking "module.web3-302.output.tr_asg_prod" 2018/04/19 20:18:24 [TRACE] dag/walk: upstream errored, not walking "module.web3-302.aws_autoscaling_attachment.asg_attachment_prod" 2018/04/19 20:18:24 [TRACE] dag/walk: upstream errored, not walking "provider.aws (close)" 2018/04/19 20:18:24 [TRACE] dag/walk: upstream errored, not walking "root" 2018/04/19 20:18:24 [DEBUG] plugin: waiting for all plugin processes to complete... 2018-04-19T20:18:24.231+0800 [DEBUG] plugin: plugin process exited: path=/Users/chenshu/Documents/GitHub/tr_service/translation-chef-data/provisioning-vpc/prod/.terraform/plugins/darwin_amd64/terraform-provider-aws_v1.15.0_x4 2018-04-19T20:18:24.233+0800 [WARN ] plugin: error closing client during Kill: err="connection is shut down" 2018-04-19T20:18:24.235+0800 [DEBUG] plugin: plugin process exited: path=/Users/chenshu/Documents/GitHub/tr_service/translation-chef-data/provisioning-vpc/prod/.terraform/plugins/darwin_amd64/terraform-provider-template_v1.0.0_x4

!!!!!!!!!!!!!!!!!!!!!!!!!!! TERRAFORM CRASH !!!!!!!!!!!!!!!!!!!!!!!!!!!!

Terraform crashed! This is always indicative of a bug within Terraform. A crash log has been placed at "crash.log" relative to your current working directory. It would be immensely helpful if you could please report the crash with Terraform1 so that we can fix this.

When reporting bugs, please include your terraform version. That information is available on the first line of crash.log. You can also get it by running 'terraform --version' on the command line.

!!!!!!!!!!!!!!!!!!!!!!!!!!! TERRAFORM CRASH !!!!!!!!!!!!!!!!!!!!!!!!!!!!

Panic Output

crash.log

Expected Behavior

terraform plan -target=module.XX should success.

Actual Behavior

Terraform Crashed

Steps to Reproduce

Please list the steps required to reproduce the issue, for example:

  1. terraform plan or 'terraform apply'
bflad commented 6 years ago

Bugfix PR submitted: #4282

bflad commented 6 years ago

The fix for this has been merged into master and will release with v1.16.0 of the AWS provider, likely in a few days.

bflad commented 6 years ago

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

ghost commented 4 years ago

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!