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

changing an existing resource results in a crash #16

Closed
c33s opened this issue Sep 7, 2020 · 2 comments
Closed

changing an existing resource results in a crash #16

c33s opened this issue Sep 7, 2020 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@c33s
Copy link

c33s commented Sep 7, 2020

resource "hetznerdns_zone" "example_at" {
    name = "example.at"
    ttl = 3600
}

data "hetznerdns_zone" "example_at" {
    name = "example_at"
}

resource "hetznerdns_record" "mx1_example_at" {
    zone_id = "${hetznerdns_zone.example_at.id}"
    name = "www"
    value = "example.at."
    type = "CNAME"
    ttl= 3600
}
hetznerdns_zone.example_at: Refreshing state... (ID: Fm3kcKJT8ZWDiVy3458xD4)
data.hetznerdns_zone.example_at: Refreshing state...
hetznerdns_record.example_at: Refreshing state... (ID: 1f58249e1e293868678d40e0d40f97d7)

An execution plan has been generated and is shown below.
Resource actions are indicated with the following symbols:
  ~ update in-place

Terraform will perform the following actions:

  ~ hetznerdns_record.example_at
      name: "@" => "www"


Plan: 0 to add, 1 to change, 0 to destroy.

Do you want to perform these actions in workspace "production"?
  Terraform will perform the actions described above.
  Only 'yes' will be accepted to approve.

  Enter a value: yes

hetznerdns_record.example_at: Modifying... (ID: 1f58249e1e293868678d40e0d40f97d7)
  name: "@" => "www"

Error: Error applying plan:

1 error occurred:
        * hetznerdns_record.example_at: 1 error occurred:
        * hetznerdns_record.example_at: 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 int, not *int
2020-09-07T10:37:08.045+0200 [DEBUG] plugin.terraform-provider-hetznerdns_v1.1.0.exe:
2020-09-07T10:37:08.045+0200 [DEBUG] plugin.terraform-provider-hetznerdns_v1.1.0.exe: goroutine 107 [running]:
2020-09-07T10:37:08.045+0200 [DEBUG] plugin.terraform-provider-hetznerdns_v1.1.0.exe: github.com/timohirt/terraform-provider-hetznerdns/hetznerdns.resourceRecordUpdate(0xc0003a45b0, 0xf444e0, 0xc000209020, 0x24, 0x18dbb40)
2020-09-07T10:37:08.045+0200 [DEBUG] plugin.terraform-provider-hetznerdns_v1.1.0.exe:   /home/runner/work/terraform-provider-hetznerdns/terraform-provider-hetznerdns/hetznerdns/resource_record.go:147 +0x74b
2020-09-07T10:37:08.045+0200 [DEBUG] plugin.terraform-provider-hetznerdns_v1.1.0.exe: github.com/hashicorp/terraform-plugin-sdk/helper/schema.(*Resource).Apply(0xc000458e10, 0xc00025d220, 0xc000666ac0, 0xf444e0, 0xc000209020, 0xc00060ba01, 0xc00026dbd0, 0x40cb20)
2020-09-07T10:37:08.045+0200 [DEBUG] plugin.terraform-provider-hetznerdns_v1.1.0.exe:   /home/runner/go/pkg/mod/github.com/hashicorp/terraform-plugin-sdk@v1.12.0/helper/schema/resource.go:316 +0x26a
2020-09-07T10:37:08.045+0200 [DEBUG] plugin.terraform-provider-hetznerdns_v1.1.0.exe: github.com/hashicorp/terraform-plugin-sdk/helper/schema.(*Provider).Apply(0xc000096f00, 0xc000669080, 0xc00025d220, 0xc000666ac0, 0xc000665020, 0xc0006643c0, 0x18)
2020-09-07T10:37:08.045+0200 [DEBUG] plugin.terraform-provider-hetznerdns_v1.1.0.exe:   /home/runner/go/pkg/mod/github.com/hashicorp/terraform-plugin-sdk@v1.12.0/helper/schema/provider.go:294 +0xa0
2020-09-07T10:37:08.045+0200 [DEBUG] plugin.terraform-provider-hetznerdns_v1.1.0.exe: github.com/hashicorp/terraform-plugin-sdk/plugin.(*ResourceProviderServer).Apply(0xc0002089a0, 0xc0006666a0, 0xc0006703b0, 0x0, 0x0)
2020-09-07T10:37:08.045+0200 [DEBUG] plugin.terraform-provider-hetznerdns_v1.1.0.exe:   /home/runner/go/pkg/mod/github.com/hashicorp/terraform-plugin-sdk@v1.12.0/plugin/resource_provider.go:530 +0x5e
2020-09-07T10:37:08.045+0200 [DEBUG] plugin.terraform-provider-hetznerdns_v1.1.0.exe: reflect.Value.call(0xc000086240, 0xc000006c48, 0x13, 0xf8917f, 0x4, 0xc00026df08, 0x3, 0x3, 0xc00026df34, 0x497ca5faa80, ...)
2020-09-07T10:37:08.045+0200 [DEBUG] plugin.terraform-provider-hetznerdns_v1.1.0.exe:   /opt/hostedtoolcache/go/1.14.7/x64/src/reflect/value.go:460 +0x8b2
2020-09-07T10:37:08.045+0200 [DEBUG] plugin.terraform-provider-hetznerdns_v1.1.0.exe: reflect.Value.Call(0xc000086240, 0xc000006c48, 0x13, 0xc00026df08, 0x3, 0x3, 0x497ca5faa80, 0xc00078c000, 0xc00078c000)
2020-09-07T10:37:08.045+0200 [DEBUG] plugin.terraform-provider-hetznerdns_v1.1.0.exe:   /opt/hostedtoolcache/go/1.14.7/x64/src/reflect/value.go:321 +0xbb
2020-09-07T10:37:08.045+0200 [DEBUG] plugin.terraform-provider-hetznerdns_v1.1.0.exe: net/rpc.(*service).call(0xc00027e740, 0xc000076960, 0xc00008a8c0, 0xc00008a8d0, 0xc000096f80, 0xc000208ee0, 0xdb8220, 0xc0006666a0, 0x16, 0xdb8260, ...)

