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

Resource heroku_cert - unexpected EOF #5930

Closed
fnmunhoz opened this issue Mar 30, 2016 · 3 comments · Fixed by #14240
Closed

Resource heroku_cert - unexpected EOF #5930

fnmunhoz opened this issue Mar 30, 2016 · 3 comments · Fixed by #14240

Comments

@fnmunhoz
Copy link

Hello!

I'm trying to update a certificate file on heroku, but I'm receiving this on terraform apply:

Error applying plan:

1 error(s) occurred:

* heroku_cert.ssl-production: unexpected EOF

Terraform does not automatically rollback in the face of errors.
Instead, your Terraform state file has been partially updated with
any resources that successfully completed. Please address the error
above and apply again to incrementally change your infrastructure.
panic: interface conversion: interface {} is string, not *string
2016/03/30 13:32:31 [DEBUG] terraform-provider-heroku:
2016/03/30 13:32:31 [DEBUG] terraform-provider-heroku: goroutine 198 [running]:
2016/03/30 13:32:31 [DEBUG] terraform-provider-heroku: panic(0x674de0, 0xc8202bfc40)
2016/03/30 13:32:31 [DEBUG] terraform-provider-heroku:  /usr/local/Cellar/go/1.6/libexec/src/runtime/panic.go:464 +0x3e6
2016/03/30 13:32:31 [DEBUG] terraform-provider-heroku: github.com/hashicorp/terraform/builtin/providers/heroku.resourceHerokuCertUpdate(0xc8204a4ea0, 0x73b020, 0xc8202187f8, 0x0, 0x0)
2016/03/30 13:32:31 [DEBUG] terraform-provider-heroku:  /private/tmp/terraform20160322-40204-nd0o52/terraform-0.6.14/src/github.com/hashicorp/terraform/builtin/providers/heroku/resource_heroku_cert.go:96 +0x40d
2016/03/30 13:32:31 [DEBUG] terraform-provider-heroku: github.com/hashicorp/terraform/helper/schema.(*Resource).Apply(0xc8202be7c0, 0xc82018f2f0, 0xc820472650, 0x73b020, 0xc8202187f8, 0xc82018f401, 0x0, 0x0)
2016/03/30 13:32:31 [DEBUG] terraform-provider-heroku:  /private/tmp/terraform20160322-40204-nd0o52/terraform-0.6.14/src/github.com/hashicorp/terraform/helper/schema/resource.go:152 +0x3b9
2016/03/30 13:32:31 [DEBUG] terraform-provider-heroku: github.com/hashicorp/terraform/helper/schema.(*Provider).Apply(0xc8204af8c0, 0xc8202bf540, 0xc82018f2f0, 0xc820472650, 0x1, 0x0, 0x0)
2016/03/30 13:32:31 [DEBUG] terraform-provider-heroku:  /private/tmp/terraform20160322-40204-nd0o52/terraform-0.6.14/src/github.com/hashicorp/terraform/helper/schema/provider.go:162 +0x1ed
2016/03/30 13:32:31 [DEBUG] terraform-provider-heroku: github.com/hashicorp/terraform/rpc.(*ResourceProviderServer).Apply(0xc82033fc00, 0xc8203208a0, 0xc8204726a0, 0x0, 0x0)
2016/03/30 13:32:31 [DEBUG] terraform-provider-heroku:  /private/tmp/terraform20160322-40204-nd0o52/terraform-0.6.14/src/github.com/hashicorp/terraform/rpc/resource_provider.go:323 +0x76
2016/03/30 13:32:31 [DEBUG] terraform-provider-heroku: reflect.Value.call(0x60a7a0, 0x6f1bf8, 0x13, 0x73ed80, 0x4, 0xc8201e1ee8, 0x3, 0x3, 0x0, 0x0, ...)
2016/03/30 13:32:31 [DEBUG] terraform-provider-heroku:  /usr/local/Cellar/go/1.6/libexec/src/reflect/value.go:435 +0x120d
2016/03/30 13:32:31 [DEBUG] terraform-provider-heroku: reflect.Value.Call(0x60a7a0, 0x6f1bf8, 0x13, 0xc8201e1ee8, 0x3, 0x3, 0x0, 0x0, 0x0)
2016/03/30 13:32:31 [DEBUG] terraform-provider-heroku:  /usr/local/Cellar/go/1.6/libexec/src/reflect/value.go:303 +0xb1
2016/03/30 13:32:31 [DEBUG] terraform-provider-heroku: net/rpc.(*service).call(0xc8202be840, 0xc8202be800, 0xc820459698, 0xc8201a8800, 0xc82033fc20, 0x51f400, 0xc8203208a0, 0x16, 0x51f460, 0xc8204726a0, ...)
2016/03/30 13:32:31 [DEBUG] terraform-provider-heroku:  /usr/local/Cellar/go/1.6/libexec/src/net/rpc/server.go:383 +0x1c2
2016/03/30 13:32:31 [DEBUG] terraform-provider-heroku: created by net/rpc.(*Server).ServeCodec
2016/03/30 13:32:31 [DEBUG] terraform-provider-heroku:  /usr/local/Cellar/go/1.6/libexec/src/net/rpc/server.go:477 +0x49d
2016/03/30 13:32:31 [DEBUG] root: eval: *terraform.EvalWriteState
2016/03/30 13:32:31 [DEBUG] root: eval: *terraform.EvalApplyProvisioners
2016/03/30 13:32:31 [DEBUG] root: eval: *terraform.EvalIf
2016/03/30 13:32:31 [DEBUG] root: eval: *terraform.EvalWriteDiff
2016/03/30 13:32:31 [DEBUG] root: eval: *terraform.EvalIf
2016/03/30 13:32:31 [DEBUG] root: eval: *terraform.EvalWriteState
2016/03/30 13:32:31 [DEBUG] root: eval: *terraform.EvalApplyPost
2016/03/30 13:32:31 [ERROR] root: eval: *terraform.EvalApplyPost, err: 1 error(s) occurred:

