terraform-cdk: `cdktf get` keeps on `downloading and generating`, but never finishes
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
cdktf & Language Versions
Terraform v1.0.11 on darwin_arm64
cdktf: 0.8.1
Affected Resource(s)
cdktf
Debug Output
Expected Behavior
Finish eventually
Actual Behavior
It keeps on running, never finishing the download (and it never populates the generated folder)
Steps to Reproduce
brew install terraform cdktf
mkdir folder
cd folder
cdktf init --template="go" --local
Add the aws provider to cdktf.json:
"terraformProviders": [
"hashicorp/aws@~> 3.68.0"
],
cdktf get
Important Factoids
Trying to follow this tutorial
As simple as it gets
References
https://github.com/hashicorp/terraform-provider-aws/issues/22075
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Reactions: 11
- Comments: 19 (7 by maintainers)
Closing this as there have been different performance improvements to the code generation since, most recently through an upstream fix in JSII by @DanielMSchmidt.
https://github.com/hashicorp/terraform-cdk/issues/1886 contains a bit more context on this whole topic as well.
But as usual, if anything still feels off, donβt hesitate to file a new issue and weβll look into it!
My workaround has been to use this pre-built package. Add it to the dependencies in the
Pipfile:This will also install matching
cdktfandconstructspackages, with the commandpipenv install.Then in the
main.pyscript, just do a usual import as such:Then no need to do
cdktf get, just jump tocdktf planordeploy.Using pre-built packages is probably more pythonic anyways.