-
Notifications
You must be signed in to change notification settings - Fork 460
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cdktf-go: Error when following the examples in the documentation #3436
Comments
I think you're running into a duplicate/combination of both #3188 and #2907. There are two issues:
The problem is that these version numbers get incremented relatively frequently, at minimum with every new feature release of CDKTF. The tutorials were written at the time when CDKTF was at v0.13 and the corresponding AWS prebuilt provider was at v10. Now CDKTF is at v0.20 and the corresponding AWS prebuilt provider is at v19, so the import statements should instead read:
Because the tutorials live in an entirely different repo managed by the Education team and not by us, we don't have any way to automate updating these when we do releases, unfortunately, which is why there's this regression. In any case, I've also included updating these to v19 in my PR on the tutorial, which should address the issue for anyone trying the tutorial today, but I can't guarantee this problem won't reoccur in the future. For Go users, we may have no choice but to add a note of some kind to double-check the version numbers in the import statements because they may become outdated in the future. |
@xiehan Thank you for such a detailed response! I tried to initialise the project without specifying the aws provider version, but got an error: cdktf init --template="go" --providers="aws" --local
...
[2024-01-18T21:23:33.016] [INFO] default - Checking whether pre-built provider exists for the following constraints:
provider: aws
version : latest
language: go
cdktf : 0.20.1
[2024-01-18T21:23:36.472] [INFO] default - Found pre-built provider.
Adding package github.com/cdktf/cdktf-provider-aws-go/aws @ 19.1.1
[2024-01-18T21:24:25.965] [ERROR] default - go: downloading github.com/cdktf/cdktf-provider-aws-go/aws/v19 v19.1.1
go: downloading github.com/cdktf/cdktf-provider-aws-go/aws/v19 v19.1.1
[2024-01-18T21:24:36.972] [ERROR] default - go: github.com/cdktf/cdktf-provider-aws-go/aws/[email protected]: create zip: module source tree too large (max size is 524288000 bytes)
go: github.com/cdktf/cdktf-provider-aws-go/aws/[email protected]: create zip: module source tree too large (max size is 524288000 bytes)
non-zero exit code 1
Error: non-zero exit code 1
at ChildProcess.<anonymous> (/opt/homebrew/lib/node_modules/cdktf-cli/bundle/bin/cmds/handlers.js:99:8179)
at Object.onceWrapper (node:events:634:26)
at ChildProcess.emit (node:events:519:28)
at ChildProcess.emit (node:domain:488:12)
at maybeClose (node:internal/child_process:1105:16)
at Socket.<anonymous> (node:internal/child_process:457:11)
at Socket.emit (node:events:519:28)
at Socket.emit (node:domain:488:12)
at Pipe.<anonymous> (node:net:337:12)
at Pipe.callbackTrampoline (node:internal/async_hooks:130:17)
Collecting Debug Information...
/opt/homebrew/lib/node_modules/cdktf-cli/node_modules/yoga-layout-prebuilt/yoga-layout/build/Release/nbind.js:53
throw ex;
^
Error: non-zero exit code 1
at ChildProcess.<anonymous> (/opt/homebrew/lib/node_modules/cdktf-cli/bundle/bin/cmds/handlers.js:99:8179)
at Object.onceWrapper (node:events:634:26)
at ChildProcess.emit (node:events:519:28)
at ChildProcess.emit (node:domain:488:12)
at maybeClose (node:internal/child_process:1105:16)
at Socket.<anonymous> (node:internal/child_process:457:11)
at Socket.emit (node:events:519:28)
at Socket.emit (node:domain:488:12)
at Pipe.<anonymous> (node:net:337:12)
at Pipe.callbackTrampoline (node:internal/async_hooks:130:17) {
stderr: 'go: downloading github.com/cdktf/cdktf-provider-aws-go/aws/v19 v19.1.1\n' +
'go: github.com/cdktf/cdktf-provider-aws-go/aws/[email protected]: create zip: module source tree too large (max size is 524288000 bytes)\n'
} I found a related issue, but it's closed as solved. |
It's closed as solved because it will be fixed the next time the AWS provider does a release, which will trigger a new release of our prebuilt provider for AWS. The AWS provider does weekly releases on Thursday nights, so a new version should be out and this should be resolved by tomorrow morning. |
Hi @nikpivkin 👋 There's a new release out now of the pre-built provider that fixes this. I just checked and was able to install the latest package locally 👍 |
Description
Running the
cdktf synth
command with the example from the documentation returns an error:Links
https://developer.hashicorp.com/terraform/tutorials/cdktf/cdktf-build?in=terraform%2Fcdktf&variants=cdk-language%3Ago
Help Wanted
Community Note
The text was updated successfully, but these errors were encountered: