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
On the official documentation it states that the kubernetes_manifest resource requires API access at planning time, why is this a thing? It would be amazing if this provider had a flag to turn this off and instead let it fail at apply time. If I want to create a CRD at the same time as deployment I need to use a third party provider. I would prefer to use this provider but I'm limited by this functionality. I can't imagine I'm the only person that ever requested this.
Multi-stage deployments aren't a solution, they are a workaround.
Proposed variable ignore_api_check_at_planning to disable this.
On the official documentation it states that the kubernetes_manifest resource requires API access at planning time, why is this a thing?
The reason this is a thing is because Terraform, internally uses a type-system to structure resource state data on. This is used in the communication protocol with providers, the internal in-memory structures of Terraform as well as state storage.
Terraform expects that a resource's schema and attributes' types stay consistent throughout its lifecycle and has checks in place to enforce this.
In order support CRDs (with their dynamic and ephemeral schemas) and also abide by the type consistency expectations of Terraform, we have to look up the schema of a resource (CR) dynamically during the planning, so that we can return it's corresponding type to Terraform accordingly.
There is no way around this limitation at the moment if we want to keep supporting CRD / CR resources.
The best way to avoid running into this is to split the CRDs outside of the main bulk of resources and apply them beforehand. This should be fairly easy to accomplish in any CI/CD environment.
Terraform core is exploring opportunities to address this limitation, and the solution will come from them.
Description
On the official documentation it states that the kubernetes_manifest resource requires API access at planning time, why is this a thing? It would be amazing if this provider had a flag to turn this off and instead let it fail at apply time. If I want to create a CRD at the same time as deployment I need to use a third party provider. I would prefer to use this provider but I'm limited by this functionality. I can't imagine I'm the only person that ever requested this.
Multi-stage deployments aren't a solution, they are a workaround.
Proposed variable
ignore_api_check_at_planning
to disable this.Potential Terraform Configuration
References
Community Note
The text was updated successfully, but these errors were encountered: