-
Notifications
You must be signed in to change notification settings - Fork 9.2k
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
[Enhancement]: Reduce size #31345
Comments
Community NoteVoting for Prioritization
Volunteering to Work on This Issue
|
I've just run
Alas, according to golang/go#36313 there's not much we can do about that directly; that section is needed for certain tools/library calls to work. However, indirectly there might be a way we could decrease the binary size.
You'll see there that for the Unfortunately, that migration work is sizeable & boring (adds no new features in and of itself) so is unlikely to be tackled with any particular fervour I wouldn't have thought. I don't work for or represent Hashicorp though so am only basing that assumption on how I'd prioritize things if I was maintaining a project with issue and PR lists of this project's size. There's also this note from the Contributor Guide:
If anyone wants to reproduce my findings or investigate in any more depth I had to have a number of attempts to get the analysis to work:
|
Thanks for looking at this! I've looked too, and the builds are indeed using the low-handing fruit of stripping the binary ( I don't think there is anything actionable, but I thought I'd see if anyone had ideas. |
@pauldraper it's been a while since I looked at this. The AWS migration to SDKv2 has been progressing well, spurred on by AWS' announcement that SDKv1 is going to be out of support soon. However, it doesn't appear to have had much effect on the size of the plugin; that's likely down to the fact that as much space as we might have saved by converting over to the newer SDK, support for new services/resources has pulled in their SDKs which have eaten up more space. As it stands, on a stripped binary from $ ls -lh ~/go/bin/terraform-provider-aws
-rwxr-xr-x. 1 mattburgess mattburgess 512M Jul 30 00:40 /home/mattburgess/go/bin/terraform-provider-aws One option that you might want to look at is the new(ish) awscc provider. This uses the CloudControl API (alone) to create all resource types hence only needs to pull in only a single AWS service SDK. As such, it's much smaller and is likely to not increase massively with new services/resources added: $ ls -lh ~/go/bin/terraform-provider-awscc
-rwxr-xr-x. 1 mattburgess mattburgess 63M Jul 30 00:40 /home/mattburgess/go/bin/terraform-provider-awscc It might not be feasible to migrate existing codebases over, depending on their size. But it might be worth looking at for greenfield projects/components. |
Unless all of the functionality provided by the |
Description
This plugin is 383 MB. (Linux)
That's huge.
Can it be smaller?
Affected Resource(s) and/or Data Source(s)
No response
Potential Terraform Configuration
No response
References
No response
Would you like to implement a fix?
None
The text was updated successfully, but these errors were encountered: