mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-06-08 11:17:27 +00:00
move the depends_on pip install to the correct place
This commit is contained in:
parent
93915efd9d
commit
80cbb6027b
2 changed files with 3 additions and 1 deletions
|
|
@ -51,7 +51,6 @@ locals {
|
|||
# FastAPI Lambda + API Gateway
|
||||
############################################
|
||||
module "fastapi" {
|
||||
depends_on = [null_resource.pip_install]
|
||||
source = "../../modules/lambda_with_api_gateway"
|
||||
|
||||
name = "fastapi"
|
||||
|
|
|
|||
|
|
@ -10,6 +10,8 @@ module "role" {
|
|||
# Install python packages
|
||||
############################################
|
||||
resource "null_resource" "pip_install" {
|
||||
count = var.requirements_file != null ? 1 : 0
|
||||
|
||||
triggers = {
|
||||
requirements_hash = filemd5("${var.requirements_file}")
|
||||
}
|
||||
|
|
@ -23,6 +25,7 @@ resource "null_resource" "pip_install" {
|
|||
# Zip the source code
|
||||
############################################
|
||||
data "archive_file" "this" {
|
||||
depends_on = [null_resource.pip_install]
|
||||
type = "zip"
|
||||
source_dir = var.source_dir
|
||||
output_path = "${path.module}/lambda_package.zip"
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue