scenario
kubernetes resource "xyz" is already present in kubernetes.
terraform apply with a kubectl_manifest resource that creates resource "xyz".
expected behaviourterraform apply should fail with "resource xyz already present in Kubernetes."
actual behaviour
Terraform suceeds the apply, and it is silently imported into terraform state. This is dangerous as the ressource "xyz" will now be destroyed in Kubernetes on subsequent terraform destroy although it was neither created by terraform or manually imported into terraform state.
The observed behaviour breaks the terraform assumption of 1-1 between terraform resource and remote resource, which well-behaved providers should follow.
scenario kubernetes resource "xyz" is already present in kubernetes.
terraform apply
with akubectl_manifest
resource that creates resource "xyz".expected behaviour
terraform apply
should fail with "resource xyz already present in Kubernetes."actual behaviour Terraform suceeds the apply, and it is silently imported into terraform state. This is dangerous as the ressource "xyz" will now be destroyed in Kubernetes on subsequent
terraform destroy
although it was neither created by terraform or manually imported into terraform state. The observed behaviour breaks the terraform assumption of 1-1 between terraform resource and remote resource, which well-behaved providers should follow.