Skip to content

Commit

Permalink
Move requirements.txt
Browse files Browse the repository at this point in the history
  • Loading branch information
ha7315 committed Mar 21, 2024
1 parent 2904643 commit 7e57109
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions modules/create-rds-postgres-tester/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,7 @@ resource "null_resource" "dependencies" {
# the command to install python and dependencies to the machine and zips
provisioner "local-exec" {
command = <<EOT
mkdir /tmp/lambda-layer-dependencies
cp ${path.module}/lambdas/create_rds_postgres_tester/requirements.txt /tmp/lambda-layer-dependencies
cd /tmp/lambda-layer-dependencies
cd "${path.module}/dependencies"
pyenv global 3.11.3
pip install --upgrade pip
pip install -r requirements.txt --target .
Expand All @@ -71,8 +69,8 @@ resource "null_resource" "dependencies" {

data "archive_file" "dependencies" {
depends_on = [null_resource.dependencies]
output_path = "${path.module}/lambdas/dist/layer.zip"
source_dir = "/tmp/lambda-layer-dependencies"
output_path = "${path.module}/lambdas/dist/dependencies.zip"
source_dir = "/${path.module}/dependencies"
type = "zip"
}

Expand Down

0 comments on commit 7e57109

Please sign in to comment.