From aead484a8a223badd15bd6d571f2bf6096f678ce Mon Sep 17 00:00:00 2001 From: Sohit Date: Thu, 19 Dec 2024 13:01:17 +0530 Subject: [PATCH] rename variables --- docs/install-traffic-capture-sensors/sensor-fargate.md | 2 +- static/artifacts/pcap-sensor/main.tf | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/install-traffic-capture-sensors/sensor-fargate.md b/docs/install-traffic-capture-sensors/sensor-fargate.md index 2d9b90d7a..c77c66374 100644 --- a/docs/install-traffic-capture-sensors/sensor-fargate.md +++ b/docs/install-traffic-capture-sensors/sensor-fargate.md @@ -25,7 +25,7 @@ The pcap Sensor can be installed as a sidecar on an existing AWS task using a te - To configure CPU and memory given to the container, update `percentage_cpu_utilization` and `percentage_memory_utilization` variables in the terraform script. *Note: The default values are set to 5% CPU and memory of the total given to the task.* -
+ ## Install using JSON diff --git a/static/artifacts/pcap-sensor/main.tf b/static/artifacts/pcap-sensor/main.tf index 887f6c594..036de1b03 100644 --- a/static/artifacts/pcap-sensor/main.tf +++ b/static/artifacts/pcap-sensor/main.tf @@ -52,13 +52,13 @@ variable "stream_timeout_seconds" { default = "1.0" } -variable "percentage_cpu_utilization" { +variable "cpu_percentage_limit" { description = "Percentage of CPU allocated to the sensor container out of total task cpu" type = string default = "5" } -variable "percentage_memory_utilization" { +variable "memory_percentage_limit" { description = "Percentage of memory allocated to the sensor container out of total task memory" type = string default = "5" @@ -116,8 +116,8 @@ locals { existing_container_definitions = local.task_def_json.taskDefinition.containerDefinitions # Calculate 5% of the task CPU and memory - new_container_cpu_limit = floor(local.task_cpu * var.percentage_cpu_utilization / 100) - new_container_memory_limit = floor(local.task_memory * var.percentage_memory_utilization / 100) + new_container_cpu_limit = floor(local.task_cpu * var.cpu_percentage_limit / 100) + new_container_memory_limit = floor(local.task_memory * var.memory_percentage_limit / 100) # Add the new container definition new_container_definitions = [{