Skip to content

Instantly share code, notes, and snippets.

@mjuarez
Last active August 4, 2020 23:32
Show Gist options
  • Save mjuarez/3d20f0efc53cf710d4265bb112735c11 to your computer and use it in GitHub Desktop.
Save mjuarez/3d20f0efc53cf710d4265bb112735c11 to your computer and use it in GitHub Desktop.
NS1 Terraform Import Bug 08/04/2020
$ TF_LOG=debug terraform import ns1_record.example imgix.xyz/huh.imgix.xyz/CNAME
2020/08/04 16:29:03 [WARN] Log levels other than TRACE are currently unreliable, and are supported only for backward compatibility.
Use TF_LOG=TRACE to see Terraform's internal logs.
----
2020/08/04 16:29:03 [INFO] Terraform version: 0.12.29
2020/08/04 16:29:03 [INFO] Go runtime version: go1.12.13
2020/08/04 16:29:03 [INFO] CLI args: []string{"/usr/local/bin/terraform", "import", "ns1_record.example", "example.xyz/huh.example.xyz/CNAME"}
2020/08/04 16:29:03 [DEBUG] Attempting to open CLI config file: /home/mjuarez/.terraformrc
2020/08/04 16:29:03 [DEBUG] File doesn't exist, but doesn't need to. Ignoring.
2020/08/04 16:29:03 [INFO] CLI command args: []string{"import", "ns1_record.example", "example.xyz/huh.example.xyz/CNAME"}
2020/08/04 16:29:03 [WARN] Log levels other than TRACE are currently unreliable, and are supported only for backward compatibility.
Use TF_LOG=TRACE to see Terraform's internal logs.
----
2020/08/04 16:29:03 [DEBUG] New state was assigned lineage "a310bd12-1846-453d-9151-85b86e1f8159"
2020/08/04 16:29:03 [DEBUG] checking for provider in "."
2020/08/04 16:29:03 [DEBUG] checking for provider in "/usr/local/bin"
2020/08/04 16:29:03 [DEBUG] checking for provider in ".terraform/plugins/linux_amd64"
2020/08/04 16:29:03 [DEBUG] found provider "terraform-provider-ns1_v1.8.4_x4"
2020/08/04 16:29:03 [DEBUG] found valid plugin: "ns1", "1.8.4", "/home/mjuarez/repos/tf-infra-dns/.terraform/plugins/linux_amd64/terraform-provider-ns1_v1.8.4_x4"
2020/08/04 16:29:03 [DEBUG] checking for provisioner in "."
2020/08/04 16:29:03 [DEBUG] checking for provisioner in "/usr/local/bin"
2020/08/04 16:29:03 [DEBUG] checking for provisioner in ".terraform/plugins/linux_amd64"
2020-08-04T16:29:03.676-0700 [INFO] plugin: configuring client automatic mTLS
2020-08-04T16:29:03.697-0700 [DEBUG] plugin: starting plugin: path=/home/mjuarez/repos/tf-infra-dns/.terraform/plugins/linux_amd64/terraform-provider-ns1_v1.8.4_x4 args=[/home/mjuarez/repos/tf-infra-dns/.terraform/plugins/linux_amd64/terraform-provider-ns1_v1.8.4_x4]
2020-08-04T16:29:03.697-0700 [DEBUG] plugin: plugin started: path=/home/mjuarez/repos/tf-infra-dns/.terraform/plugins/linux_amd64/terraform-provider-ns1_v1.8.4_x4 pid=252474
2020-08-04T16:29:03.697-0700 [DEBUG] plugin: waiting for RPC address: path=/home/mjuarez/repos/tf-infra-dns/.terraform/plugins/linux_amd64/terraform-provider-ns1_v1.8.4_x4
2020-08-04T16:29:03.702-0700 [INFO] plugin.terraform-provider-ns1_v1.8.4_x4: configuring server automatic mTLS: timestamp=2020-08-04T16:29:03.702-0700
2020-08-04T16:29:03.726-0700 [DEBUG] plugin: using plugin: version=5
2020-08-04T16:29:03.726-0700 [DEBUG] plugin.terraform-provider-ns1_v1.8.4_x4: plugin address: address=/tmp/plugin820612672 network=unix timestamp=2020-08-04T16:29:03.726-0700
2020-08-04T16:29:03.771-0700 [WARN] plugin.stdio: received EOF, stopping recv loop: err="rpc error: code = Unimplemented desc = unknown service plugin.GRPCStdio"
2020-08-04T16:29:03.773-0700 [DEBUG] plugin: plugin process exited: path=/home/mjuarez/repos/tf-infra-dns/.terraform/plugins/linux_amd64/terraform-provider-ns1_v1.8.4_x4 pid=252474
2020-08-04T16:29:03.773-0700 [DEBUG] plugin: plugin exited
2020/08/04 16:29:03 [DEBUG] ProviderTransformer: "ns1_zone.zones" (*terraform.NodeAbstractResource) needs provider.ns1
2020/08/04 16:29:03 [DEBUG] ProviderTransformer: "ns1_record.example" (*terraform.NodeAbstractResource) needs provider.ns1
2020/08/04 16:29:03 [DEBUG] ProviderTransformer: "ns1_record.records" (*terraform.NodeAbstractResource) needs provider.ns1
2020/08/04 16:29:03 [DEBUG] ProviderTransformer: "ns1_record.example (import id \"example.xyz/huh.example.xyz/CNAME\")" (*terraform.graphNodeImportState) needs provider.ns1
2020/08/04 16:29:03 [DEBUG] ReferenceTransformer: "ns1_zone.zones" references: [local.config]
2020/08/04 16:29:03 [DEBUG] ReferenceTransformer: "ns1_record.example" references: []
2020/08/04 16:29:03 [DEBUG] ReferenceTransformer: "ns1_record.records" references: [local.config]
2020/08/04 16:29:03 [DEBUG] ReferenceTransformer: "ns1_record.example (import id \"example.xyz/huh.example.xyz/CNAME\")" references: []
2020/08/04 16:29:03 [DEBUG] ReferenceTransformer: "provider.ns1" references: []
2020/08/04 16:29:03 [DEBUG] ReferenceTransformer: "local.zone_files" references: []
2020/08/04 16:29:03 [DEBUG] ReferenceTransformer: "local.config" references: [local.zone_files]
2020/08/04 16:29:03 [DEBUG] Starting graph walk: walkImport
2020-08-04T16:29:03.774-0700 [INFO] plugin: configuring client automatic mTLS
2020-08-04T16:29:03.801-0700 [DEBUG] plugin: starting plugin: path=/home/mjuarez/repos/tf-infra-dns/.terraform/plugins/linux_amd64/terraform-provider-ns1_v1.8.4_x4 args=[/home/mjuarez/repos/tf-infra-dns/.terraform/plugins/linux_amd64/terraform-provider-ns1_v1.8.4_x4]
2020-08-04T16:29:03.801-0700 [DEBUG] plugin: plugin started: path=/home/mjuarez/repos/tf-infra-dns/.terraform/plugins/linux_amd64/terraform-provider-ns1_v1.8.4_x4 pid=252494
2020-08-04T16:29:03.801-0700 [DEBUG] plugin: waiting for RPC address: path=/home/mjuarez/repos/tf-infra-dns/.terraform/plugins/linux_amd64/terraform-provider-ns1_v1.8.4_x4
2020-08-04T16:29:03.808-0700 [INFO] plugin.terraform-provider-ns1_v1.8.4_x4: configuring server automatic mTLS: timestamp=2020-08-04T16:29:03.808-0700
2020-08-04T16:29:03.839-0700 [DEBUG] plugin: using plugin: version=5
2020-08-04T16:29:03.839-0700 [DEBUG] plugin.terraform-provider-ns1_v1.8.4_x4: plugin address: address=/tmp/plugin032063011 network=unix timestamp=2020-08-04T16:29:03.838-0700
2020-08-04T16:29:03.895-0700 [WARN] plugin.stdio: received EOF, stopping recv loop: err="rpc error: code = Unimplemented desc = unknown service plugin.GRPCStdio"
2020-08-04T16:29:03.897-0700 [DEBUG] plugin.terraform-provider-ns1_v1.8.4_x4: 2020/08/04 16:29:03 [INFO] NS1 Client configured for Endpoint: https://api.nsone.net/v1/
ns1_record.example: Importing from ID "example.xyz/huh.example.xyz/CNAME"...
ns1_record.example: Import prepared!
Prepared ns1_record for import
ns1_record.example: Refreshing state... [id=example.xyz/huh.example.xyz/CNAME]
2020/08/04 16:29:04 [ERROR] <root>: eval: *terraform.EvalRefresh, err: [DEBUG] Error setting filters for: huh.example.xyz, error: &errors.errorString{s:"filters.1.config.N: '' expected type 'string', got unconvertible type 'float64'"}
2020/08/04 16:29:04 [ERROR] <root>: eval: *terraform.EvalSequence, err: [DEBUG] Error setting filters for: huh.example.xyz, error: &errors.errorString{s:"filters.1.config.N: '' expected type 'string', got unconvertible type 'float64'"}
Error: [DEBUG] Error setting filters for: huh.example.xyz, error: &errors.errorString{s:"filters.1.config.N: '' expected type 'string', got unconvertible type 'float64'"}
2020-08-04T16:29:04.952-0700 [DEBUG] plugin: plugin process exited: path=/home/mjuarez/repos/tf-infra-dns/.terraform/plugins/linux_amd64/terraform-provider-ns1_v1.8.4_x4 pid=252494
2020-08-04T16:29:04.952-0700 [DEBUG] plugin: plugin exited
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment