Conversation
- Auto-formatted .tf files with terraform fmt - Updated README.md with terraform-docs Co-authored-by: Rayna-Yu <Rayna-Yu@users.noreply.github.com>
Terraform Plan 📖
|
nourshoreibah
left a comment
There was a problem hiding this comment.
The logic to create the lambdas mostly looks good. just a few comments
What's missing is the API gateway set up. these lambdas would be completely isolated without any API gateway to expose them. I'd recommend doing this in a separate api_gateway.tf file
The idea is you would add every lambda function as an integration to the gateway then make each one a route using a for each
|
|
||
| # Attach basic execution policy for CloudWatch Logs | ||
| resource "aws_iam_role_policy_attachment" "lambda_basic" { | ||
| role = "aws_iam_role.lambda_role.name" |
There was a problem hiding this comment.
Can you confirm this should be quoted? i think this might error on apply
| # Attach basic execution policy for CloudWatch Logs | ||
| resource "aws_iam_role_policy_attachment" "lambda_basic" { | ||
| role = "aws_iam_role.lambda_role.name" | ||
| policy_arn = "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" |
There was a problem hiding this comment.
also just wanting to confirm this is correct arn for the aws managed role
| # Minimal placeholder that will be replaced by GitHub Actions on first deployment | ||
| data "archive_file" "lambda_placeholder" { | ||
| type = "zip" | ||
| output_path = "$${path.module}/lambda-placeholder.zip" |
There was a problem hiding this comment.
why the double "$" here? is this escaping the first "$"? please confirm
| # Define all Lambda functions in one place | ||
| locals { | ||
| lambda_functions = toset([ | ||
| "projects", |
There was a problem hiding this comment.
I think auth is missing here? also what do you think of generating this list dynamically from the list of folders in lambdas? open to either design just curious
ℹ️ Issue
Closes
📝 Description
Write a short summary of what you added. Why is it important? Any member of C4C should be able to read this and understand your contribution -- not just your team members.
Briefly list the changes made to the code:
✔️ Verification
What steps did you take to verify your changes work? These should be clear enough for someone to be able to clone the branch and follow the steps themselves.
Provide screenshots of any new components, styling changes, or pages.
Checked that the terraform plan in the checks tab to ensure that everything is being created.
🏕️ (Optional) Future Work / Notes
Did you notice anything ugly during the course of this ticket? Any bugs, design challenges, or unexpected behavior? Write it down so we can clean it up in a future ticket!