Skip to content

Commit ac0ca60

Browse files
authored
Merge pull request #2 from mitre/v0.2
v0.2.1
2 parents 2bf8a16 + 2f710d5 commit ac0ca60

File tree

3 files changed

+11
-15
lines changed

3 files changed

+11
-15
lines changed

main.tf

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -45,19 +45,9 @@ resource "aws_kms_key" "HeimdallPassKmsKey" {
4545
}
4646
}
4747

48-
##
49-
# KMS key for encrypting lambda log data
50-
#
51-
# https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/kms_key
52-
#
53-
resource "aws_kms_key" "ServerlessHeimdallPusherLogsKmsKey" {
54-
description = "The KMS key used to encrypt ConfigToHdf's logs"
55-
deletion_window_in_days = 10
56-
enable_key_rotation = true
57-
58-
tags = {
59-
Name = "ServerlessHeimdallPusherLogsKmsKey"
60-
}
48+
resource "aws_kms_alias" "HeimdallPusherPassKmsKey" {
49+
name = "alias/HeimdallPusherPassKmsKey"
50+
target_key_id = aws_kms_key.HeimdallPassKmsKey.key_id
6151
}
6252

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

198-
cloudwatch_logs_kms_key_id = aws_kms_key.ServerlessHeimdallPusherLogsKmsKey.key_id
188+
cloudwatch_logs_kms_key_id = var.cloudwatch_logs_kms_key_id
199189
cloudwatch_logs_retention_in_days = 30
200190

201191
environment_variables = {

variables.tf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,12 @@ variable "results_bucket_source_account_id" {
3232
default = null
3333
}
3434

35+
variable "cloudwatch_logs_kms_key_id" {
36+
description = "The ARN of the KMS key to use for lambda log encryption."
37+
type = string
38+
default = null
39+
}
40+
3541
variable "subnet_ids" {
3642
description = "The subnet ids to deploy the lambda to."
3743
type = list(string)

version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.2.0
1+
0.2.1

0 commit comments

Comments
 (0)