Skip to content

Commit 009c693

Browse files
committed
cloud watch log group encryption
1 parent 89ba1c8 commit 009c693

File tree

3 files changed

+8
-0
lines changed

3 files changed

+8
-0
lines changed

examples/complete-vpc-with-vpn/main.tf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,4 +35,5 @@ module "vpc" {
3535
vpn_server_instance_type = "t3a.small"
3636
flow_log_max_aggregation_interval = 60
3737
flow_log_cloudwatch_log_group_retention_in_days = 90
38+
flow_log_cloudwatch_log_group_kms_key_arn = "" #Enter your kms key arn
3839
}

main.tf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ module "vpc" {
6363
create_flow_log_cloudwatch_log_group = local.create_flow_log_cloudwatch_log_group
6464
flow_log_max_aggregation_interval = var.flow_log_max_aggregation_interval
6565
flow_log_cloudwatch_log_group_retention_in_days = var.flow_log_cloudwatch_log_group_retention_in_days
66+
flow_log_cloudwatch_log_group_kms_key_id = var.flow_log_cloudwatch_log_group_kms_key_arn
6667
enable_ipv6 = local.enable_ipv6
6768
#assign_ipv6_address_on_creation = local.assign_ipv6_address_on_creation
6869
public_subnet_assign_ipv6_address_on_creation = local.public_subnet_assign_ipv6_address_on_creation

variables.tf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -191,3 +191,9 @@ variable "intra_subnet_assign_ipv6_address_on_creation" {
191191
type = bool
192192
default = null
193193
}
194+
195+
variable "flow_log_cloudwatch_log_group_kms_key_arn" {
196+
description = "The ARN of the KMS Key to use when encrypting log data for VPC flow logs"
197+
type = string
198+
default = null
199+
}

0 commit comments

Comments
 (0)