Skip to content

Commit 933ed55

Browse files
authored
Merge pull request #2 from rajdban/kms-all
Kms all
2 parents d41099a + 4dbe79d commit 933ed55

File tree

3 files changed

+11
-3
lines changed

3 files changed

+11
-3
lines changed

source/event_bridge/main.tf

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,8 @@ locals {
4545
}
4646
}
4747
resource "aws_cloudwatch_event_bus" "this" {
48-
name = var.event_bridge_name
48+
name = var.event_bridge_name
49+
kms_key_identifier = var.kms_key_id
4950
}
5051

5152
resource "aws_schemas_discoverer" "this" {
@@ -285,4 +286,4 @@ resource "aws_cloudwatch_event_target" "posted_queue" {
285286
dead_letter_config {
286287
arn = aws_sqs_queue.dlq.arn
287288
}
288-
}
289+
}

source/event_bridge/variables.tf

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,4 +50,10 @@ variable "state_machine_arn" {
5050
type = string
5151
default = ""
5252
description = "Pass the State Machine arn"
53-
}
53+
}
54+
55+
variable "kms_key_identifier" {
56+
description = "Pass the ARN of the KMS Key Id for CMK"
57+
type = string
58+
default = null
59+
}

source/main.tf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -230,6 +230,7 @@ module "dynamodb" {
230230
module "event_bridge" {
231231
source = "./event_bridge"
232232
event_bridge_name = var.event_bridge_name
233+
kms_key_id = module.kms.key_arn
233234
posting_queue_arn = module.posting_queue.arn
234235
posted_queue_arn = module.posted_queue.arn
235236
enrich_lambda_arn = module.enrich_lambda.arn

0 commit comments

Comments
 (0)