Merge pull request #859 from Hestia-Homes/deploy-fastapi-with-terraform

Deploy fastapi with terraform: move the depends_on pip install to the correct place
This commit is contained in:
Daniel Roth 2026-03-12 12:28:17 +00:00 committed by GitHub
commit 41693b2058
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 3 additions and 1 deletions

View file

@ -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"

View file

@ -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"