-
Notifications
You must be signed in to change notification settings - Fork 458
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
feat: add experimental support for Go #686
Conversation
update go template and fix patch-package removal as well
Hey @skorfmann @DanielMSchmidt 👋 And if you want to try this locally: git checkout support-golang
yarn build && yarn package
cd some/test/dir
# adjust to your env
/Users/ansgar/projects/hashicorp/terraform-cdk/packages/cdktf-cli/bin/cdktf --dist ../../hashicorp/terraform-cdk/dist init --local --template go I still have to adjust the imports in the examples, but you can use them as a quick reference of how to work with the cdktf constructs in Go: https://github.com/hashicorp/terraform-cdk/blob/support-golang/examples/go/docker/main.go |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, left a few comments.
Is this https://github.com/hashicorp/terraform-cdk-go already pushed from this PR? What I'm wondering is, if we could start building a sample prebuilt provider for this. I'd be keen to see how. that works out.
I pushed it manually based on this PR, yep.
I'm going to create a follow up issue for the prebuilt providers for Go as it is not in scope for this PR. But if you want to, feel free to experiment with that already. |
…ing dots sometimes work but are not supposed to be allowed at all (and break examples)
as nodejs is required even if not installing via npm
…ocess.env (available to subprocesses like jsii-srcmak)
…ocess.env in get command
…o projects (and template). adding example code for aws go example
…cdktf get with Go
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks pretty good and works as expected. Was able to build and synth the aws example. The cdktf init
works flawless as well 👍
Building the AWS provider took roughly 10 minutes and peaked at 6.7 GB of memory consumption. I think we should create an issue in jsii to track this. After merging this, we should also look into adding Go to the pre-built providers.
…ady. Print a warning if the present value does not contain --max-old-space-size
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good - great work 🚀
Ah, and please adjust the title for a semantic commit |
I'm going to lock this pull request because it has been closed for 30 days. This helps our maintainers find and focus on the active issues. If you've found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further. |
This PR is going to add language support for Go 🎉 (It will resolve #368)
Open Tasks
hashicorprandom/hashicorprandom
which feels too verbose)hashicorp/aws@~> 3.39.0
(out of memory error gist)package.json
to AWS example as soon as OOM error is fixedcdktf get
print instructionson which version of jsii-runtime was used and should be included in the rooton whichgo.mod
go
command to run to let go generate required jsii-runtime import