-
Notifications
You must be signed in to change notification settings - Fork 9.5k
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
terraform plan crash after upgrading from 0.5.3 to 0.6.0 #2802
Comments
Also tested with 0.6.1 The same errors |
Hey @astancu thanks for sending this in ... it seems the error is likely around |
Hi catsby, here is part of my module: provider "aws" {
access_key = "${var.access_key}"
secret_key = "${var.secret_key}"
region = "${var.region}"
}
resource "aws_subnet" "dcs_subnets" {
vpc_id = "${var.vpc_id}"
cidr_block = "${concat(var.vpc_cidr_first_two_octets,".",lookup(var.subnet_cidr_block_dcs, count.index))}"
count = "${var.number_of_az}"
availability_zone = "${lookup(var.region, count.index)}"
map_public_ip_on_launch = true
tags {
Name = "${var.cluster_prefix}-${var.environment}-subnet_dcs${count.index+1}"
}
}
/* Subnet Association */
resource "aws_route_table_association" "dcs_subnet_association" {
subnet_id = "${element(aws_subnet.dcs_subnets.*.id, count.index)}"
count = "${var.number_of_az}"
route_table_id = "${var.route_table_public_id}"
} update by @catsby for formatting |
@catsby, based on the stack trace, is the error not coming from I'm getting the same error in one of my terraform configurations. I think it's because terraform is expecting CertificateChain to be in the AWS response, but it is not a required input when creating a certificate at AWS with UploadServerCertificate, so should not be a expected/required output from the response. update by @clstokes to fix bad copy/paste |
@clstokes indeed, that's suspect. Do you have a config that shows that? |
@clstokes nvm, I have one... strange that this has come up now. I'm digging in |
@catsby, I was putting one together for you already, so here it is... https://gist.github.com/clstokes/bb6f51aaa0bf20f6e224 Adding a |
Thanks all, this should be patched in #2871 |
Closing this, it should be patched in #2871, let me know if you're still having any issues here. Thanks! |
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. |
I'm using AWS provisioner to create and AWS infra. I have an infra already created but when upgrading from 0.5.3 to 0.6.0 the plan is crashing.
Here are some logs:
module.admin_bundle.aws_subnet.subnet_rds.1: Refreshing state... (ID: subnet-df2d54ba)
module.admin_bundle.aws_subnet.subnet_admin.0: Refreshing state... (ID: subnet-a517affc)
module.dcs.aws_subnet.dcs_subnets.2: Refreshing state... (ID: subnet-30d9bf47)
panic: runtime error: invalid memory address or nil pointer dereference
2015/07/21 12:45:49 terraform-provider-aws: [signal 0xb code=0x1 addr=0x0 pc=0xb01d8]
2015/07/21 12:45:49 terraform-provider-aws:
2015/07/21 12:45:49 terraform-provider-aws: goroutine 129 [running]:
2015/07/21 12:45:49 terraform-provider-aws: github.com/hashicorp/terraform/builtin/providers/aws.normalizeCert(0x6b6c60, 0x0, 0x0, 0x0)
2015/07/21 12:45:49 terraform-provider-aws: /opt/gopath/src/github.com/hashicorp/terraform/builtin/providers/aws/resource_aws_iam_server_certificate.go:143 +0x1f8
2015/07/21 12:45:49 terraform-provider-aws: github.com/hashicorp/terraform/builtin/providers/aws.resourceAwsIAMServerCertificateRead(0x2095e0a20, 0x6ac760, 0x20931e2d0, 0x0, 0x0)
2015/07/21 12:45:49 terraform-provider-aws: /opt/gopath/src/github.com/hashicorp/terraform/builtin/providers/aws/resource_aws_iam_server_certificate.go:110 +0x572
2015/07/21 12:45:49 terraform-provider-aws: github.com/hashicorp/terraform/helper/schema.(_Resource).Refresh(0x2095535c0, 0x2095db2c0, 0x6ac760, 0x20931e2d0, 0x2094eefa8, 0x0, 0x0)
2015/07/21 12:45:49 terraform-provider-aws: /opt/gopath/src/github.com/hashicorp/terraform/helper/schema/resource.go:209 +0x475
2015/07/21 12:45:49 terraform-provider-aws: github.com/hashicorp/terraform/helper/schema.(_Provider).Refresh(0x209502ff0, 0x2094b7380, 0x2095db2c0, 0x6adba0, 0x0, 0x0)
2015/07/21 12:45:49 terraform-provider-aws: /opt/gopath/src/github.com/hashicorp/terraform/helper/schema/provider.go:187 +0x1c7
2015/07/21 12:45:49 terraform-provider-aws: github.com/hashicorp/terraform/rpc.(_ResourceProviderServer).Refresh(0x2094d21e0, 0x2094b2150, 0x2094b2270, 0x0, 0x0)
2015/07/21 12:45:49 terraform-provider-aws: /opt/gopath/src/github.com/hashicorp/terraform/rpc/resource_provider.go:345 +0x73
2015/07/21 12:45:49 terraform-provider-aws: reflect.Value.call(0x860200, 0xa416a0, 0x13, 0xaadc60, 0x4, 0x2099c3f28, 0x3, 0x3, 0x0, 0x0, ...)
2015/07/21 12:45:49 terraform-provider-aws: /opt/go/src/reflect/value.go:419 +0x10e5
2015/07/21 12:45:49 terraform-provider-aws: reflect.Value.Call(0x860200, 0xa416a0, 0x13, 0x2099c3f28, 0x3, 0x3, 0x0, 0x0, 0x0)
2015/07/21 12:45:49 terraform-provider-aws: /opt/go/src/reflect/value.go:296 +0xbc
2015/07/21 12:45:49 terraform-provider-aws: net/rpc.(_service).call(0x2094f6640, 0x2094f6600, 0x2094672c8, 0x20932d600, 0x2094d2cc0, 0x6adb40, 0x2094b2150, 0x16, 0x6adba0, 0x2094b2270, ...)
2015/07/21 12:45:49 terraform-provider-aws: /opt/go/src/net/rpc/server.go:382 +0x1f7
2015/07/21 12:45:49 terraform-provider-aws: created by net/rpc.(*Server).ServeCodec
2015/07/21 12:45:49 terraform-provider-aws: /opt/go/src/net/rpc/server.go:476 +0x44a
..........
2015/07/21 12:45:49 [DEBUG] /usr/local/bin/terraform-provider-aws: plugin process exited
2015/07/21 12:45:49 [ERROR] root.vpc: eval: *terraform.EvalRefresh, err: unexpected EOF
2015/07/21 12:45:49 [ERROR] root.vpc: eval: *terraform.EvalSequence, err: unexpected EOF
2015/07/21 12:45:49 [ERROR] root.vpc: eval: *terraform.EvalOpFilter, err: unexpected EOF
2015/07/21 12:45:49 [ERROR] root.vpc: eval: *terraform.EvalSequence, err: unexpected EOF
2015/07/21 12:45:49 [ERROR] root.vpc: eval: *terraform.EvalRefresh, err: unexpected EOF
2015/07/21 12:45:49 [ERROR] root.vpc: eval: *terraform.EvalSequence, err: unexpected EOF
........
module.admin_bundle.aws_subnet.subnet_admin.1: Refreshing state... (ID: subnet-de2d54bb)
module.vpc.aws_route_table.route_table_private: Refreshing state... (ID: rtb-25861c40)
module.vpc.aws_eip.nat: Refreshing state... (ID: eipalloc-5b31f83e)
module.vpc.aws_eip.bastion: Refreshing state... (ID: eipalloc-5f31f83a)
module.dcs.aws_security_group_rule.allow_all: Refreshing state... (ID: sg-4235098228)
Error refreshing state: 21 error(s) occurred:
........
The text was updated successfully, but these errors were encountered: