Hi, I'm currently trying to do some terraform stuf...
# ask-metaflow
b
Hi, I'm currently trying to do some terraform stuff and seeing an error that looks like this:
Copy code
module.metaflow.module.metaflow-metadata-service.aws_lambda_function.db_migrate_lambda: Modifying... [id=metaflow-db_migrate-raqhptn5]
╷
│ Error: reading ZIP file (.terraform/modules/metaflow/modules/metadata-service/db_migrate_lambda.zip): open .terraform/modules/metaflow/modules/metadata-service/db_migrate_lambda.zip: no such file or directory
│ 
│   with module.metaflow.module.metaflow-metadata-service.aws_lambda_function.db_migrate_lambda,
│   on .terraform/modules/metaflow/modules/metadata-service/lambda.tf line 113, in resource "aws_lambda_function" "db_migrate_lambda":
│  113: resource "aws_lambda_function" "db_migrate_lambda" {
│
Has anyone seen anything like this before? I can't find where this
db_migrate_lambda.zip
is supposed to be. I believe I'm using
v0.9.0
of the terraform module
f
it gets generated from terraform itself so isn't in the module as a zip archive: https://github.com/outerbounds/terraform-aws-metaflow/blob/v0.9.0/modules/metadata-service/lambda.tf#L107
this PR is related and just got merged: https://github.com/outerbounds/terraform-aws-metaflow/pull/81 though if you're using 9.0 it won't be relevant, I'd check what version of the module you're using and if you're on the latest somehow I'd make sure that variable is set
b
Ah gotcha gotcha interesting thanks! And if this file is lost somehow, I guess we're just out of luck?
f
well it's generated by terraform so shouldn't get lost - so it's either not getting created or you may be using the latest version and the variable is not set somehow if you're deploying terraform locally you should have a tf output directory and you can peek in there to see if its generated
b
I see yeah our terraform stuff isn't run locally and gets applied through some CI/CD stuff so it's a bit abstracted away from me. So a bit hard to see what's what
But good to know! Really appreciate the help. I'll dig into the versions and checking if the variable's been set
f
no prob - think looking at the artifacts is going to be the key to tracking down the issue so if you're using tf cloud or something like dynamo/s3 as the backend it'll prob be worth seeing what got synthesized (will also tell you what version of the module is getting deployed)
depends completely on your cicd setup but sounds like it could be that intermediate artifacts aren't getting shared/persisted for whatever process is doing the tf apply