2020-09-07T10:37:08.045+0200 [DEBUG] plugin.terraform-provider-hetznerdns_v1.1.0.exe:   /opt/hostedtoolcache/go/1.14.7/x64/src/net/rpc/server.go:377 +0x186
2020-09-07T10:37:08.045+0200 [DEBUG] plugin.terraform-provider-hetznerdns_v1.1.0.exe: created by net/rpc.(*Server).ServeCodec
2020-09-07T10:37:08.045+0200 [DEBUG] plugin.terraform-provider-hetznerdns_v1.1.0.exe:   /opt/hostedtoolcache/go/1.14.7/x64/src/net/rpc/server.go:474 +0x432
2020/09/07 10:37:08 [TRACE] root: eval: *terraform.EvalWriteState
2020/09/07 10:37:08 [TRACE] root: eval: *terraform.EvalApplyProvisioners
2020/09/07 10:37:08 [TRACE] root: eval: *terraform.EvalIf
2020/09/07 10:37:08 [TRACE] root: eval: *terraform.EvalWriteState
2020/09/07 10:37:08 [TRACE] root: eval: *terraform.EvalWriteDiff
2020/09/07 10:37:08 [TRACE] root: eval: *terraform.EvalApplyPost
2020/09/07 10:37:08 [ERROR] root: eval: *terraform.EvalApplyPost, err: 1 error occurred:
        * hetznerdns_record.example_at: unexpected EOF

2020/09/07 10:37:08 [ERROR] root: eval: *terraform.EvalSequence, err: 1 error occurred:
        * hetznerdns_record.example_at: unexpected EOF

2020/09/07 10:37:08 [TRACE] [walkApply] Exiting eval tree: hetznerdns_record.example_at
2020/09/07 10:37:08 [TRACE] dag/walk: upstream errored, not walking "provider.hetznerdns (close)"
2020/09/07 10:37:08 [TRACE] dag/walk: upstream errored, not walking "meta.count-boundary (count boundary fixup)"
2020/09/07 10:37:08 [TRACE] dag/walk: upstream errored, not walking "root"
2020/09/07 10:37:08 [TRACE] Preserving existing state lineage "0a04f514-e78a-bfa4-d095-760033b00edb"
2020/09/07 10:37:08 [TRACE] Preserving existing state lineage "0a04f514-e78a-bfa4-d095-760033b00edb"
2020/09/07 10:37:08 [TRACE] Preserving existing state lineage "0a04f514-e78a-bfa4-d095-760033b00edb"
2020/09/07 10:37:08 [TRACE] Preserving existing state lineage "0a04f514-e78a-bfa4-d095-760033b00edb"
2020/09/07 10:37:08 [DEBUG] plugin: waiting for all plugin processes to complete...
2020-09-07T10:37:08.054+0200 [WARN ] plugin: error closing client during Kill: err="connection is shut down"
@timohirt
Copy link
Owner

timohirt commented Sep 7, 2020

This bug is already fixed: 31efb57

I'll add the fix to the next release.

@timohirt timohirt added the bug Something isn't working label Sep 7, 2020
@timohirt
Copy link
Owner

timohirt commented Sep 7, 2020

https://github.com/timohirt/terraform-provider-hetznerdns/releases/tag/v1.1.1

@timohirt timohirt closed this as completed Sep 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants