Skip to content

Commit

Permalink
Merge pull request #2 from mitre/v0.2
Browse files Browse the repository at this point in the history
v0.2.1
  • Loading branch information
jkufro authored Sep 27, 2021
2 parents 2bf8a16 + 2f710d5 commit ac0ca60
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 15 deletions.
18 changes: 4 additions & 14 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -45,19 +45,9 @@ resource "aws_kms_key" "HeimdallPassKmsKey" {
}
}

##
# KMS key for encrypting lambda log data
#
# https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/kms_key
#
resource "aws_kms_key" "ServerlessHeimdallPusherLogsKmsKey" {
description = "The KMS key used to encrypt ConfigToHdf's logs"
deletion_window_in_days = 10
enable_key_rotation = true

tags = {
Name = "ServerlessHeimdallPusherLogsKmsKey"
}
resource "aws_kms_alias" "HeimdallPusherPassKmsKey" {
name = "alias/HeimdallPusherPassKmsKey"
target_key_id = aws_kms_key.HeimdallPassKmsKey.key_id
}

##
Expand Down Expand Up @@ -195,7 +185,7 @@ module "serverless-heimdall-pusher-lambda" {
image_uri = "${aws_ecr_repository.mitre_heimdall_pusher.repository_url}:${local.image_version}"
package_type = "Image"

cloudwatch_logs_kms_key_id = aws_kms_key.ServerlessHeimdallPusherLogsKmsKey.key_id
cloudwatch_logs_kms_key_id = var.cloudwatch_logs_kms_key_id
cloudwatch_logs_retention_in_days = 30

environment_variables = {
Expand Down
6 changes: 6 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,12 @@ variable "results_bucket_source_account_id" {
default = null
}

variable "cloudwatch_logs_kms_key_id" {
description = "The ARN of the KMS key to use for lambda log encryption."
type = string
default = null
}

variable "subnet_ids" {
description = "The subnet ids to deploy the lambda to."
type = list(string)
Expand Down
2 changes: 1 addition & 1 deletion version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.2.0
0.2.1

0 comments on commit ac0ca60

Please sign in to comment.