We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
In cwp mode, ECS Task is not counted correctly. The number of ECS Fargate Tasks cannot be obtained correctly in aws-resource-count.sh with cwp option.
To obtain the correct ECS cluster name and count the number of individual Fargate tasks.
FargateTask per cluster is not get correctly.
Modify the script function "get_ecs_fargate_task_count()". For example, how about modifying the following?
https://github.com/PaloAltoNetworks/pcs-sizing-scripts/blob/main/aws/resource-count-aws.sh#L241-L253
**ECS_FARGATE_CLUSTERS=($(aws_ecs_list_clusters "${REGION}" | jq -r '.clusterArns[]' 2>/dev/null))** XIFS=$IFS # shellcheck disable=SC2206 **IFS=$'\n' ECS_FARGATE_CLUSTERS_LIST=(${ECS_FARGATE_CLUSTERS[@]})** IFS=$XIFS ECS_FARGATE_TASK_LIST_COUNT=0 RESULT=0 for CLUSTER in "${ECS_FARGATE_CLUSTERS_LIST[@]}" do **ECS_FARGATE_TASK_LIST_COUNT=($(aws_ecs_list_tasks "${REGION}" "${CLUSTER}" | jq -r '[.taskArns[]] | length' 2>/dev/null))**
./resource-count-aws.sh cwp
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Describe the bug
In cwp mode, ECS Task is not counted correctly.
The number of ECS Fargate Tasks cannot be obtained correctly in aws-resource-count.sh with cwp option.
Expected behavior
To obtain the correct ECS cluster name and count the number of individual Fargate tasks.
Current behavior
FargateTask per cluster is not get correctly.
Possible solution
Modify the script function "get_ecs_fargate_task_count()".
For example, how about modifying the following?
https://github.com/PaloAltoNetworks/pcs-sizing-scripts/blob/main/aws/resource-count-aws.sh#L241-L253
Steps to reproduce
./resource-count-aws.sh cwp
The text was updated successfully, but these errors were encountered: