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

Error: reading ZIP file while deploying AFT #475

Open
lironsi opened this issue Jul 18, 2024 · 2 comments
Open

Error: reading ZIP file while deploying AFT #475

lironsi opened this issue Jul 18, 2024 · 2 comments
Labels
bug Something isn't working pending investigation Issue needs further investigation

Comments

@lironsi
Copy link

lironsi commented Jul 18, 2024

Hello,
I'm trying to deploy AFT in my organization and get the following error -

 │ Error: reading ZIP file (.terraform/modules/aft/modules/aft-archives/../../src/aft_lambda/aft_builder.zip): open .terraform/modules/aft/modules/aft-archives/../../src/aft_lambda/aft_builder.zip: no such file or directory
│ 
│   with module.aft.module.aft_lambda_layer.aws_lambda_function.codebuild_trigger,
│   on .terraform/modules/aft/modules/aft-lambda-layer/lambda.tf line 6, in resource "aws_lambda_function" "codebuild_trigger":
│    6: resource "aws_lambda_function" "codebuild_trigger" {

the module source I set is "github.com/aws-ia/terraform-aws-control_tower_account_factory"

Please advise, this is a real blocker..
Thanks
Liron

@lironsi lironsi added bug Something isn't working pending investigation Issue needs further investigation labels Jul 18, 2024
@cyrildmoses
Copy link

Hi @lironsi,

I encountered the same error while deploying AFT through CodePipeline. Have you found a solution for this issue?

Thanks!

@robinbihun
Copy link

Hey all, the zips are created in the terraform plan stage so if you are running plan and apply in separate ci/cd stages and running terraform apply {plan-file} then you also need to be sure to pass the zips from the plan artifacts to the apply stage.

For example, if you are using gitlab pipelines something like the following should work for you:

  artifacts:
    paths:
      - "${CI_PROJECT_DIR}/.terraform/modules/aft/src/aft_lambda/*.zip"
    expire_in: 1 day

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working pending investigation Issue needs further investigation
Projects
None yet
Development

No branches or pull requests

3 participants