-
Notifications
You must be signed in to change notification settings - Fork 63
Unable to deploy a kubernetes manifest when relying on another resource #123
Comments
The second error you got (when disabling service side planning) seems to be Terraform incorrectly identifying the OpenAPI ID for the object types, it defaults to prefixing things to I'm facing a similar issue were I'm deploying from a CRD (ClickhouseInstallation CRD from Altinity's Clickhouse operator), if running with server side planning it attempts to do a dry run but fails in case I depend on other resources (like namespace for example) and turning of server side planning breaks things as it no longer identifies the CRD since it looks for he wrong ID in the OpenAPI response. |
Hello, I've the same error with a simple resource "random_password" "arangodb-password" {
length = 32
special = false
}
resource "kubernetes_manifest" "test" {
provider = kubernetes-alpha
depends_on = [random_password.arangodb-password]
manifest = {
"apiVersion" = "database.arangodb.com/v1alpha"
"kind" = "ArangoDeployment"
"metadata" = {
"name" = "reviews-instance"
"namespace" = kubernetes_namespace.arangodb.metadata[0].name // OK here
}
"spec" = {
"mode" = "Single"
"bootstrap" = {
"passwordSecretNames" = {
"root" = random_password.arangodb-password.result //Failure here
}
}
"dbservers" = {
"resources" = {
"limits" = {
"cpu" = "400m"
"memory" = "512Mi"
}
"requests" = {
"cpu" = "100m"
"memory" = "256Mi"
}
}
}
}
}
} |
I'm getting into the same problem, maybe related to #129 (comment)... I'm using |
This is expected to happen when using "server-side planning" because in that mode, the provider will make dry-run API calls to Kubernetes during the planning step. However, at plan time, no resources have been created yet so interpolating values from other resources will produce this conflict. The long term solution is in PR #41. For example, you could do:
and once that's finished, you can now do another Further operations should behave as expected as long as all dependent resources have state available in the state file. I hope that makes enough sense. You can read more about the |
@alexsomesan PR #41 hasn't had a commit since June, is there something preventing that PR from getting merged? Work on this provider seems to be extremely sporadic with just 60 commits in almost a year. Given that this is supposed to replace the main kubernetes provider and how popular kubernetes is, is there any roadmap for this? Or release date or plan? |
Hi @rabidscorpio, the work on this alpha provider is experimental and involves some trial and error as we arrive at an acceptable implementation internally. Rest assured we're working to have this merged into the official provider ASAP and will share a date when we're able. Since the provider currently bypasses the SDK in order to achieve CRD support, we are working to update the provider to SDKv2. This is a prerequisite for #41 to be merged. |
@aareet I appreciate the response, thank you. It looks like there's mainly a single developer working on this when kubernetes is experiencing such a huge amount of popularity so it's frustrating that the project seems to be moving so slowly. I'm new to the kubernetes provider (but not the AWS provider) so I'm reluctant to put effort into implementing the mainline kubernetes provider when it's just going to be replaced with this one. |
I understand and appreciate your patience while we work through the various steps to GA :) Just to note, this provider is not intended to replace the official provider. Rather, we have been working on terraform-plugin-mux as a path to expose the manifest resource in the official provider. So if you were to implement something new in the official provider, it would likely not be replaced by the work being done here. |
Also not working for us. In our case, the |
@dwrusse and @BrandonALXEllisSS can you share your configuration and provider versions so we can try to reproduce your issues? |
|
Hi all, I have the same problem as @dwrusse, my Cert-manager configuration is exactly the same. Here is my playbook:
Here is information about Terraform and providers versions: Terraform v1.0.1
Here is the error I get with plan:
|
Hello, I have a similar problem. My modules flow:
Versions information:
The error:
|
@dwrusse same issue here... |
Terraform Version and Provider Version
0.13.0
Kubernetes Version
1.17.9
Affected Resource(s)
Terraform Configuration Files
Debug Output
Panic Output
Expected Behavior
I would expect the resource would be deployed and validation of the
clientID
andresourceID
fields would be deferred until theazurerm_user_assigned_identity
has been created.Actual Behavior
Error: rpc error: code = Unknown desc = value is not known
Steps to Reproduce
server_side_planning = true
terraform apply
Important Factoids
If not using server side planning, the plan portion fails with
Using static values for
clientID
andresourceID
does work correctlyReferences
Community Note
The text was updated successfully, but these errors were encountered: