Skip to content

Commit

Permalink
added vpc config
Browse files Browse the repository at this point in the history
  • Loading branch information
kunduso committed Nov 24, 2024
1 parent 9687bd5 commit 89a3849
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lambda.tf
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ resource "aws_lambda_function" "lambda_run" {
log_group = aws_cloudwatch_log_group.lambda_log.name
system_log_level = "INFO"
}
vpc_config {
subnet_ids = [for subnet in module.vpc.private_subnets : subnet.id]
security_group_ids = [aws_security_group.lambda.id]
}
environment {
variables = {
parameter_name = aws_ssm_parameter.parameter.name
Expand All @@ -31,7 +35,6 @@ resource "aws_lambda_function" "lambda_run" {
}
reserved_concurrent_executions = 5
#checkov:skip=CKV_AWS_50: Not applicable in this use case: X-Ray tracing is enabled for Lambda
#checkov:skip=CKV_AWS_117: This AWS Lambda function does not require access to anything inside a VPC
#checkov:skip=CKV_AWS_272: Not applicable in this use case: Ensure AWS Lambda function is configured to validate code-signing
}
#https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/cloudwatch_event_rule
Expand Down

0 comments on commit 89a3849

Please sign in to comment.