You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I can't quite decide whether to raise this with the KCP community or the terraform-provider-kubernetes community. I think you can argue it either way!
The problem is that using if you use custom resources in a KCP, then you cannot use terraform to manage them:
terraform apply
╷
│ Error: Plugin error
│
│ with kubernetes_manifest.mycustomkind,
│ on main.tf line 15, in resource "kubernetes_manifest" "mycustomkind":
│ 15: resource "kubernetes_manifest" "mycustomkind" {
│
│ The plugin returned an unexpected error from plugin.(*GRPCProvider).PlanResourceChange: rpc error: code = Unknown desc = failed to determine resource type ID: cannot get resource type from OpenAPI
│ (mycustomapi.com/v1alpha1, Kind=mycustomkind): mycustomapi.com/v1alpha1, Kind=mycustomkind resource not found in OpenAPI index
KCP obviously breaks these assumptions. The OpenAPISchema is still there - on the APIResourceSchema object.
At this point I'm just raising this without any expectation it will be fixed - but I am interested in finding out if other KCP users would also like this feature.
Proposed Solution
I think it's incumbent on the KCP community to push a fix to the terraform-provider-kubernetes to cope with custom resources where is no CRD.
Alternative Solutions
No response
Want to contribute?
I would like to work on this issue.
Additional Context
No response
The text was updated successfully, but these errors were encountered:
Hey @andrewlee1089 - thanks for using kcp and reporting this issue! As you mentioned, this seems to be an issue with the Terraform provider, we can't do much about it. I'm happy to keep this open, should we maybe convert it into a discussion?
The code in the provider isn't fully clear to me, but it seems to me that ideally, the provider would look for a CRD and if it cannot find one, fall back to OpenAPI discovery directly. I wonder if this is something that could be raised upstream?
Feature Description
I can't quite decide whether to raise this with the KCP community or the
terraform-provider-kubernetes
community. I think you can argue it either way!The problem is that using if you use custom resources in a KCP, then you cannot use terraform to manage them:
This is because the terraform code in TFTypeFromOpenAPI (https://github.com/hashicorp/terraform-provider-kubernetes/blob/main/manifest/provider/resource.go#L85C30-L85C47) assumes that custom resource types:
KCP obviously breaks these assumptions. The OpenAPISchema is still there - on the APIResourceSchema object.
At this point I'm just raising this without any expectation it will be fixed - but I am interested in finding out if other KCP users would also like this feature.
Proposed Solution
I think it's incumbent on the KCP community to push a fix to the terraform-provider-kubernetes to cope with custom resources where is no CRD.
Alternative Solutions
No response
Want to contribute?
Additional Context
No response
The text was updated successfully, but these errors were encountered: