Skip to content

Commit

Permalink
feat: updated policy.json (#241)
Browse files Browse the repository at this point in the history
feat: Updating policy as per least privileged policy & rectify ruby example app
  • Loading branch information
aavinash-nr authored Dec 4, 2024
1 parent 3c9ac93 commit 9e35bc1
Show file tree
Hide file tree
Showing 11 changed files with 352 additions and 54 deletions.
2 changes: 1 addition & 1 deletion examples/terraform/lambda/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = "~> 4.8"
version = "~> 5.78.0"
}
}
}
Expand Down
31 changes: 17 additions & 14 deletions examples/terraform/nodejs/.terraform.lock.hcl

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

21 changes: 17 additions & 4 deletions examples/terraform/nodejs/lambda-policy.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,29 @@
"Version": "2012-10-17",
"Statement": [
{
"Sid": "",
"Action": "logs:*",
"Effect": "Allow",
"Action": [
"logs:CreateLogGroup",
"logs:CreateLogStream",
"logs:PutLogEvents"
],
"Resource": [
"arn:aws:logs:us-east-1:<aws-account-id>:log-group:/aws/lambda/newrelic-terraform-example-nodejs:*"
]
"Resource": "*"
},
{
"Sid": "",
"Action": "s3:*",
"Effect": "Allow",
"Resource": "*"
"Action": [
"logs:CreateLogGroup",
"logs:CreateLogStream",
"logs:PutLogEvents"
],
"Resource": [
"arn:aws:logs:us-east-1:<aws-account-id>:log-group:/aws/lambda/newrelic-terraform-example-nodejs:*"
]
}
]
}
}
6 changes: 3 additions & 3 deletions examples/terraform/nodejs/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ module "nodejs_test_function" {
lambda_function_handler = "app.lambdaHandler"
wrapper_handler = "newrelic-lambda-wrapper.handler"
lambda_function_name = "newrelic-terraform-example-nodejs"
lambda_runtime = "nodejs14.x"
lambda_runtime = "nodejs20.x"
lambda_zip_filename = "function.zip"
newrelic_account_id = var.newrelic_account_id
newrelic_layer = "arn:aws:lambda:${var.aws_region}:451483290750:layer:NewRelicNodeJS14X:44"
}
newrelic_layer = "arn:aws:lambda:${var.aws_region}:451483290750:layer:NewRelicNodeJS20X:44"
}
31 changes: 17 additions & 14 deletions examples/terraform/python/.terraform.lock.hcl

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 9 additions & 4 deletions examples/terraform/python/lambda-policy.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,21 @@
"Version": "2012-10-17",
"Statement": [
{
"Sid": "",
"Action": "logs:*",
"Effect": "Allow",
"Resource": "*"
},
{
"Sid": "",
"Action": "s3:*",
"Effect": "Allow",
"Resource": "*"
"Action": [
"logs:CreateLogGroup",
"logs:CreateLogStream",
"logs:PutLogEvents"
],
"Resource": [
"arn:aws:logs:us-east-1:<aws-account-id>:log-group:/aws/lambda/newrelic-terraform-example-nodejs:*"
]
}
]
}
}
Loading

0 comments on commit 9e35bc1

Please sign in to comment.