mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-06-08 11:17:27 +00:00
better logs
This commit is contained in:
parent
360f06df83
commit
440165dc2d
1 changed files with 10 additions and 31 deletions
|
|
@ -5,12 +5,6 @@
|
|||
|
||||
cp -r lambda/_template lambda/<lambda_name>
|
||||
|
||||
- Update `variables.tf` if required
|
||||
- Ensure the Terraform module accepts:
|
||||
- `lambda_name`
|
||||
- `stage`
|
||||
- `image_uri`
|
||||
|
||||
---
|
||||
|
||||
### 2. Add infrastructure prerequisites (shared stack)
|
||||
|
|
@ -18,12 +12,10 @@
|
|||
|
||||
infrastructure/terraform/shared/main.tf
|
||||
|
||||
- Apply the shared stack (or let CI apply it on `prod`)
|
||||
- Verify the ECR repository exists in AWS
|
||||
- Apply the shared stack
|
||||
- This requires commenting 'if env.stage == "prod"' in .github/workflows/deploy_terraform.yml
|
||||
|
||||
Note:
|
||||
No Terraform outputs are required for the ECR repo.
|
||||
The CI pipeline resolves the repository URL dynamically at build time.
|
||||
- Verify the ECR repository exists in AWS
|
||||
|
||||
---
|
||||
|
||||
|
|
@ -36,11 +28,6 @@ The CI pipeline resolves the repository URL dynamically at build time.
|
|||
|
||||
### 4. Wire the Lambda deploy job (CI)
|
||||
- Add a deploy job using `_deploy_lambda.yml`
|
||||
- Pass the following inputs:
|
||||
- `lambda_name`
|
||||
- `lambda_path`
|
||||
- `stage`
|
||||
- `image_uri` (constructed as `repo@sha256:digest`)
|
||||
- Ensure the deploy job depends on the image build job
|
||||
|
||||
---
|
||||
|
|
@ -49,24 +36,16 @@ The CI pipeline resolves the repository URL dynamically at build time.
|
|||
- Push changes to GitHub
|
||||
- CI will:
|
||||
1. Build and push the Docker image
|
||||
2. Resolve the image digest
|
||||
3. Deploy the Lambda using the immutable `image_uri`
|
||||
|
||||
2. Deploy the Lambda
|
||||
3. Verify everything deployed. Good things to check:
|
||||
- ECR with image
|
||||
- SQS
|
||||
- Trigger SQS
|
||||
- Cloud watch logs
|
||||
---
|
||||
### 5. Delete
|
||||
1. Delete README if you used cp -r
|
||||
|
||||
---
|
||||
|
||||
## Notes
|
||||
- Terraform remote state is not used for image wiring
|
||||
- Image tags are not used; deployments are digest-based
|
||||
- By default, the template wires SQS → Lambda
|
||||
To change this, update the Terraform in `lambda/<lambda_name>`
|
||||
(e.g. EventBridge, API Gateway, direct invoke)
|
||||
|
||||
---
|
||||
|
||||
## Rule of thumb
|
||||
CI decides what image to deploy.
|
||||
Terraform only deploys it.
|
||||
## Please feel free to update this document to make it easier for the next person
|
||||
Loading…
Add table
Reference in a new issue