* heroku_cert.ssl-production: unexpected EOF
2016/03/30 13:32:31 [ERROR] root: eval: *terraform.EvalSequence, err: 1 error(s) occurred:

* heroku_cert.ssl-production: unexpected EOF
2016/03/30 13:32:31 [ERROR] root: eval: *terraform.EvalOpFilter, err: 1 error(s) occurred:

* heroku_cert.ssl-production: unexpected EOF
2016/03/30 13:32:31 [ERROR] root: eval: *terraform.EvalSequence, err: 1 error(s) occurred:

* heroku_cert.ssl-production: unexpected EOF
2016/03/30 13:32:31 [TRACE] [walkApply] Exiting eval tree: heroku_cert.ssl-production
2016/03/30 13:32:31 [DEBUG] vertex provider.heroku (close), got dep: heroku_cert.ssl-production
2016/03/30 13:32:31 [DEBUG] vertex root, got dep: provider.heroku (close)
2016/03/30 13:32:31 [DEBUG] vertex root, got dep: provider.dnsimple
2016/03/30 13:32:31 [DEBUG] /usr/local/Cellar/terraform/0.6.14/bin/terraform-provider-heroku: plugin process exited
2016/03/30 13:32:31 [DEBUG] waiting for all plugin processes to complete...
2016/03/30 13:32:31 [DEBUG] /usr/local/Cellar/terraform/0.6.14/bin/terraform-provider-dnsimple: plugin process exited

My resources looks like that:

resource "heroku_app" "production" {
    name = "appname-production"
    region = "us"

    config_vars {
        ...
    }
}

resource "heroku_domain" "production" {
    app = "${heroku_app.production.name}"
    hostname = "${var.appname_domain}"
}

resource "heroku_domain" "www" {
    app = "${heroku_app.production.name}"
    hostname = "www.${var.appname_domain}"
}

resource "heroku_addon" "ssl-production" {
    app = "${heroku_app.production.name}"
    plan = "ssl:endpoint"
}

resource "heroku_cert" "ssl-production" {
    app = "${heroku_app.production.name}"
    certificate_chain = "${file("www_appname_com.crt")}"
    private_key = "${file("www_appname.key")}"
    depends_on = ["heroku_addon.ssl-production"]
}

I've tried with the latest version of terraform 0.6.4 but no success.

If there is any other information that I could bring to help, let me known.

Thanks!

@BestFriendChris
Copy link

I'm also seeing this when trying to update the heroku cert (running terraform version 0.9.3)

wchrisjohnson added a commit to wchrisjohnson/terraform that referenced this issue May 4, 2017
Trying to surface this bug with a test:
hashicorp#5930
wchrisjohnson added a commit to wchrisjohnson/terraform that referenced this issue May 5, 2017
Trying to surface this bug with a test:
hashicorp#5930
wchrisjohnson added a commit to wchrisjohnson/terraform that referenced this issue May 5, 2017
Trying to surface this bug with a test:
hashicorp#5930
wchrisjohnson added a commit to wchrisjohnson/terraform that referenced this issue May 6, 2017
Trying to surface this bug with a test:
hashicorp#5930
@catsby
Copy link
Contributor

catsby commented May 8, 2017

Hello – I'm going to close this now and assume it's been fixed (as per comment above). Please let me know if you're still hitting this on Terraform v0.9

@catsby catsby closed this as completed May 8, 2017
catsby pushed a commit that referenced this issue May 10, 2017
* Attempt to write a new test for cert update

Trying to surface this bug with a test:
#5930

* Fix the error

* Fix the test for the update operation

* Break apart tests for EU vs US to cleanse test run

* Refactor Update to more closely match create, increase debug logging

* Reflect differences of EU and US regions via separate tests

* Add comment re: why of test breakout

* Removed the “SetId” as it was unnecessary

* Ensure the SSL Addon has been provisioned
grubernaut pushed a commit to heroku/terraform-provider-heroku that referenced this issue Jun 6, 2017
* Attempt to write a new test for cert update

Trying to surface this bug with a test:
hashicorp/terraform#5930

* Fix the error

* Fix the test for the update operation

* Break apart tests for EU vs US to cleanse test run

* Refactor Update to more closely match create, increase debug logging

* Reflect differences of EU and US regions via separate tests

* Add comment re: why of test breakout

* Removed the “SetId” as it was unnecessary

* Ensure the SSL Addon has been provisioned
@ghost
Copy link

ghost commented Apr 13, 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 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.

@ghost ghost locked and limited conversation to collaborators Apr 13, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants