Hi!
I am following along the new Terraform Import Tutorial
I have the latest TF 1.5.5 installed, and docker desktop running with the required image, but the step: tf plan -generate-config-out=generated.tf fails with:
╷
│ Error: Too many command line arguments
│
│ To specify a working directory for the plan, use the global -chdir flag.
╵
Any idea what is wrong here? Which additional traces would be needed?
Yes, this is specifically PowerShell behavior. I think it tries to parse the flags as parameters itself first, and since . isn’t an allowed character it splits that into a separate argument. There no real solution other than to use the appropriate quoting for your shell to ensure arguments are passed to the program as expected. This applies to any program that’s not a natively written to work within PowerShell, not just Terraform.