-
Notifications
You must be signed in to change notification settings - Fork 27
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
POST modules api with Content not supported #33
Comments
seems in my PoC using this dev version, I have 2 options given
currently the storage call is hardcoded to archive the temp dir once the files are downloaded, so I guess I shouldn't archive the files? I'm able to use the API Key after manually inserting it into the Database, so my CI will curl POST the git url with a readonly deploy ssh key for terralist to get the version of the module and package it up into it's own s3 bucket |
An endpoint in which a user can upload modules using the content option will definitely be an option in the future. Thanks for opening this tracking issue.
|
If I understand correctly, this ticket is about adding a POST endpoint for modules such as |
That's somewhat true. The current implementation accepts from the endpoint an URL and then the service will download the files from that particular URL and then uploads them to the storage. The ModuleRepository only saves the storage key into the database and that can be used later to serve the module archive (pass the key to the S3 resolver to generate a pre-signed URL). The difference between the current implementation and the one discussed in this topic is that this one should skip the download part and continue from uploading it to the storage. I had a draft of this implementation some time ago, but I dropped it because I was facing some problems with the signatures and checksums in the case of providers, but I think those problems should be fixed now since I changed the |
Just to clarify if it's currently possible to send Content binary stream to
v1/api/modules/:namespace/:name/:provider/:version/upload
:Seems not, because:
StorageInput supports
Content
:https://github.com/valentindeaconu/terralist/blob/661f9ab0830c48f73cf650c275ff323387b03716/pkg/storage/resolver.go#L4-L12
but Controller does not support providing module binary data:
https://github.com/valentindeaconu/terralist/blob/661f9ab0830c48f73cf650c275ff323387b03716/internal/server/controllers/module.go#L100-L123
because the Module repository only supports Uploads based on location
https://github.com/valentindeaconu/terralist/blob/661f9ab0830c48f73cf650c275ff323387b03716/internal/server/repositories/module.go#L143-L153
The text was updated successfully, but these errors were encountered: