hashicorp / terraform

Terraform enables you to safely and predictably create, change, and improve infrastructure. It is a source-available tool that codifies APIs into declarative configuration files that can be shared amongst team members, treated as code, edited, reviewed, and versioned.
https://www.terraform.io
Other
42.8k stars 9.56k forks source link

Plan crash in TFE #21787

Closed lizthegrey closed 4 years ago

lizthegrey commented 5 years ago

Terraform v0.11.13

Configuring remote state backend...
Initializing Terraform configuration...
2019/06/18 22:06:27 [DEBUG] Using modified User-Agent: Terraform/0.11.13 TFE/3a2e27b
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.

data.terraform_remote_state.master_state: Refreshing state...
data.template_file.env_subnet_name: Refreshing state...
data.template_file.env_identifier_subnet_name: Refreshing state...
data.template_file.env_identifier_subnet_name: Refreshing state...
data.template_file.env_subnet_name: Refreshing state...
aws_cloudwatch_log_group.log_group: Refreshing state... (ID: /aws/vpc/production-flow-logs)
aws_db_parameter_group.mysql_rds_options: Refreshing state... (ID: production-honeycomb-mysql-params)
aws_vpc.mod: Refreshing state... (ID: vpc-e1aa9285)
aws_elasticache_parameter_group.redis_elasticache_options: Refreshing state... (ID: production-banners-params)
aws_iam_role.flow_log_role: Refreshing state... (ID: production-flow-log-role)
aws_db_option_group.production_mysql_options: Refreshing state... (ID: production-mysql-options)
aws_route53_zone.subdomain_ext: Refreshing state... (ID: Z2LO3SNQDNZXM2)
aws_db_parameter_group.mysql_rds_options: Refreshing state... (ID: production-util-mysql-params)
aws_eip.nat_eip[0]: Refreshing state... (ID: eipalloc-936981f4)
aws_eip.nat_eip[1]: Refreshing state... (ID: eipalloc-20789047)
aws_eip.nat_eip[2]: Refreshing state... (ID: eipalloc-6316fe04)
aws_eip.nat_eip[3]: Refreshing state... (ID: eipalloc-c16c84a6)
aws_api_gateway_rest_api.api: Refreshing state... (ID: mstc99hfd5)
aws_iam_role.production_mysql_rds_logs_role: Refreshing state... (ID: production-mysql-rds-logs-role)
aws_elasticache_parameter_group.redis_elasticache_options: Refreshing state... (ID: production-ratelims-params)
aws_route53_zone.subdomain_int: Refreshing state... (ID: Z26T2YNEZYN3TF)
aws_db_parameter_group.mysql_rds_options: Refreshing state... (ID: production-honeycomb-mysql-readonly-params)
aws_iam_role_policy.flow_log_policy: Refreshing state... (ID: production-flow-log-role:production-flow-log-policy)
aws_iam_role_policy.mysql_rds_lambda_log_policy: Refreshing state... (ID: production-mysql-rds-logs-role:production-mysql-rds-lambda-logs-policy)
aws_lambda_function.production_mysql_rds_logs: Refreshing state... (ID: production-mysql-rds-logs)
aws_iam_role_policy.mysql_rds_lambda_kms_policy: Refreshing state... (ID: production-mysql-rds-logs-role:production-mysql-rds-lambda-kms-policy)
aws_route53_record.poodle_lb_dns_spf: Refreshing state... (ID: Z2LO3SNQDNZXM2_poodle-lb_TXT)
aws_route53_record.blog_dns_spf: Refreshing state... (ID: Z2LO3SNQDNZXM2_blog_TXT)
aws_route53_record.metabase_dns_spf: Refreshing state... (ID: Z2LO3SNQDNZXM2_metabase_TXT)
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x10 pc=0xfdeee8]

goroutine 15635 [running]:
github.com/hashicorp/go-tfe.(*Client).retryHTTPBackoff(0xc001947980, 0x5f5e100, 0x17d78400, 0x0, 0x0, 0xc00135e9f0)
    /opt/gopath/pkg/mod/github.com/hashicorp/go-tfe@v0.3.11/tfe.go:248 +0x38
github.com/hashicorp/go-tfe.(*Client).retryHTTPBackoff-fm(0x5f5e100, 0x17d78400, 0x0, 0x0, 0xc00135e9f0)
    /opt/gopath/pkg/mod/github.com/hashicorp/go-tfe@v0.3.11/tfe.go:180 +0x52
github.com/hashicorp/go-retryablehttp.(*Client).Do(0xc0004db020, 0xc00044ae70, 0xc00003c090, 0x0, 0x0)
    /opt/gopath/pkg/mod/github.com/hashicorp/go-retryablehttp@v0.5.1/client.go:418 +0x2e7
github.com/hashicorp/go-tfe.(*Client).do(0xc001947980, 0x3312a00, 0xc00003c090, 0xc00044ae70, 0x2fbf3a0, 0xc000936380, 0x0, 0x0)
    /opt/gopath/pkg/mod/github.com/hashicorp/go-tfe@v0.3.11/tfe.go:414 +0x16d
