Skip to content
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

I would like to have more detailed examples of file structures during the upload process! #364

Closed
WeiMengXS opened this issue Dec 29, 2023 · 8 comments

Comments

@WeiMengXS
Copy link

When uploading the provider, we already know that we need to prepare the .zip file containing all the files described in the 'how to prepare release' documentation. However, when uploading the module, it seems that the documentation does not explicitly specify how the directory structure should be maintained for the upload. I tried uploading the downloaded module and encountered the following error.
1、
error:
image

My directory structure is:
image

command use:
curl -XPOST -H 'x-api-key:eNsZxQ1vQsY0QqEGgWMHXsKE' --fail-with-body -F archive=@terraform-aws-iam-0.0.2.zip "https://example.com/terraform/modules/v1/fc/vpc/aws/0.0.2"

2、
error:
image

My directory structure is:
image

command use:
curl -XPOST -H 'x-api-key:eNsZxQ1vQsY0QqEGgWMHXsKE' --fail-with-body -F archive=@Archiv.zip "https://example.com/terraform/modules/v1/fc/vpc/aws/0.0.2"

@PacoVK
Copy link
Owner

PacoVK commented Dec 29, 2023

Hey, indeed Tapir was not able to handle nested modules properly. I addressed this in #365 and also added now more details for the expected module structure (althought, the recommended layout is a should) However, the .tf files should be at the root level within the .zip file :) see
Before i create another release you can already check using the Docker image pacovk/tapir:main or pacovk/tapir:latest

@WeiMengXS
Copy link
Author

WeiMengXS commented Jan 2, 2024

hi,I have updated to the latest version.
When I upload the module, the problem still occurs, but there is no problem uploading the provider.

What's the problem here? es seems to work.
What aspects should I investigate?

image

command use:
curl -XPOST -H 'x-api-key:xxxxx' --fail-with-body -F archive=@Archiv.zip "https://xxx.com/terraform/modules/v1/fc/vpc/aws/0.0.2"

Encounter problems:
image

@PacoVK
Copy link
Owner

PacoVK commented Jan 2, 2024

While the logs indicate everything worked well, there is an issue with the report index mapping in ES. So you can either

  • try to start with a fresh Elasticsearch
  • delete and recreate (recreate can Tapir handle for you) the reports index

@WeiMengXS
Copy link
Author

image

I checked the index and it is normal.
image

Files I uploaded:
Archiv.zip

@PacoVK PacoVK mentioned this issue Jan 2, 2024
1 task
@PacoVK
Copy link
Owner

PacoVK commented Jan 2, 2024

Thanks, again! Fix is on the way. I'll create a release today later

@WeiMengXS
Copy link
Author

WeiMengXS commented Jan 5, 2024

When using module here, it seems to point to s3, and I chose local storage.

image image

@PacoVK
Copy link
Owner

PacoVK commented Jan 5, 2024

I think there was a leftover from a bigger refactoring, i fixed it and it will be available in latest soon. A release will also follow soonish! Thanks again, i use Tapir with s3 hence i did not recognize this faux pas

@WeiMengXS
Copy link
Author

Thank you very much, the module management problem has been solved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants