Skip to content

Commit 3308d27

Browse files
committed
chore: migrated to trivy for static security checks
1 parent 55236b0 commit 3308d27

File tree

12 files changed

+16
-14
lines changed

12 files changed

+16
-14
lines changed

examples/complete/main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ module "lambda" {
1818
function_name = random_pet.this.id
1919
handler = "index.handler"
2020
memory_size = 128
21-
runtime = "nodejs18.x"
21+
runtime = "nodejs20.x"
2222
publish = false
2323
snap_start = false
2424
source_code_hash = module.source.output_base64sha256

examples/container-image/main.tf

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@ locals {
55

66
#trivy:ignore:AVD-AWS-0031
77
resource "aws_ecr_repository" "this" {
8-
name = local.function_name
8+
force_delete = true
9+
name = local.function_name
910

1011
image_scanning_configuration {
1112
scan_on_push = true

examples/deployment/complete/main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ module "lambda" {
2020
handler = "index.handler"
2121
ignore_external_function_updates = true
2222
publish = true
23-
runtime = "nodejs18.x"
23+
runtime = "nodejs20.x"
2424
s3_bucket = aws_s3_bucket.source.bucket
2525
s3_key = local.s3_key
2626
s3_object_version = aws_s3_object.initial.version_id

examples/deployment/s3/main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ module "lambda" {
1818
handler = "index.handler"
1919
ignore_external_function_updates = true
2020
publish = true
21-
runtime = "nodejs18.x"
21+
runtime = "nodejs20.x"
2222
s3_bucket = aws_s3_bucket.source.bucket
2323
s3_key = local.s3_key
2424
s3_object_version = aws_s3_object.initial.version_id
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
FROM public.ecr.aws/lambda/nodejs:18
1+
FROM public.ecr.aws/lambda/nodejs:20
2+
USER func
23
COPY index.js /var/task/
34

45
CMD [ "index.handler" ]

examples/with-cloudwatch-event-rules/main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ module "lambda" {
1414
filename = module.source.output_path
1515
function_name = "example-with-cloudwatch-events"
1616
handler = "index.handler"
17-
runtime = "nodejs18.x"
17+
runtime = "nodejs20.x"
1818
source_code_hash = module.source.output_base64sha256
1919

2020
cloudwatch_event_rules = {

examples/with-cloudwatch-logs-subscription/main.tf

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ module "lambda" {
1010
filename = module.source.output_path
1111
function_name = "example-without-cloudwatch-logs-subscription"
1212
handler = "index.handler"
13-
runtime = "nodejs18.x"
13+
runtime = "nodejs20.x"
1414
source_code_hash = module.source.output_base64sha256
1515

1616
cloudwatch_log_subscription_filters = {
@@ -32,7 +32,7 @@ module "destination_1" {
3232
filename = module.source.output_path
3333
function_name = "cloudwatch-logs-subscription-destination-1"
3434
handler = "index.handler"
35-
runtime = "nodejs18.x"
35+
runtime = "nodejs20.x"
3636
source_code_hash = module.source.output_base64sha256
3737
}
3838

@@ -43,6 +43,6 @@ module "destination_2" {
4343
filename = module.source.output_path
4444
function_name = "cloudwatch-logs-subscription-destination-2"
4545
handler = "index.handler"
46-
runtime = "nodejs18.x"
46+
runtime = "nodejs20.x"
4747
source_code_hash = module.source.output_base64sha256
4848
}

examples/with-event-source-mappings/dynamodb-with-alias/main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ module "lambda" {
5757
filename = data.archive_file.dynamodb_handler.output_path
5858
function_name = "example-with-dynamodb-event-source-mapping"
5959
handler = "index.handler"
60-
runtime = "nodejs18.x"
60+
runtime = "nodejs20.x"
6161
source_code_hash = data.archive_file.dynamodb_handler.output_base64sha256
6262

6363
event_source_mappings = {

examples/with-event-source-mappings/kinesis/main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ module "lambda" {
2929
filename = data.archive_file.kinesis_handler.output_path
3030
function_name = "example-with-kinesis-event-source-mapping"
3131
handler = "index.handler"
32-
runtime = "nodejs18.x"
32+
runtime = "nodejs20.x"
3333
source_code_hash = data.archive_file.kinesis_handler.output_base64sha256
3434

3535
event_source_mappings = {

examples/with-event-source-mappings/sqs/main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ module "lambda" {
2727
filename = data.archive_file.sqs_handler.output_path
2828
function_name = "example-with-sqs-event-source-mapping"
2929
handler = "index.handler"
30-
runtime = "nodejs18.x"
30+
runtime = "nodejs20.x"
3131
source_code_hash = data.archive_file.sqs_handler.output_base64sha256
3232

3333
event_source_mappings = {

0 commit comments

Comments
 (0)