Skip to content

datasource akp_kargo_instance value conversion error #405

@PleaseMeHaveNoRegrets

Description

@PleaseMeHaveNoRegrets

After our last terraform run - it seems that the datasource akp_kargo_instance may have a bug from the provider.

Error: Value Conversion Error

  with data.akp_kargo_instance.prod,
  on kargo-clusters.tf line 5, in data "akp_kargo_instance" "prod":
   5: data "akp_kargo_instance" "prod" {

An unexpected error was encountered while verifying an attribute value
matched its expected type to prevent unexpected behavior or panics. This is
always an error in the provider. Please report the following to the provider
developer:

Expected framework type from provider logic:
types.ObjectType["claims":types.MapType[types.ObjectType["values":types.ListType[basetypes.StringType]]]]
/ underlying type:
tftypes.Object["claims":tftypes.Map[tftypes.Object["values":tftypes.List[tftypes.String]]]]
Received framework type from provider logic:
types.ObjectType["claims":types.MapType[types.ObjectType["values":types.SetType[basetypes.StringType]]]]
/ underlying type:
tftypes.Object["claims":tftypes.Map[tftypes.Object["values":tftypes.Set[tftypes.String]]]]
Path: kargo.spec.oidc_config.user_account
2025-10-22T20:17:57.107Z [INFO]  provider: plugin process exited: plugin=.terraform/providers/registry.terraform.io/akuity/akp/0.9.10/linux_amd64/terraform-provider-akp_v0.9.10 id=477

I am able to replicate this on akuity/akp 0.9.10 - though am able to successfully build a plan on akuity/akp 0.9.5, which was the last successful run of this pipeline from a few weeks ago.

the datasource in question is simply and minimally defined

data "akp_kargo_instance" "prod" {
  name = "prod"
}

more details inline with tf plan

Error: -25T02:41:58.778Z [ERROR] provider.terraform-provider-akp_v0.9.10: Response contains error diagnostic: tf_data_source_type=akp_kargo_instance tf_proto_version=6.10 tf_rpc=ReadDataSource @caller=github.com/hashicorp/terraform-plugin-go@v0.29.0/tfprotov6/internal/diag/diagnostics.go:58 tf_provider_addr=registry.terraform.io/akuity/akp @module=sdk.proto tf_req_id=7a7fcc33-fc5e-cb26-3be5-c986a0a5b597 diagnostic_attribute="AttributeName(\"kargo\").AttributeName(\"spec\").AttributeName(\"oidc_config\").AttributeName(\"user_account\")"
  diagnostic_detail=
  | An unexpected error was encountered while verifying an attribute value matched its expected type to prevent unexpected behavior or panics. This is always an error in the provider. Please report the following to the provider developer:
  | 
  | Expected framework type from provider logic: types.ObjectType["claims":types.MapType[types.ObjectType["values":types.ListType[basetypes.StringType]]]] / underlying type: tftypes.Object["claims":tftypes.Map[tftypes.Object["values":tftypes.List[tftypes.String]]]]
  | Received framework type from provider logic: types.ObjectType["claims":types.MapType[types.ObjectType["values":types.SetType[basetypes.StringType]]]] / underlying type: tftypes.Object["claims":tftypes.Map[tftypes.Object["values":tftypes.Set[tftypes.String]]]]
  | Path: kargo.spec.oidc_config.user_account
   diagnostic_severity=ERROR diagnostic_summary="Value Conversion Error" timestamp=2025-10-25T02:41:58.778Z
Error: -25T02:41:58.779Z [ERROR] vertex "data.akp_kargo_instance.prod" error: Value Conversion Error
Error: -25T02:41:58.779Z [ERROR] vertex "data.akp_kargo_instance.prod (expand)" error: Value Conversion Error

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions