Skip to content

Commit

Permalink
rename variables
Browse files Browse the repository at this point in the history
  • Loading branch information
sohitgore committed Dec 19, 2024
1 parent 7e26244 commit aead484
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion docs/install-traffic-capture-sensors/sensor-fargate.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.*
<br>


## Install using JSON

Expand Down
8 changes: 4 additions & 4 deletions static/artifacts/pcap-sensor/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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 = [{
Expand Down

0 comments on commit aead484

Please sign in to comment.