github.com/hashicorp/go-tfe.(*stateVersions).Download(0xc000ba4f60, 0x3312a00, 0xc00003c090, 0xc00057ad80, 0x220, 0xc0009362a0, 0x0, 0x0, 0xc0005b1c00, 0xc00004016b)
    /opt/gopath/pkg/mod/github.com/hashicorp/go-tfe@v0.3.11/state_version.go:210 +0x120
github.com/hashicorp/terraform/backend/remote.(*remoteClient).Get(0xc0005b1c00, 0x30faba8, 0xc001948480, 0xc001648950)
    /opt/gopath/src/github.com/hashicorp/terraform/backend/remote/backend_state.go:37 +0x1fc
github.com/hashicorp/terraform/state/remote.(*State).RefreshState(0xc001948480, 0x0, 0x0)
    /opt/gopath/src/github.com/hashicorp/terraform/state/remote/state.go:70 +0x7a
github.com/hashicorp/terraform/builtin/providers/terraform.dataSourceRemoteStateRead(0xc0002e6e70, 0x0, 0x0, 0xc0002e6e70, 0x0)
    /opt/gopath/src/github.com/hashicorp/terraform/builtin/providers/terraform/data_source_state.go:497 +0x75a
github.com/hashicorp/terraform/helper/schema.(*Resource).ReadDataApply(0xc000c6fa40, 0xc0018fd860, 0x0, 0x0, 0xc0009a2e58, 0xc000592e01, 0xc0005965b0)
    /opt/gopath/src/github.com/hashicorp/terraform/helper/schema/resource.go:290 +0x88
github.com/hashicorp/terraform/helper/schema.(*Provider).ReadDataApply(0xc000c6fab0, 0xc000383b30, 0xc0018fd860, 0x0, 0x30, 0xc000a94000)
    /opt/gopath/src/github.com/hashicorp/terraform/helper/schema/provider.go:426 +0x92
github.com/hashicorp/terraform/terraform.(*EvalReadDataApply).Eval(0xc0018fd360, 0x33253a0, 0xc0001a3e10, 0x2, 0x2, 0x304fc44, 0x4)
    /opt/gopath/src/github.com/hashicorp/terraform/terraform/eval_read_data.go:122 +0xf9
github.com/hashicorp/terraform/terraform.EvalRaw(0x32ff5a0, 0xc0018fd360, 0x33253a0, 0xc0001a3e10, 0x0, 0x0, 0x0, 0x0)
    /opt/gopath/src/github.com/hashicorp/terraform/terraform/eval.go:53 +0x156
github.com/hashicorp/terraform/terraform.(*EvalSequence).Eval(0xc0018fd380, 0x33253a0, 0xc0001a3e10, 0x2, 0x2, 0x304fc44, 0x4)
    /opt/gopath/src/github.com/hashicorp/terraform/terraform/eval_sequence.go:14 +0x9c
github.com/hashicorp/terraform/terraform.EvalRaw(0x32ff6a0, 0xc0018fd380, 0x33253a0, 0xc0001a3e10, 0x28ab000, 0x54ec045, 0x25ccc40, 0xc001f4f240)
    /opt/gopath/src/github.com/hashicorp/terraform/terraform/eval.go:53 +0x156
github.com/hashicorp/terraform/terraform.Eval(0x32ff6a0, 0xc0018fd380, 0x33253a0, 0xc0001a3e10, 0xc0018fd380, 0x32ff6a0, 0xc0018fd380, 0x0)
    /opt/gopath/src/github.com/hashicorp/terraform/terraform/eval.go:34 +0x4d
github.com/hashicorp/terraform/terraform.(*Graph).walk.func1(0x2f1e320, 0xc0014ba400, 0x0, 0x0)
    /opt/gopath/src/github.com/hashicorp/terraform/terraform/graph.go:126 +0xc45
github.com/hashicorp/terraform/dag.(*Walker).walkVertex(0xc0002e61c0, 0x2f1e320, 0xc0014ba400, 0xc0005764c0)
    /opt/gopath/src/github.com/hashicorp/terraform/dag/walk.go:387 +0x367
created by github.com/hashicorp/terraform/dag.(*Walker).Update
    /opt/gopath/src/github.com/hashicorp/terraform/dag/walk.go:310 +0x986

!!!!!!!!!!!!!!!!!!!!!!!!!!! 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 Terraform[1] 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.

[1]: https://github.com/hashicorp/terraform/issues

!!!!!!!!!!!!!!!!!!!!!!!!!!! TERRAFORM CRASH !!!!!!!!!!!!!!!!!!!!!!!!!!!!```
apparentlymart commented 5 years ago

Hi @lizthegrey! Sorry for this crash, and thanks for reporting it.

This panic seems to be coming from the client library Terraform uses to interact with the remote system, so I'm going to refer this problem to the Terraform Cloud & Enterprise teams that maintain that library to see what's going on here.

mildwonkey commented 4 years ago

I am going to close this issue due to inactivity (and the fact that it's an upstream issue). Please reopen this is there is still a problem appearing in terraform v0.13!

If there is still a question, I recommend the the community forum, where there are far more people available to help. If there is a bug or you would like to make a feature request, please open a new issue and fill out the template. Thanks!

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 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.