Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
A
Am I live
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
shore
Am I live
Commits
ce81f558
Commit
ce81f558
authored
3 years ago
by
nimrod
Browse files
Options
Downloads
Patches
Plain Diff
Address Checkov warnings.
Mostly ignore things I'm not interested in but it did find somethings.
parent
5dbeb94b
No related branches found
No related tags found
No related merge requests found
Pipeline
#2582
passed
3 years ago
Stage: .pre
Stage: build
Stage: test
Stage: deploy
Changes
5
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
functions.tf
+19
-14
19 additions, 14 deletions
functions.tf
log-groups.tf
+1
-0
1 addition, 0 deletions
log-groups.tf
s3.tf
+15
-0
15 additions, 0 deletions
s3.tf
sms-notify.tf
+19
-13
19 additions, 13 deletions
sms-notify.tf
sns.tf
+1
-0
1 addition, 0 deletions
sns.tf
with
55 additions
and
27 deletions
functions.tf
+
19
−
14
View file @
ce81f558
...
...
@@ -108,6 +108,10 @@ output "timeout" {
}
resource
"aws_lambda_function"
"function"
{
# checkov:skip=CKV_AWS_50
# checkov:skip=CKV_AWS_116
# checkov:skip=CKV_AWS_117
# checkov:skip=CKV_AWS_173
count
=
length
(
local
.
functions
)
runtime
=
var
.
runtime
function_name
=
local
.
function_names
[
count
.
index
]
...
...
@@ -120,6 +124,7 @@ resource "aws_lambda_function" "function" {
handler
=
"
${
local
.
functions
[
count
.
index
]}
.handler"
description
=
"
${
local
.
module
}
${
local
.
functions
[
count
.
index
]}
check in
${
local
.
env
}
."
memory_size
=
var
.
memory_size
reserved_concurrent_executions
=
-
1
tags
=
local
.
common_tags
timeout
=
var
.
timeout
...
...
This diff is collapsed.
Click to expand it.
log-groups.tf
+
1
−
0
View file @
ce81f558
resource
"aws_cloudwatch_log_group"
"lambda"
{
# checkov:skip=CKV_AWS_158
count
=
length
(
local
.
function_names
)
name
=
"/aws/lambda/
${
local
.
function_names
[
count
.
index
]}
"
retention_in_days
=
var
.
log_retention
...
...
This diff is collapsed.
Click to expand it.
s3.tf
+
15
−
0
View file @
ce81f558
resource
"aws_s3_bucket"
"payloads"
{
# checkov:skip=CKV_AWS_18
# checkov:skip=CKV_AWS_19
# checkov:skip=CKV_AWS_144
# checkov:skip=CKV_AWS_145
bucket
=
local
.
Name
tags
=
local
.
common_tags
acl
=
"private"
...
...
@@ -9,11 +13,21 @@ resource "aws_s3_bucket" "payloads" {
}
}
locals
{
payloads_bucket_arn
=
aws_s3_bucket
.
payloads
.
arn
payloads_bucket_name
=
aws_s3_bucket
.
payloads
.
bucket
}
resource
"aws_s3_bucket_public_access_block"
"payloads"
{
bucket
=
aws_s3_bucket
.
payloads
.
bucket
block_public_acls
=
true
block_public_policy
=
true
ignore_public_acls
=
true
restrict_public_buckets
=
true
}
output
"payloads_bucket_arn"
{
description
=
"ARN of the payloads S3 bucket."
value
=
local
.
payloads_bucket_arn
...
...
@@ -25,6 +39,7 @@ output "payloads_bucket_name" {
}
resource
"aws_s3_bucket_object"
"payload"
{
# checkov:skip=CKV_AWS_186
bucket
=
local
.
payloads_bucket_name
key
=
"payload.zip"
source
=
"payload.zip"
...
...
This diff is collapsed.
Click to expand it.
sms-notify.tf
+
19
−
13
View file @
ce81f558
...
...
@@ -12,6 +12,10 @@ variable "twilio_from_number" {
}
resource
"aws_lambda_function"
"sms_notify"
{
# checkov:skip=CKV_AWS_50
# checkov:skip=CKV_AWS_116
# checkov:skip=CKV_AWS_117
# checkov:skip=CKV_AWS_173
runtime
=
var
.
runtime
function_name
=
"
${
local
.
function_name_prefix
}
-sms-notify"
role
=
local
.
lambda_role_arn
...
...
@@ -23,6 +27,7 @@ resource "aws_lambda_function" "sms_notify" {
handler
=
"sms_notify.handler"
description
=
"Send SMS message notification using Twilio."
memory_size
=
var
.
memory_size
reserved_concurrent_executions
=
-
1
tags
=
local
.
common_tags
timeout
=
var
.
timeout
...
...
@@ -103,6 +108,7 @@ resource "aws_sns_topic_subscription" "sms_notify" {
]
}
resource
"aws_cloudwatch_log_group"
"sms_notify"
{
# checkov:skip=CKV_AWS_158
name
=
"/aws/lambda/
${
local
.
function_name_prefix
}
-sms-notify"
retention_in_days
=
var
.
log_retention
tags
=
local
.
common_tags
...
...
This diff is collapsed.
Click to expand it.
sns.tf
+
1
−
0
View file @
ce81f558
resource
"aws_sns_topic"
"topic"
{
# checkov:skip=CKV_AWS_26
name
=
local
.
Name
tags
=
local
.
common_tags
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment