Closed mehrdad-faridi closed 2 years ago
This is not a provider issue. This is exactly how terraform works.
You have a for_each
block in the kubectl_manifest
resource. That will create an array of resources, where the index is the key of the map.
Therefore, you need to change your import to:
terraform import kubectl_manifest.prod-manifests["/apis/apps/v1/namespaces/default/deployments/nginx-deployment"] "apps/v1//Deployment//nginx-deployment//default"
(In PowerShell for Windows, it'll be:
terraform import 'kubectl_manifest.prod-manifests[\"/apis/apps/v1/namespaces/default/deployments/nginx-deployment\"]' "apps/v1//Deployment//nginx-deployment//default"
yes, you're right @DaleyKD. thank you for your help. :raised_hands:
Hi,
based on the document for import state(here) when I import state, the state file does not show correctly.
terraform import kubectl_manifest.prod-manifests "apps/v1//Deployment//nginx-deployment//default"
but
Terraform state show
is: