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

Error: Failed to update proposed state from prior state #2487

Open
giorgisturuagit opened this issue May 9, 2024 · 2 comments
Open

Error: Failed to update proposed state from prior state #2487

giorgisturuagit opened this issue May 9, 2024 · 2 comments
Labels

Comments

@giorgisturuagit
Copy link

I were using 2.29.0 version and after updating it to 2.30.0 version I got this kind of error, without changing anything, only provider version

Error: Failed to update proposed state from prior state

with kubernetes_manifest.kibana,
on main.tf line 87, in resource "kubernetes_manifest" "kibana":
87: resource "kubernetes_manifest" "kibana" {

AttributeName("podTemplate"): can't use
tftypes.Object["metadata":tftypes.Object["creationTimestamp":tftypes.DynamicPseudoType],
"spec":tftypes.Object["containers":tftypes.Tuple[tftypes.Object["env":tftypes.Tuple[tftypes.Object["name":tftypes.String,
"value":tftypes.String]], "name":tftypes.String,
"readinessProbe":tftypes.Object["httpGet":tftypes.Object["path":tftypes.String,
"port":tftypes.Number, "scheme":tftypes.String]],

@cgaolei
Copy link

cgaolei commented May 10, 2024

Having exactly the same issue today. No change of anything except provider version upgraded to 2.30.0.

@bufadu
Copy link

bufadu commented May 14, 2024

Same here, looks related to f83d63a

Trace is :

Stack trace from the terraform-provider-kubernetes_v2.30.0_x5 plugin:

panic: ElementKeyInt(0): can't use tftypes.Object["attach_metadata":tftypes.Object["node":tftypes.Bool], "authorization":tftypes.Object["credentials":tftypes.Object["key":tftypes.String, "name":tftypes.String, "optional":tftypes.Bool], "credentialsFile":tftypes.String, "type":tftypes.String], "basicAuth":tftypes.Object["password":tftypes.Object["key":tftypes.String, "name":tftypes.String, "optional":tftypes.Bool], "password_file":tftypes.String, "username":tftypes.Object["key":tftypes.String, "name":tftypes.String, "optional":tftypes.Bool]], "bearerTokenFile":tftypes.String, "bearerTokenSecret":tftypes.Object["key":tftypes.String, "name":tftypes.String, "optional":tftypes.Bool], blablabla

goroutine 113 [running]:
github.com/hashicorp/terraform-plugin-go/tftypes.NewValue(...)
	github.com/hashicorp/terraform-plugin-go@v0.22.1/tftypes/value.go:278
github.com/hashicorp/terraform-provider-kubernetes/manifest/morph.DeepUnknown({0x3122888, 0xc005843950?}, {{0x3122888?, 0xc005b99440?}, {0x297c820?, 0xc0087cd968?}}, 0xc0087cddd0)
	github.com/hashicorp/terraform-provider-kubernetes/manifest/morph/scaffold.go:86 +0x19ae
github.com/hashicorp/terraform-provider-kubernetes/manifest/morph.DeepUnknown({0x3122620, 0xc0059a9ad0?}, {{0x3122620?, 0xc005b9e330?}, {0x2aa8b60?, 0xc005b6ff80?}}, 0xc0087cdc50)
	github.com/hashicorp/terraform-provider-kubernetes/manifest/morph/scaffold.go:33 +0x1cb4
github.com/hashicorp/terraform-provider-kubernetes/manifest/morph.DeepUnknown({0x3122620, 0xc005b6f530?}, {{0x3122620?, 0xc005b9f320?}, {0x2aa8b60?, 0xc005b6f7a0?}}, 0xc0087cd9e0)
	github.com/hashicorp/terraform-provider-kubernetes/manifest/morph/scaffold.go:33 +0x1cb4
github.com/hashicorp/terraform-provider-kubernetes/manifest/provider.(*RawProviderServer).PlanResourceChange(0xc0000ae600, {0x311b4b8, 0xc001080f90}, 0xc0000ac5a0)
	github.com/hashicorp/terraform-provider-kubernetes/manifest/provider/plan.go:369 +0x3173
github.com/hashicorp/terraform-plugin-mux/tf5muxserver.(*muxServer).PlanResourceChange(0xc000164b60, {0x311b4b8?, 0xc001080c90?}, 0xc0000ac5a0)
	github.com/hashicorp/terraform-plugin-mux@v0.15.0/tf5muxserver/mux_server_PlanResourceChange.go:73 +0x2ad
github.com/hashicorp/terraform-plugin-go/tfprotov5/tf5server.(*server).PlanResourceChange(0xc000498320, {0x311b4b8?, 0xc001080270?}, 0xc000270000)
	github.com/hashicorp/terraform-plugin-go@v0.22.1/tfprotov5/tf5server/server.go:811 +0x3d0
github.com/hashicorp/terraform-plugin-go/tfprotov5/internal/tfplugin5._Provider_PlanResourceChange_Handler({0x2d1a880?, 0xc000498320}, {0x311b4b8, 0xc001080270}, 0xc0010ac000, 0x0)
	github.com/hashicorp/terraform-plugin-go@v0.22.1/tfprotov5/internal/tfplugin5/tfplugin5_grpc.pb.go:500 +0x169
google.golang.org/grpc.(*Server).processUnaryRPC(0xc0001c2e00, {0x311b4b8, 0xc0010801e0}, {0x3123a60, 0xc000e8ed00}, 0xc0011a4000, 0xc000e76de0, 0x41c7480, 0x0)
	google.golang.org/grpc@v1.62.1/server.go:1386 +0xe23
google.golang.org/grpc.(*Server).handleStream(0xc0001c2e00, {0x3123a60, 0xc000e8ed00}, 0xc0011a4000)
	google.golang.org/grpc@v1.62.1/server.go:1797 +0x100c
google.golang.org/grpc.(*Server).serveStreams.func2.1()
	google.golang.org/grpc@v1.62.1/server.go:1027 +0x8b
created by google.golang.org/grpc.(*Server).serveStreams.func2 in goroutine 49
	google.golang.org/grpc@v1.62.1/server.go:1038 +0x135

Error: The terraform-provider-kubernetes_v2.30.0_x5 plugin crashed!

for this kubernetes_manifest :

resource "kubernetes_manifest" "redacted" {

  manifest = {
    "apiVersion" = "operator.victoriametrics.com/v1beta1"
    "kind"       = "VMServiceScrape"
    "metadata" = {
      "name"      = "redacted"
      "namespace" = "redacted"
    }
    "spec" = {
      "discoveryRole" = "endpoints"
      "endpoints" = [
        {
          "port" = "metrics"
          "relabelConfigs" = [
            {
              "action" = "keep"
              "regex"  = "true"
              "sourceLabels" = [
                "__meta_kubernetes_service_annotation_prometheus_io_scrape",
              ]
            },
            {
              "action" = "replace"
              "regex"  = "(https?)"
              "sourceLabels" = [
                "__meta_kubernetes_service_annotation_prometheus_io_scheme",
              ]
              "targetLabel" = "__scheme__"
            },
            {
              "action" = "replace"
              "regex"  = "(.+)"
              "sourceLabels" = [
                "__meta_kubernetes_service_annotation_prometheus_io_path",
              ]
              "targetLabel" = "__metrics_path__"
            },
            {
              "action"      = "replace"
              "regex"       = "([^:]+)(?::\\d+)?;(\\d+)"
              "replacement" = "$1:$2"
              "sourceLabels" = [
                "__address__",
                "__meta_kubernetes_service_annotation_prometheus_io_port",
              ]
              "targetLabel" = "__address__"
            },
          ]
        },
      ]
      "jobLabel" = "app.kubernetes.io/name"
      "namespaceSelector" = {
        "any" = true
      }
      "selector" = {}
    }
  }
}```

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants