cdktf get failing when using asdf version manager
See original GitHub issueCommunity 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
cdktf & Language Versions
cdktf --version 0.9.0
golang 1.16 terraform 1.1.5 nodejs 14.18.3
Affected Resource(s)
N/A
Debug Output
cdktf get
⠧ downloading and generating modules and providers...
No version is set for command terraform
Consider adding one of the following versions in your config file at
Error: non-zero exit code 126
at ChildProcess.<anonymous> (/Users/doneill/.asdf/installs/nodejs/14.18.3/.npm/lib/node_modules/cdktf-cli/bundle/bin/cmds/handlers.js:43:1685)
at Object.onceWrapper (events.js:520:26)
at ChildProcess.emit (events.js:400:28)
at maybeClose (internal/child_process.js:1058:16)
at Socket.<anonymous> (internal/child_process.js:443:11)
at Socket.emit (events.js:400:28)
at Pipe.<anonymous> (net.js:686:12) {
stderr: 'No version is set for command terraform\n' +
'Consider adding one of the following versions in your config file at \n' +
'terraform 1.1.5\n'
}
Expected Behavior
cdktf get should succeed
Actual Behavior
cdktf get fails
Steps to Reproduce
See above
Important Factoids
Using asdf for managing go, terraform and node.
References
Following this example - https://github.com/hashicorp/terraform-cdk/blob/main/docs/getting-started/go.md
Issue Analytics
- State:
- Created 2 years ago
- Comments:13 (7 by maintainers)
Top Results From Across the Web
gdk update failing due to asdf being installed by brew - GitLab
Please use the package manager that you used to install asdf to upgrade asdf. ERROR: Failed to update asdf. make: *** [asdf-update] Error...
Read more >homebrew-core - Homebrew Formulae
a2ps 4.14 Any‑to‑PostScript filter
aacgain 1.8 AAC‑supporting version of mp3gain
aalib 1.4rc5 Portable ASCII art graphics library
aamath 0.3 Renders mathematical expressions as ASCII art
Read more >External contributions - Sourcegraph handbook
Find its link directly in the #buildkite-main channel. Or run sg ci status in your shell, with the main branch checked out. Search...
Read more >hashicorp-terraform/Lobby - Gitter
Error: failed to render : <template_file>:11,88-89: Invalid character; ... And if inconsistencies just mean getting hit with extra plan steps that could be ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thanks for filing this. I ran into the same issue. As a workaround I added an
.envrc
like this so https://direnv.net/ can point cdktf to the asdf-provided binary.I also opened https://github.com/asdf-community/asdf-hashicorp/issues/64 for consideration in the asdf plugin.
@ansgarm just noticed your docs comment (separate issue), there is an example here https://github.com/damianoneill/cdk if it helps.