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
╷
│ Error: github.com/kbst/terraform-provider-kustomize/kustomize.kustomizationResourceDiff: apiVersion: "v1", kind: "ResourceQuota", namespace: "default" name: "default": patch failed 'application/strategic-merge-patch+json': the name of the object (default2) does not match the name on the URL (default)
│
│ with kustomization_resource.current,
│ on manifest.tf line 9, in resource "kustomization_resource" "current":
│ 9: resource "kustomization_resource" "current" {
│
╵
Namespace change
╷
│ Error: github.com/kbst/terraform-provider-kustomize/kustomize.kustomizationResourceDiff: apiVersion: "v1", kind: "ResourceQuota", namespace: "default" name: "default": patch failed 'application/strategic-merge-patch+json': the namespace of the object (default2) does not match the namespace on the request (default)
│
│ with kustomization_resource.current,
│ on manifest.tf line 9, in resource "kustomization_resource" "current":
│ 9: resource "kustomization_resource" "current" {
│
╵
When using for_each, as is the default, name and namespace are part of the ID in the Terraform state. So a change to either, will out of the box trigger a destroy and recreate apply in Terraform. However, when not using for_each to avoid its limitations, a name or namespace change does not change the ID in the Terraform state. Hence, Terraform will run the diff function for the resource. But the dry-run used in the diff function will fail with the above errors from the K8s API.
The text was updated successfully, but these errors were encountered:
Name change
Namespace change
When using
for_each
, as is the default, name and namespace are part of the ID in the Terraform state. So a change to either, will out of the box trigger a destroy and recreate apply in Terraform. However, when not usingfor_each
to avoid its limitations, a name or namespace change does not change the ID in the Terraform state. Hence, Terraform will run the diff function for the resource. But the dry-run used in the diff function will fail with the above errors from the K8s API.The text was updated successfully, but these errors were encountered: