为什么我会收到此 GRPCProvider UpgradeResourceState terraform 错误?

Nat*_*kle 2 terraform terraform-provider-gcp

问题:为了解决表的 GCP 数据目录标记的一些其他问题,将 terraform 从 0.14.4 更新到 1.0.8 后,我在尝试应用 terraform 时遇到了新错误。

\n
\xe2\x94\x82 Error: Request cancelled\n\xe2\x94\x82 \n\xe2\x94\x82   with module.ds-bigquery.google_bigquery_table.prism_tables_no_partition["co.expenses"],\n\xe2\x94\x82   on ds-bigquery/bq-prism-tables.tf line 249, in resource "google_bigquery_table" "prism_tables_no_partition":\n\xe2\x94\x82  249: resource "google_bigquery_table" "prism_tables_no_partition" {\n\xe2\x94\x82 \n\xe2\x94\x82 The plugin.(*GRPCProvider).UpgradeResourceState request was cancelled.\n
Run Code Online (Sandbox Code Playgroud)\n

和这个痕迹

\n
Stack trace from the terraform-provider-google_v3.61.0_x5 plugin:\n\npanic: interface conversion: interface {} is string, not map[string]interface {}\n\ngoroutine 4466 [running]:\ngithub.com/hashicorp/terraform-provider-google/google.bigQueryTablecheckNameExists(0xc000df9600, 0x1, 0x1, 0x0, 0x2d21b78)\n    /opt/teamcity-agent/work/5d79fe75d4460a2f/src/github.com/hashicorp/terraform-provider-google/google/resource_bigquery_table.go:26 +0x164\ngithub.com/hashicorp/terraform-provider-google/google.jsonCompareWithMapKeyOverride(0x2526520, 0xc000543940, 0x2526520, 0xc000543ae0, 0x2d22688, 0x40c201, 0xc000df9f30, 0x10)\n    /opt/teamcity-agent/work/5d79fe75d4460a2f/src/github.com/hashicorp/terraform-provider-google/google/resource_bigquery_table.go:47 +0x63f\ngithub.com/hashicorp/terraform-provider-google/google.jsonCompareWithMapKeyOverride(0x275dac0, 0xc000c5ec00, 0x275dac0, 0xc000c5f140, 0x2d22688, 0x1, 0xc000f90120, 0xc000fd1000)\n    /opt/teamcity-agent/work/5d79fe75d4460a2f/src/github.com/hashicorp/terraform-provider-google/google/resource_bigquery_table.go:87 +0x3db\ngithub.com/hashicorp/terraform-provider-google/google.jsonCompareWithMapKeyOverride(0x275dac0, 0xc000c5ebd0, 0x275dac0, 0xc000c5f110, 0x2d22688, 0xc000df9410, 0x194, 0x2526520)\n    /opt/teamcity-agent/work/5d79fe75d4460a2f/src/github.com/hashicorp/terraform-provider-google/google/resource_bigquery_table.go:87 +0x3db\ngithub.com/hashicorp/terraform-provider-google/google.jsonCompareWithMapKeyOverride(0x2526520, 0xc0005439a0, 0x2526520, 0xc000543b40, 0x2d22688, 0x0, 0x0, 0x0)\n    /opt/teamcity-agent/work/5d79fe75d4460a2f/src/github.com/hashicorp/terraform-provider-google/google/resource_bigquery_table.go:56 +0x73f\ngithub.com/hashicorp/terraform-provider-google/google.bigQueryTableSchemaDiffSuppress(0x2bf5c3a, 0x6, 0xc000e2c900, 0x88c, 0xc000e2db00, 0x88a, 0xc0012ee200, 0xc000a17500)\n    /opt/teamcity-agent/work/5d79fe75d4460a2f/src/github.com/hashicorp/terraform-provider-google/google/resource_bigquery_table.go:147 +0x253\ngithub.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.schemaMap.diff(0xc000936870, 0x2bf5c3a, 0x6, 0xc000946280, 0xc0005426e0, 0x31f89e0, 0xc0012ee200, 0x0, 0x0, 0x0)\n    /opt/teamcity-agent/work/5d79fe75d4460a2f/pkg/mod/github.com/hashicorp/terraform-plugin-sdk/v2@v2.4.4/helper/schema/schema.go:972 +0x37c\ngithub.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.schemaMap.Diff(0xc000936870, 0x31c7be0, 0xc000f6e380, 0xc00124a0e0, 0xc001264c30, 0xc00071fec0, 0x2bcafa0, 0xc0000b9200, 0x430fe00, 0x2561960, ...)\n    /opt/teamcity-agent/work/5d79fe75d4460a2f/pkg/mod/github.com/hashicorp/terraform-plugin-sdk/v2@v2.4.4/helper/schema/schema.go:522 +0x215\ngithub.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).SimpleDiff(0xc00093b2c0, 0x31c7be0, 0xc000f6e380, 0xc00124a0e0, 0xc001264c30, 0x2bcafa0, 0xc0000b9200, 0x0, 0x0, 0x0)\n    /opt/teamcity-agent/work/5d79fe75d4460a2f/pkg/mod/github.com/hashicorp/terraform-plugin-sdk/v2@v2.4.4/helper/schema/resource.go:446 +0x9f\ngithub.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*GRPCProviderServer).PlanResourceChange(0xc0000d2960, 0x31c7be0, 0xc000f6e380, 0xc000319540, 0xc000f6e380, 0xc0012ea500, 0x320b3c0)\n    /opt/teamcity-agent/work/5d79fe75d4460a2f/pkg/mod/github.com/hashicorp/terraform-plugin-sdk/v2@v2.4.4/helper/schema/grpc_provider.go:693 +0x792\ngithub.com/hashicorp/terraform-plugin-go/tfprotov5/server.(*server).PlanResourceChange(0xc000dad120, 0x31c7be0, 0xc000f6e380, 0xc00124a000, 0xc000dad120, 0xc000e6c480, 0xc000847ba0)\n    /opt/teamcity-agent/work/5d79fe75d4460a2f/pkg/mod/github.com/hashicorp/terraform-plugin-go@v0.2.1/tfprotov5/server/server.go:315 +0xac\ngithub.com/hashicorp/terraform-plugin-go/tfprotov5/internal/tfplugin5._Provider_PlanResourceChange_Handler(0x2b1ee60, 0xc000dad120, 0x31c7ca0, 0xc000e6c480, 0xc0012ea5a0, 0x0, 0x31c7ca0, 0xc000e6c480, 0xc000ee2000, 0x28b5)\n    /opt/teamcity-agent/work/5d79fe75d4460a2f/pkg/mod/github.com/hashicorp/terraform-plugin-go@v0.2.1/tfprotov5/internal/tfplugin5/tfplugin5_grpc.pb.go:362 +0x217\ngoogle.golang.org/grpc.(*Server).processUnaryRPC(0xc0001bc700, 0x3202040, 0xc000702c00, 0xc000fbc700, 0xc00080c960, 0x42d0ec8, 0x0, 0x0, 0x0)\n    /opt/teamcity-agent/work/5d79fe75d4460a2f/pkg/mod/google.golang.org/grpc@v1.36.0/server.go:1217 +0x50a\ngoogle.golang.org/grpc.(*Server).handleStream(0xc0001bc700, 0x3202040, 0xc000702c00, 0xc000fbc700, 0x0)\n    /opt/teamcity-agent/work/5d79fe75d4460a2f/pkg/mod/google.golang.org/grpc@v1.36.0/server.go:1540 +0xcfd\ngoogle.golang.org/grpc.(*Server).serveStreams.func1.2(0xc000721c40, 0xc0001bc700, 0x3202040, 0xc000702c00, 0xc000fbc700)\n    /opt/teamcity-agent/work/5d79fe75d4460a2f/pkg/mod/google.golang.org/grpc@v1.36.0/server.go:878 +0xa1\ncreated by google.golang.org/grpc.(*Server).serveStreams.func1\n    /opt/teamcity-agent/work/5d79fe75d4460a2f/pkg/mod/google.golang.org/grpc@v1.36.0/server.go:876 +0x204\n\nError: The terraform-provider-google_v3.61.0_x5 plugin crashed!\n\nThis is always indicative of a bug within the plugin. It would be immensely\nhelpful if you could report the crash with the plugin's maintainers so that it\ncan be fixed. The output above should help diagnose the issue.\n
Run Code Online (Sandbox Code Playgroud)\n

我尝试过的事情:

\n
    \n
  • 到处搜索所有提到此错误的内容,并提出类似的未解答的问题。

    \n
  • \n
  • 删除.terraform目录并重新运行terraform init

    \n
  • \n
\n

我不知道这里还能尝试什么。

\n

Nat*_*kle 5

对我来说这个问题的答案是运行以​​下命令:

terraform init --upgrade

就这些。如果我能在某个地方找到这个答案就好了。嗯,现在已经发布了。