terraform-provider-statuspage icon indicating copy to clipboard operation
terraform-provider-statuspage copied to clipboard

crash importing statuspage_metric

Open sean-snyk opened this issue 1 year ago • 0 comments

version v0.1.12

resource "statuspage_metric" "staging_platform_api_success_rate" {
  page_id             = local.staging_page_id
  metrics_provider_id = statuspage_metrics_provider.staging_datadog.id
  name                = "Platform API Success Rate"
  metric_identifier   = "100-((sum:envoy.http.downstream.rq.xx{envoy.response.code.class:5,container:gateway-proxy}.as_count().rollup(sum, 3600))/(sum:envoy.http.downstream.rq.xx{container:gateway-proxy}.as_count().rollup(sum, 3600))*100)"
  display             = false
  suffix              = "%"
}
main » tf import statuspage_metric.staging_platform_api_success_rate m219lkb9w9m5/0vnm97s93bty
2023-09-19T14:39:17.019+0100 [INFO]  Terraform version: 1.5.7
2023-09-19T14:39:17.019+0100 [DEBUG] using github.com/hashicorp/go-tfe v1.26.0
2023-09-19T14:39:17.019+0100 [DEBUG] using github.com/hashicorp/hcl/v2 v2.16.2
2023-09-19T14:39:17.019+0100 [DEBUG] using github.com/hashicorp/terraform-svchost v0.1.0
2023-09-19T14:39:17.019+0100 [DEBUG] using github.com/zclconf/go-cty v1.12.2
2023-09-19T14:39:17.019+0100 [INFO]  Go runtime version: go1.20.7
2023-09-19T14:39:17.019+0100 [INFO]  CLI args: []string{"terraform", "import", "statuspage_metric.staging_platform_api_success_rate", "m219lkb9w9m5/0vnm97s93bty"}
2023-09-19T14:39:17.019+0100 [DEBUG] Attempting to open CLI config file: /home/user/.config/terraform.rc
2023-09-19T14:39:17.020+0100 [INFO]  Loading CLI configuration from /home/user/.config/terraform.rc
2023-09-19T14:39:17.020+0100 [DEBUG] Not reading CLI config directory because config location is overridden by environment variable
2023-09-19T14:39:17.020+0100 [DEBUG] ignoring non-existing provider search directory terraform.d/plugins
2023-09-19T14:39:17.020+0100 [DEBUG] ignoring non-existing provider search directory /home/user/.terraform.d/plugins
2023-09-19T14:39:17.020+0100 [DEBUG] ignoring non-existing provider search directory /home/user/.data/terraform/plugins
2023-09-19T14:39:17.020+0100 [DEBUG] ignoring non-existing provider search directory /usr/local/share/terraform/plugins
2023-09-19T14:39:17.020+0100 [DEBUG] ignoring non-existing provider search directory /usr/share/terraform/plugins
2023-09-19T14:39:17.020+0100 [INFO]  CLI command args: []string{"import", "statuspage_metric.staging_platform_api_success_rate", "m219lkb9w9m5/0vnm97s93bty"}
2023-09-19T14:39:17.020+0100 [INFO]  Checkpoint disabled. Not running.
2023-09-19T14:39:17.022+0100 [DEBUG] Service discovery for app.terraform.io at https://app.terraform.io/.well-known/terraform.json
2023-09-19T14:39:17.356+0100 [DEBUG] Retrieve version constraints for service tfe.v2.1 and product terraform
2023-09-19T14:39:18.004+0100 [DEBUG] Service discovery for app.terraform.io aliased as localterraform.com
2023-09-19T14:39:18.043+0100 [DEBUG] checking for provisioner in "."
2023-09-19T14:39:18.046+0100 [DEBUG] checking for provisioner in "/usr/bin"
2023-09-19T14:39:20.355+0100 [DEBUG] Building and walking import graph
2023-09-19T14:39:20.356+0100 [DEBUG] adding implicit provider configuration provider["terraform.io/builtin/terraform"], implied first by data.terraform_remote_state.datadog-infra-tokens (expand)
2023-09-19T14:39:20.356+0100 [DEBUG] ProviderTransformer: "statuspage_component.staging_example (expand)" (*terraform.nodeExpandPlannableResource) needs provider["registry.terraform.io/yannh/statuspage"]
2023-09-19T14:39:20.356+0100 [DEBUG] ProviderTransformer: "statuspage_metric.staging_platform_api_success_rate (expand)" (*terraform.nodeExpandPlannableResource) needs provider["registry.terraform.io/yannh/statuspage"]
2023-09-19T14:39:20.356+0100 [DEBUG] ProviderTransformer: "data.terraform_remote_state.datadog-infra-tokens (expand)" (*terraform.nodeExpandPlannableResource) needs provider["terraform.io/builtin/terraform"]
2023-09-19T14:39:20.356+0100 [DEBUG] ProviderTransformer: "statuspage_metric.staging_platform_api_success_rate_prod16 (expand)" (*terraform.nodeExpandPlannableResource) needs provider["registry.terraform.io/yannh/statuspage"]
2023-09-19T14:39:20.356+0100 [DEBUG] ProviderTransformer: "statuspage_metrics_provider.staging_datadog (expand)" (*terraform.nodeExpandPlannableResource) needs provider["registry.terraform.io/yannh/statuspage"]
2023-09-19T14:39:20.356+0100 [DEBUG] ProviderTransformer: "statuspage_metrics_provider.staging_self (expand)" (*terraform.nodeExpandPlannableResource) needs provider["registry.terraform.io/yannh/statuspage"]
2023-09-19T14:39:20.356+0100 [DEBUG] ProviderTransformer: "statuspage_metric.staging_open_source_test_success_rate_prod16 (expand)" (*terraform.nodeExpandPlannableResource) needs provider["registry.terraform.io/yannh/statuspage"]
2023-09-19T14:39:20.356+0100 [DEBUG] ProviderTransformer: "statuspage_metric.staging_pr_checks_success_rate (expand)" (*terraform.nodeExpandPlannableResource) needs provider["registry.terraform.io/yannh/statuspage"]
2023-09-19T14:39:20.356+0100 [DEBUG] ProviderTransformer: "statuspage_metric.staging_platform_api_latency_prod16 (expand)" (*terraform.nodeExpandPlannableResource) needs provider["registry.terraform.io/yannh/statuspage"]
2023-09-19T14:39:20.357+0100 [ERROR] AttachSchemaTransformer: No provider config schema available for provider["terraform.io/builtin/terraform"]
2023-09-19T14:39:20.357+0100 [DEBUG] created provider logger: level=debug
2023-09-19T14:39:20.357+0100 [INFO]  provider: configuring client automatic mTLS
2023-09-19T14:39:20.374+0100 [DEBUG] provider: starting plugin: path=.terraform/providers/registry.terraform.io/yannh/statuspage/0.1.12/linux_amd64/terraform-provider-statuspage_v0.1.12 args=[.terraform/providers/registry.terraform.io/yannh/statuspage/0.1.12/linux_amd64/terraform-provider-statuspage_v0.1.12]
2023-09-19T14:39:20.375+0100 [DEBUG] provider: plugin started: path=.terraform/providers/registry.terraform.io/yannh/statuspage/0.1.12/linux_amd64/terraform-provider-statuspage_v0.1.12 pid=201864
2023-09-19T14:39:20.375+0100 [DEBUG] provider: waiting for RPC address: path=.terraform/providers/registry.terraform.io/yannh/statuspage/0.1.12/linux_amd64/terraform-provider-statuspage_v0.1.12
2023-09-19T14:39:20.379+0100 [INFO]  provider.terraform-provider-statuspage_v0.1.12: configuring server automatic mTLS: timestamp=2023-09-19T14:39:20.379+0100
2023-09-19T14:39:20.387+0100 [DEBUG] provider: using plugin: version=5
2023-09-19T14:39:20.387+0100 [DEBUG] provider.terraform-provider-statuspage_v0.1.12: plugin address: network=unix address=/tmp/plugin1003262048 timestamp=2023-09-19T14:39:20.387+0100
2023-09-19T14:39:20.403+0100 [DEBUG] provider.stdio: received EOF, stopping recv loop: err="rpc error: code = Unavailable desc = error reading from server: EOF"
2023-09-19T14:39:20.404+0100 [DEBUG] provider: plugin process exited: path=.terraform/providers/registry.terraform.io/yannh/statuspage/0.1.12/linux_amd64/terraform-provider-statuspage_v0.1.12 pid=201864
2023-09-19T14:39:20.404+0100 [DEBUG] provider: plugin exited
2023-09-19T14:39:20.404+0100 [DEBUG] ReferenceTransformer: "statuspage_metric.staging_pr_checks_success_rate (expand)" references: [statuspage_metrics_provider.staging_datadog (expand) local.staging_page_id (expand)]
2023-09-19T14:39:20.405+0100 [DEBUG] ReferenceTransformer: "statuspage_metric.staging_platform_api_latency_prod16 (expand)" references: [local.staging_page_id (expand) statuspage_metrics_provider.staging_datadog (expand)]
2023-09-19T14:39:20.405+0100 [DEBUG] ReferenceTransformer: "statuspage_metric.staging_platform_api_success_rate_prod16 (expand)" references: [local.staging_page_id (expand) statuspage_metrics_provider.staging_datadog (expand)]
2023-09-19T14:39:20.405+0100 [DEBUG] ReferenceTransformer: "statuspage_metric.staging_platform_api_success_rate (expand)" references: [statuspage_metrics_provider.staging_datadog (expand) local.staging_page_id (expand)]
2023-09-19T14:39:20.405+0100 [DEBUG] ReferenceTransformer: "data.terraform_remote_state.datadog-infra-tokens (expand)" references: []
2023-09-19T14:39:20.405+0100 [DEBUG] ReferenceTransformer: "provider[\"registry.terraform.io/yannh/statuspage\"]" references: []
2023-09-19T14:39:20.405+0100 [DEBUG] ReferenceTransformer: "provider[\"terraform.io/builtin/terraform\"]" references: []
2023-09-19T14:39:20.405+0100 [DEBUG] ReferenceTransformer: "statuspage_metrics_provider.staging_self (expand)" references: [local.staging_page_id (expand)]
2023-09-19T14:39:20.405+0100 [DEBUG] ReferenceTransformer: "statuspage_metric.staging_open_source_test_success_rate_prod16 (expand)" references: [statuspage_metrics_provider.staging_datadog (expand) local.staging_page_id (expand)]
2023-09-19T14:39:20.405+0100 [DEBUG] ReferenceTransformer: "statuspage_component.staging_example (expand)" references: [local.staging_page_id (expand)]
2023-09-19T14:39:20.405+0100 [DEBUG] ReferenceTransformer: "statuspage_metrics_provider.staging_datadog (expand)" references: [data.terraform_remote_state.datadog-infra-tokens (expand) local.staging_page_id (expand) data.terraform_remote_state.datadog-infra-tokens (expand)]
2023-09-19T14:39:20.405+0100 [DEBUG] ReferenceTransformer: "local.staging_page_id (expand)" references: []
2023-09-19T14:39:20.405+0100 [DEBUG] Starting graph walk: walkImport
2023-09-19T14:39:20.405+0100 [DEBUG] created provider logger: level=debug
2023-09-19T14:39:20.406+0100 [INFO]  provider: configuring client automatic mTLS
2023-09-19T14:39:20.412+0100 [DEBUG] provider: starting plugin: path=.terraform/providers/registry.terraform.io/yannh/statuspage/0.1.12/linux_amd64/terraform-provider-statuspage_v0.1.12 args=[.terraform/providers/registry.terraform.io/yannh/statuspage/0.1.12/linux_amd64/terraform-provider-statuspage_v0.1.12]
2023-09-19T14:39:20.412+0100 [DEBUG] provider: plugin started: path=.terraform/providers/registry.terraform.io/yannh/statuspage/0.1.12/linux_amd64/terraform-provider-statuspage_v0.1.12 pid=201878
2023-09-19T14:39:20.412+0100 [DEBUG] provider: waiting for RPC address: path=.terraform/providers/registry.terraform.io/yannh/statuspage/0.1.12/linux_amd64/terraform-provider-statuspage_v0.1.12
2023-09-19T14:39:20.416+0100 [INFO]  provider.terraform-provider-statuspage_v0.1.12: configuring server automatic mTLS: timestamp=2023-09-19T14:39:20.416+0100
2023-09-19T14:39:20.423+0100 [DEBUG] provider: using plugin: version=5
2023-09-19T14:39:20.423+0100 [DEBUG] provider.terraform-provider-statuspage_v0.1.12: plugin address: address=/tmp/plugin4214676830 network=unix timestamp=2023-09-19T14:39:20.423+0100
2023-09-19T14:39:20.434+0100 [DEBUG] ReferenceTransformer: "data.terraform_remote_state.datadog-infra-tokens" references: []
2023-09-19T14:39:20.435+0100 [DEBUG] Initializing remote state backend: remote
2023-09-19T14:39:20.435+0100 [DEBUG] Initializing remote state backend: remote
2023-09-19T14:39:20.435+0100 [DEBUG] Retrieve version constraints for service tfe.v2.1 and product terraform
2023-09-19T14:39:20.438+0100 [WARN]  ValidateProviderConfig from "provider[\"registry.terraform.io/yannh/statuspage\"]" changed the config value, but that value is unused
2023-09-19T14:39:20.439+0100 [INFO]  ReferenceTransformer: reference not found: "local.staging_page_id"
2023-09-19T14:39:20.439+0100 [DEBUG] ReferenceTransformer: "statuspage_component.staging_example" references: []
2023-09-19T14:39:20.439+0100 [INFO]  ReferenceTransformer: reference not found: "local.staging_page_id"
2023-09-19T14:39:20.439+0100 [DEBUG] ReferenceTransformer: "statuspage_metrics_provider.staging_self" references: []
2023-09-19T14:39:21.735+0100 [INFO]  ReferenceTransformer: reference not found: "local.staging_page_id"
2023-09-19T14:39:21.735+0100 [DEBUG] ReferenceTransformer: "statuspage_metrics_provider.staging_datadog" references: []
2023-09-19T14:39:21.738+0100 [DEBUG] Resource instance state not found for node "statuspage_metric.staging_platform_api_latency_prod16", instance statuspage_metric.staging_platform_api_latency_prod16
2023-09-19T14:39:21.738+0100 [INFO]  ReferenceTransformer: reference not found: "local.staging_page_id"
2023-09-19T14:39:21.738+0100 [DEBUG] ReferenceTransformer: "statuspage_metric.staging_platform_api_latency_prod16" references: []
2023-09-19T14:39:21.738+0100 [DEBUG] Resource instance state not found for node "statuspage_metric.staging_open_source_test_success_rate_prod16", instance statuspage_metric.staging_open_source_test_success_rate_prod16
2023-09-19T14:39:21.738+0100 [INFO]  ReferenceTransformer: reference not found: "local.staging_page_id"
2023-09-19T14:39:21.738+0100 [DEBUG] ReferenceTransformer: "statuspage_metric.staging_open_source_test_success_rate_prod16" references: []
2023-09-19T14:39:21.738+0100 [DEBUG] ReferenceTransformer: "statuspage_metric.staging_platform_api_success_rate (import id \"m219lkb9w9m5/0vnm97s93bty\")" references: []
2023-09-19T14:39:21.739+0100 [DEBUG] Resource instance state not found for node "statuspage_metric.staging_platform_api_success_rate_prod16", instance statuspage_metric.staging_platform_api_success_rate_prod16
2023-09-19T14:39:21.739+0100 [INFO]  ReferenceTransformer: reference not found: "local.staging_page_id"
2023-09-19T14:39:21.739+0100 [DEBUG] ReferenceTransformer: "statuspage_metric.staging_platform_api_success_rate_prod16" references: []
2023-09-19T14:39:21.739+0100 [DEBUG] Resource instance state not found for node "statuspage_metric.staging_pr_checks_success_rate", instance statuspage_metric.staging_pr_checks_success_rate
2023-09-19T14:39:21.739+0100 [INFO]  ReferenceTransformer: reference not found: "local.staging_page_id"
2023-09-19T14:39:21.739+0100 [DEBUG] ReferenceTransformer: "statuspage_metric.staging_pr_checks_success_rate" references: []
2023-09-19T14:39:21.740+0100 [INFO]  provider.terraform-provider-statuspage_v0.1.12: 2023/09/19 14:39:21 [INFO] Importing Metric 0vnm97s93bty from Page m219lkb9w9m5: timestamp=2023-09-19T14:39:21.740+0100
2023-09-19T14:39:22.757+0100 [INFO]  provider.terraform-provider-statuspage_v0.1.12: 2023/09/19 14:39:22 [INFO] Statuspage read metric: 0vnm97s93bty: timestamp=2023-09-19T14:39:22.757+0100
2023-09-19T14:39:22.761+0100 [DEBUG] provider.terraform-provider-statuspage_v0.1.12: panic: runtime error: invalid memory address or nil pointer dereference
2023-09-19T14:39:22.761+0100 [DEBUG] provider.terraform-provider-statuspage_v0.1.12: [signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0xa55355]
2023-09-19T14:39:22.761+0100 [DEBUG] provider.terraform-provider-statuspage_v0.1.12: 
2023-09-19T14:39:22.761+0100 [DEBUG] provider.terraform-provider-statuspage_v0.1.12: goroutine 21 [running]:
2023-09-19T14:39:22.761+0100 [DEBUG] provider.terraform-provider-statuspage_v0.1.12: github.com/yannh/terraform-provider-statuspage/statuspage.resourceMetricRead(0xc000018680, {0xaec960, 0xc000098420})
2023-09-19T14:39:22.761+0100 [DEBUG] provider.terraform-provider-statuspage_v0.1.12: 	github.com/yannh/terraform-provider-statuspage/statuspage/resource_metric.go:78 +0x435
2023-09-19T14:39:22.761+0100 [DEBUG] provider.terraform-provider-statuspage_v0.1.12: github.com/yannh/terraform-provider-statuspage/statuspage.resourceMetricImport(0xc000018680, {0xaec960, 0xc000098420})
2023-09-19T14:39:22.761+0100 [DEBUG] provider.terraform-provider-statuspage_v0.1.12: 	github.com/yannh/terraform-provider-statuspage/statuspage/resource_metric.go:149 +0x499
2023-09-19T14:39:22.761+0100 [DEBUG] provider.terraform-provider-statuspage_v0.1.12: github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Provider).ImportState(0xc00009a960, {0xcafae0, 0xc000343140}, 0xc000685780, {0xc0004280a0, 0x19})
2023-09-19T14:39:22.761+0100 [DEBUG] provider.terraform-provider-statuspage_v0.1.12: 	github.com/hashicorp/terraform-plugin-sdk/[email protected]/helper/schema/provider.go:387 +0x1ce
2023-09-19T14:39:22.761+0100 [DEBUG] provider.terraform-provider-statuspage_v0.1.12: github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*GRPCProviderServer).ImportResourceState(0xc00000d878, {0xcafa38, 0xc0002c66c0}, 0xc00041a460)
2023-09-19T14:39:22.761+0100 [DEBUG] provider.terraform-provider-statuspage_v0.1.12: 	github.com/hashicorp/terraform-plugin-sdk/[email protected]/helper/schema/grpc_provider.go:1088 +0x105
2023-09-19T14:39:22.761+0100 [DEBUG] provider.terraform-provider-statuspage_v0.1.12: github.com/hashicorp/terraform-plugin-go/tfprotov5/tf5server.(*server).ImportResourceState(0xc0000f4aa0, {0xcafae0, 0xc0000a4510}, 0xc0002ec0a0)
2023-09-19T14:39:22.761+0100 [DEBUG] provider.terraform-provider-statuspage_v0.1.12: 	github.com/hashicorp/[email protected]/tfprotov5/tf5server/server.go:841 +0x254
2023-09-19T14:39:22.761+0100 [DEBUG] provider.terraform-provider-statuspage_v0.1.12: github.com/hashicorp/terraform-plugin-go/tfprotov5/internal/tfplugin5._Provider_ImportResourceState_Handler({0xb840c0, 0xc0000f4aa0}, {0xcafae0, 0xc0000a4510}, 0xc000476120, 0x0)
2023-09-19T14:39:22.761+0100 [DEBUG] provider.terraform-provider-statuspage_v0.1.12: 	github.com/hashicorp/[email protected]/tfprotov5/internal/tfplugin5/tfplugin5_grpc.pb.go:403 +0x170
2023-09-19T14:39:22.761+0100 [DEBUG] provider.terraform-provider-statuspage_v0.1.12: google.golang.org/grpc.(*Server).processUnaryRPC(0xc0000c0700, {0xcbcae8, 0xc000410680}, 0xc000708900, 0xc0003e6ae0, 0x1174b38, 0x0)
2023-09-19T14:39:22.761+0100 [DEBUG] provider.terraform-provider-statuspage_v0.1.12: 	google.golang.org/[email protected]/server.go:1283 +0xcf2
2023-09-19T14:39:22.761+0100 [DEBUG] provider.terraform-provider-statuspage_v0.1.12: google.golang.org/grpc.(*Server).handleStream(0xc0000c0700, {0xcbcae8, 0xc000410680}, 0xc000708900, 0x0)
2023-09-19T14:39:22.761+0100 [DEBUG] provider.terraform-provider-statuspage_v0.1.12: 	google.golang.org/[email protected]/server.go:1620 +0xa2a
2023-09-19T14:39:22.761+0100 [DEBUG] provider.terraform-provider-statuspage_v0.1.12: google.golang.org/grpc.(*Server).serveStreams.func1.2()
2023-09-19T14:39:22.761+0100 [DEBUG] provider.terraform-provider-statuspage_v0.1.12: 	google.golang.org/[email protected]/server.go:922 +0x98
2023-09-19T14:39:22.761+0100 [DEBUG] provider.terraform-provider-statuspage_v0.1.12: created by google.golang.org/grpc.(*Server).serveStreams.func1
2023-09-19T14:39:22.761+0100 [DEBUG] provider.terraform-provider-statuspage_v0.1.12: 	google.golang.org/[email protected]/server.go:920 +0x294
2023-09-19T14:39:22.762+0100 [DEBUG] provider.stdio: received EOF, stopping recv loop: err="rpc error: code = Unavailable desc = error reading from server: EOF"
2023-09-19T14:39:22.762+0100 [DEBUG] provider: plugin process exited: path=.terraform/providers/registry.terraform.io/yannh/statuspage/0.1.12/linux_amd64/terraform-provider-statuspage_v0.1.12 pid=201878 error="exit status 2"
2023-09-19T14:39:22.762+0100 [ERROR] plugin.(*GRPCProvider).ImportResourceState: error="rpc error: code = Unavailable desc = error reading from server: EOF"
2023-09-19T14:39:22.762+0100 [ERROR] vertex "statuspage_metric.staging_platform_api_success_rate (import id \"m219lkb9w9m5/0vnm97s93bty\")" error: Plugin did not respond
2023-09-19T14:39:22.762+0100 [ERROR] vertex "statuspage_metric.staging_platform_api_success_rate (expand)" error: Plugin did not respond
╷
│ Error: Plugin did not respond
│ 
│ The plugin encountered an error, and failed to respond to the
│ plugin.(*GRPCProvider).ImportResourceState call. The plugin logs may contain more details.
╵

sean-snyk avatar Sep 19 '23 14:09 sean-snyk