File tree Expand file tree Collapse file tree 3 files changed +34
-2
lines changed
Expand file tree Collapse file tree 3 files changed +34
-2
lines changed Original file line number Diff line number Diff line change @@ -46,6 +46,9 @@ module "sensor" {
4646 fleet_token = "<the pairing token from the Fleet UI>"
4747 fleet_url = "<the URL of the fleet instance from the Fleet UI>"
4848 fleet_server_sslname = "<the ssl name provided by Fleet>"
49+
50+ # optional KMS key, if set will encrpyt the EBS volumes launched by the auto scaler group
51+ kms_key_id = "<the ID of the KMS key used to encrypt the EBS volumes>"
4952}
5053
5154
Original file line number Diff line number Diff line change @@ -14,6 +14,18 @@ resource "aws_launch_template" "sensor_launch_template" {
1414 }
1515 }
1616
17+ block_device_mappings {
18+ device_name = var. sensor_launch_template_volume_name
19+
20+ ebs {
21+ volume_size = var. sensor_launch_template_volume_size
22+ volume_type = " gp3"
23+ encrypted = var. kms_key_id == " " ? false : true
24+ kms_key_id = var. kms_key_id == " " ? null : var. kms_key_id
25+ delete_on_termination = true
26+ }
27+ }
28+
1729 network_interfaces {
1830 device_index = 0
1931 security_groups = [aws_security_group . monitoring . id ]
@@ -23,4 +35,4 @@ resource "aws_launch_template" "sensor_launch_template" {
2335 user_data = module. sensor_config . cloudinit_config . rendered
2436
2537 tags = var. tags
26- }
38+ }
Original file line number Diff line number Diff line change @@ -50,6 +50,12 @@ variable "fleet_server_sslname" {
5050 description = " SSL hostname for the fleet server"
5151}
5252
53+ variable "kms_key_id" {
54+ description = " The KMS key ID to be used for EBS volume encryption for the auto-scale group instances"
55+ type = string
56+ default = null
57+ }
58+
5359variable "license_key" {
5460 description = " Your Corelight sensor license key. Optional if fleet_url is configured."
5561 sensitive = true
@@ -111,6 +117,18 @@ variable "sensor_launch_template_instance_type" {
111117 default = " c5.2xlarge"
112118}
113119
120+ variable "sensor_launch_template_volume_name" {
121+ description = " The name of the volume for the sensor launch template"
122+ type = string
123+ default = " /dev/xvda"
124+ }
125+
126+ variable "sensor_launch_template_volume_size" {
127+ description = " The size of the volume for the sensor launch template"
128+ type = number
129+ default = 500
130+ }
131+
114132variable "lb_health_check_target_group_name" {
115133 description = " The name of the health check target group which determines if the sensor in the ASG comes up and is ready to accept traffic"
116134 type = string
@@ -200,4 +218,3 @@ variable "fleet_no_proxy" {
200218 default = " "
201219 description = " (optional) hosts or domains to bypass the proxy for fleet traffic"
202220}
203-
You can’t perform that action at this time.
0 commit comments