Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ repos:
# language: script
# verbose: true

- repo: git://github.com/antonbabenko/pre-commit-terraform
- repo: https://github.com/antonbabenko/pre-commit-terraform
rev: v1.64.0
hooks:
- id: terraform_fmt
Expand All @@ -47,7 +47,7 @@ repos:
- '--args=--only=terraform_required_providers'
- '--args=--only=terraform_standard_module_structure'
- '--args=--only=terraform_workspace_remote'
- repo: git://github.com/pre-commit/pre-commit-hooks
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.1.0
hooks:
- id: check-merge-conflict
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,11 @@ resource "helm_release" "cloud_connector" {
value = data.aws_region.current.name
}

set {
name = "telemetryDeploymentMethod"
value = "terraform_aws_k8s_org"
}

values = [
<<CONFIG
logging: info
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,10 @@ Skip step 4 and remove `aws_access_key_id` and `aws_secret_access_key` parameter

## Solution

For clients that only require thread-detection feature, and do not have an organizational cloudtrail setup, but multiple-accounts,
For clients that only require thread-detection feature, and do not have an organizational cloudtrail setup, but multiple-accounts,
we can make use of the [cloud-connector `aws-cloudtrail-s3-sns-sqs` ingestor](https://charts.sysdig.com/charts/cloud-connector/#ingestors)

This processes through a single SQS AWS queue the events that come through a single S3 bucket (through an SNS topic) or
This processes through a single SQS AWS queue the events that come through a single S3 bucket (through an SNS topic) or
multiple S3 buckets (that through several SNS topics, report to a single SQS topic).

## Suggested building-blocks
Expand Down Expand Up @@ -86,11 +86,11 @@ provider "helm" {

3. **Cloudtrail-S3-SNS-SQS**

WIP.
WIP.

Create an SQS que that will subscribe to one S3-SNS (1) or several S3 buckets SNS topics (2)

We currently provide a module to create first use-case,
We currently provide a module to create first use-case,
[one S3-SNS-SQS](https://github.com/sysdiglabs/terraform-aws-secure-for-cloud/tree/master/modules/infrastructure/cloudtrail_s3-sns-sqs) (1),
but can work on providing a way to automatize the later (2)

Expand Down Expand Up @@ -143,7 +143,7 @@ module "multi-account" {
-->

5. **Sysdig workload deployment on K8s**

* Populate `sysdig_secure_url`, `SYSDID_SECURE_API_TOKEN` and `REGION`
* WIP. enable terraform module to be able to define [`nodeSelector` and `tolerations` parameters of the cloud-connector helm chart](https://charts.sysdig.com/charts/cloud-connector/#configuration)

Expand Down Expand Up @@ -189,12 +189,12 @@ resource "helm_release" "cloud_connector" {
name = "aws.region"
value = "<REGION>"
}

set {
name = "nodeSelector.<NODE_SELECTOR_LABEL>"
value = "<NODE_SELECTOR_LABEL_VALUE>"
}

set {
name = "tolerations[0].key"
value = "<TOLERATION_KEY>"
Expand Down
5 changes: 5 additions & 0 deletions examples/single-account-k8s/cloud-connector.tf
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,11 @@ resource "helm_release" "cloud_connector" {
value = data.aws_region.current.name
}

set {
name = "telemetryDeploymentMethod"
value = "terraform_aws_k8s_single"
}

values = [
yamlencode({
ingestors = [
Expand Down
2 changes: 1 addition & 1 deletion modules/infrastructure/cloudtrail_s3-sns-sqs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ It requires:
This module helps with the creation of the SQS queue from which to pull the cloudtrail events, leveraging the S3 "bucket event notification" system.

Module gets the cloudtrail-s3 bucket name as input and provides the sqs topic url as output.

# How it works

- This module's output will be visible in the `S3` console, after entering a bucket, in it's `Properties`, `Event notifications` section.
Expand Down
9 changes: 3 additions & 6 deletions modules/services/cloud-connector/ecs-service.tf
Original file line number Diff line number Diff line change
Expand Up @@ -57,18 +57,15 @@ resource "aws_ecs_task_definition" "task_definition" {


locals {
suffix_org = var.is_organizational ? "org" : "single"
task_env_vars = concat([
{
name = "VERIFY_SSL"
value = tostring(local.verify_ssl)
},
{
name = "TELEMETRY_DEPLOYMENT_METHOD"
value = "terraform"
},
{
name = "FEAT_REGISTER_ACCOUNT_IN_SECURE"
value = "true"
name = "telemetryDeploymentMethod"
value = "terraform_aws_ecs_${local.suffix_org}"
},
{
name = "CONFIG_PATH"
Expand Down