Skip to content

Commit

Permalink
fix: set correct vpc to lambda
Browse files Browse the repository at this point in the history
  • Loading branch information
MagnunAVF committed Sep 20, 2024
1 parent db3cffd commit 600daba
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ jobs:
cd api
echo 'ENV=hml' > .env
echo 'DATABASE_URL="${{ secrets.DATABASE_URL }}"' >> .env
echo 'SG_ID="${{ secrets.SG_ID }}"' >> .env
echo 'SUBNET1_ID="${{ secrets.SUBNET1_ID }}"' >> .env
echo 'SUBNET2_ID="${{ secrets.SUBNET2_ID }}"' >> .env
- name: Generate Prisma Client
run: |
Expand Down
3 changes: 3 additions & 0 deletions api/.env.sample
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
ENV=dev
DATABASE_URL="postgresql://admin:password@localhost:5432/demeter"
SG_ID=SECURITY_GROUP_ID
SUBNET1_ID=SUBNET_ID1
SUBNET2_ID=SUBNET_ID2
6 changes: 6 additions & 0 deletions api/serverless.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ provider:
runtime: nodejs20.x
region: us-east-1
stage: ${env:ENV}
vpc:
securityGroupIds:
- ${env:SG_ID}
subnetIds:
- ${env:SUBNET_ID1}
- ${env:SUBNET_ID2}

plugins:
- serverless-dotenv-plugin
Expand Down

0 comments on commit 600daba

Please sign in to comment.