Open
Description
Expected Behavior
I expect that my custom provider I have specified a developer override for via a .terraformrc
file will be generated properly.
Actual Behavior
The cdktf get
command fails, either from typescript errors in WSL or and invalid character error on windows. It is trying to put the :
character into type names and file paths. :
is an invalid file path character on windows.
Steps to Reproduce
- Make and install the custom provider here the
make install
command will work on WSL or use the .exe frommake build
on Windows. - Create a new
.terraformrc
file such as the following to override the "installer" provider with a local dev one:
provider_installation {
dev_overrides {
"registry.terraform.io/shihanng/installer" = "/tmp/tfproviders/"
}
direct {}
}
- Set the environment variable:
TF_CLI_CONFIG_FILE=%cd%\.terraformrc
or for WSLTF_CLI_CONFIG_FILE=$(pwd)/.terraformrc
- Generate a new cdktf project using the
shihanng/installer
provider. (I used C# as the language) - Observe a bunch of typescript errors in WSL or the following error on Windows:
Error: Path contains invalid characters: C:\Users\Scion\AppData\Local\Temp\cdktf.fHeGbu\providers\installer\data-apt:installer
at Xue.exports.checkPath (C:\Users\Scion\AppData\Roaming\npm\node_modules\cdktf-cli\bundle\bin\cmds\handlers.js:39:8584)
at Vj.exports.makeDir (C:\Users\Scion\AppData\Roaming\npm\node_modules\cdktf-cli\bundle\bin\cmds\handlers.js:39:8836)
at Object.<anonymous> (C:\Users\Scion\AppData\Roaming\npm\node_modules\cdktf-cli\bundle\bin\cmds\handlers.js:39:6954)
at tU.save (C:\Users\Scion\AppData\Roaming\npm\node_modules\cdktf-cli\bundle\bin\cmds\handlers.js:44:4597)
at C:\Users\Scion\AppData\Roaming\npm\node_modules\cdktf-cli\bundle\bin\cmds\handlers.js:44:5210
at Array.map (<anonymous>)
at iU.save (C:\Users\Scion\AppData\Roaming\npm\node_modules\cdktf-cli\bundle\bin\cmds\handlers.js:44:5201)
at C:\Users\Scion\AppData\Roaming\npm\node_modules\cdktf-cli\bundle\bin\cmds\handlers.js:116:14610
at Xvt (C:\Users\Scion\AppData\Roaming\npm\node_modules\cdktf-cli\bundle\bin\cmds\handlers.js:88:71624)
at async i9e (C:\Users\Scion\AppData\Roaming\npm\node_modules\cdktf-cli\bundle\bin\cmds\handlers.js:116:14571) {
code: 'EINVAL'
}
⠦ downloading and generating modules and providers...
Error: Path contains invalid characters: C:\Users\Scion\AppData\Local\Temp\cdktf.fHeGbu\providers\installer\data-apt:installer
Versions
language: C#
cdktf: 0.19.0
node: 20.8.1
terraform: 1.6.1
arch: x64
os: Ubuntu 22.04.3 WSL and Windows 11
Providers
shihanng/installer (developer override)
Gist
No response
Possible Solutions
No response
Workarounds
No response
Anything Else?
No response
References
No response
Help Wanted
- I'm interested in contributing a fix myself
Community Note
- Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
- Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request
- If you are interested in working on this issue or have submitted a pull request, please leave a comment