Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
2 changes: 0 additions & 2 deletions examples/organization-org_compliance/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,6 @@ module "secure-for-cloud_example_organization" {
|------|-------------|------|---------|:--------:|
| <a name="input_organization_domain"></a> [organization\_domain](#input\_organization\_domain) | Organization domain. e.g. sysdig.com | `string` | n/a | yes |
| <a name="input_benchmark_project_ids"></a> [benchmark\_project\_ids](#input\_benchmark\_project\_ids) | Google cloud project IDs to run Benchmarks on. It will create a trust-relationship on each, to allow Sysdig usage. If empty, all organization projects will be defaulted. | `list(string)` | `[]` | no |
| <a name="input_benchmark_regions"></a> [benchmark\_regions](#input\_benchmark\_regions) | List of regions in which to run the benchmark. If empty, the task will contain all regions by default. | `list(string)` | `[]` | no |
| <a name="input_benchmark_role_name"></a> [benchmark\_role\_name](#input\_benchmark\_role\_name) | The name of the Service Account that will be created. | `string` | `"sysdigcloudbench"` | no |
| <a name="input_deploy_benchmark"></a> [deploy\_benchmark](#input\_deploy\_benchmark) | whether benchmark module is to be deployed | `bool` | `true` | no |
| <a name="input_deploy_scanning"></a> [deploy\_scanning](#input\_deploy\_scanning) | true/false whether scanning module is to be deployed | `bool` | `false` | no |
Expand Down Expand Up @@ -213,7 +212,6 @@ Apache 2 Licensed. See LICENSE for full details.
| Name | Description | Type | Default | Required |
|------|-------------|------|---------|:--------:|
| <a name="input_benchmark_project_ids"></a> [benchmark\_project\_ids](#input\_benchmark\_project\_ids) | Google cloud project IDs to run Benchmarks on. It will create a trust-relationship on each, to allow Sysdig usage. If empty, all organization projects will be defaulted. | `list(string)` | `[]` | no |
| <a name="input_benchmark_regions"></a> [benchmark\_regions](#input\_benchmark\_regions) | List of regions in which to run the benchmark. If empty, the task will contain all regions by default. | `list(string)` | `[]` | no |
| <a name="input_benchmark_role_name"></a> [benchmark\_role\_name](#input\_benchmark\_role\_name) | The name of the Service Account that will be created. | `string` | `"sysdigcloudbench"` | no |
| <a name="input_deploy_benchmark"></a> [deploy\_benchmark](#input\_deploy\_benchmark) | whether benchmark module is to be deployed | `bool` | `true` | no |
| <a name="input_deploy_scanning"></a> [deploy\_scanning](#input\_deploy\_scanning) | true/false whether scanning module is to be deployed | `bool` | `false` | no |
Expand Down
1 change: 0 additions & 1 deletion examples/organization-org_compliance/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,6 @@ module "cloud_bench_workload_identity" {

organization_domain = var.organization_domain
role_name = var.benchmark_role_name
regions = var.benchmark_regions
project_ids = var.benchmark_project_ids
project_id = data.google_client_config.current.project
}
6 changes: 0 additions & 6 deletions examples/organization-org_compliance/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,6 @@ variable "deploy_benchmark" {
default = true
}

variable "benchmark_regions" {
type = list(string)
description = "List of regions in which to run the benchmark. If empty, the task will contain all regions by default."
default = []
}

variable "benchmark_project_ids" {
default = []
type = list(string)
Expand Down
1 change: 0 additions & 1 deletion examples/organization/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,6 @@ module "secure-for-cloud_example_organization" {
|------|-------------|------|---------|:--------:|
| <a name="input_organization_domain"></a> [organization\_domain](#input\_organization\_domain) | Organization domain. e.g. sysdig.com | `string` | n/a | yes |
| <a name="input_benchmark_project_ids"></a> [benchmark\_project\_ids](#input\_benchmark\_project\_ids) | Google cloud project IDs to run Benchmarks on. It will create a trust-relationship on each, to allow Sysdig usage. If empty, all organization projects will be defaulted. | `list(string)` | `[]` | no |
| <a name="input_benchmark_regions"></a> [benchmark\_regions](#input\_benchmark\_regions) | List of regions in which to run the benchmark. If empty, the task will contain all regions by default. | `list(string)` | `[]` | no |
| <a name="input_benchmark_role_name"></a> [benchmark\_role\_name](#input\_benchmark\_role\_name) | The name of the Service Account that will be created. | `string` | `"sysdigcloudbench"` | no |
| <a name="input_deploy_benchmark"></a> [deploy\_benchmark](#input\_deploy\_benchmark) | whether benchmark module is to be deployed | `bool` | `true` | no |
| <a name="input_deploy_scanning"></a> [deploy\_scanning](#input\_deploy\_scanning) | true/false whether scanning module is to be deployed | `bool` | `false` | no |
Expand Down
1 change: 0 additions & 1 deletion examples/organization/benchmark.tf
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,5 @@ module "cloud_bench" {
is_organizational = true
organization_domain = var.organization_domain
role_name = "${var.name}${var.benchmark_role_name}"
regions = var.benchmark_regions
project_ids = local.benchmark_projects_ids
}
6 changes: 0 additions & 6 deletions examples/organization/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,6 @@ variable "deploy_benchmark" {
default = true
}

variable "benchmark_regions" {
type = list(string)
description = "List of regions in which to run the benchmark. If empty, the task will contain all regions by default."
default = []
}

variable "benchmark_project_ids" {
default = []
type = list(string)
Expand Down
1 change: 0 additions & 1 deletion examples/single-project-k8s/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,6 @@ See [inputs summary](#inputs) or module module [`variables.tf`](./variables.tf)

| Name | Description | Type | Default | Required |
|------|-------------|------|---------|:--------:|
| <a name="input_benchmark_regions"></a> [benchmark\_regions](#input\_benchmark\_regions) | List of regions in which to run the benchmark. If empty, the task will contain all regions by default. | `list(string)` | `[]` | no |
| <a name="input_benchmark_role_name"></a> [benchmark\_role\_name](#input\_benchmark\_role\_name) | The name of the Service Account that will be created. | `string` | `"sysdigcloudbench"` | no |
| <a name="input_cloud_connector_image"></a> [cloud\_connector\_image](#input\_cloud\_connector\_image) | Cloud-connector image to deploy | `string` | `"quay.io/sysdig/cloud-connector"` | no |
| <a name="input_deploy_benchmark"></a> [deploy\_benchmark](#input\_deploy\_benchmark) | whether benchmark module is to be deployed | `bool` | `true` | no |
Expand Down
1 change: 0 additions & 1 deletion examples/single-project-k8s/benchmark.tf
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,5 @@ module "cloud_bench" {
is_organizational = false
role_name = "${var.name}${var.benchmark_role_name}"
project_id = data.google_client_config.current.project
regions = var.benchmark_regions
reuse_workload_identity_pool = var.reuse_workload_identity_pool
}
6 changes: 0 additions & 6 deletions examples/single-project-k8s/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,6 @@ variable "deploy_benchmark" {
default = true
}

variable "benchmark_regions" {
type = list(string)
description = "List of regions in which to run the benchmark. If empty, the task will contain all regions by default."
default = []
}

variable "benchmark_role_name" {
type = string
description = "The name of the Service Account that will be created."
Expand Down
1 change: 0 additions & 1 deletion examples/single-project/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,6 @@ module "secure-for-cloud_example_single-project" {

| Name | Description | Type | Default | Required |
|------|-------------|------|---------|:--------:|
| <a name="input_benchmark_regions"></a> [benchmark\_regions](#input\_benchmark\_regions) | List of regions in which to run the benchmark. If empty, the task will contain all regions by default. | `list(string)` | `[]` | no |
| <a name="input_benchmark_role_name"></a> [benchmark\_role\_name](#input\_benchmark\_role\_name) | The name of the Service Account that will be created. | `string` | `"sysdigcloudbench"` | no |
| <a name="input_cloud_connector_image"></a> [cloud\_connector\_image](#input\_cloud\_connector\_image) | The image to use for the Cloud Connector. | `string` | `"us-docker.pkg.dev/sysdig-public-registry/secure-for-cloud/cloud-connector:latest"` | no |
| <a name="input_deploy_benchmark"></a> [deploy\_benchmark](#input\_deploy\_benchmark) | whether benchmark module is to be deployed | `bool` | `true` | no |
Expand Down
1 change: 0 additions & 1 deletion examples/single-project/benchmark.tf
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,5 @@ module "cloud_bench" {
is_organizational = false
role_name = "${var.name}${var.benchmark_role_name}"
project_id = data.google_client_config.current.project
regions = var.benchmark_regions
reuse_workload_identity_pool = var.reuse_workload_identity_pool
}
6 changes: 0 additions & 6 deletions examples/single-project/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,6 @@ variable "deploy_benchmark" {
default = true
}

variable "benchmark_regions" {
type = list(string)
description = "List of regions in which to run the benchmark. If empty, the task will contain all regions by default."
default = []
}

variable "benchmark_role_name" {
type = string
description = "The name of the Service Account that will be created."
Expand Down
1 change: 0 additions & 1 deletion examples/trigger-events/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ module "secure-for-cloud_trigger_events" {
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 0.15.0 |
| <a name="requirement_google"></a> [google](#requirement\_google) | >= 4.21.0 |
| <a name="requirement_google-beta"></a> [google-beta](#requirement\_google-beta) | >= 4.21.0 |
| <a name="requirement_random"></a> [random](#requirement\_random) | >= 3.1.0 |
| <a name="requirement_sysdig"></a> [sysdig](#requirement\_sysdig) | >= 0.5.21 |

## Providers
Expand Down
4 changes: 0 additions & 4 deletions examples/trigger-events/versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,6 @@ terraform {
required_version = ">= 0.15.0"

required_providers {
random = {
source = "hashicorp/random"
version = ">= 3.1.0"
}
google = {
source = "hashicorp/google"
version = ">= 4.21.0"
Expand Down
1 change: 0 additions & 1 deletion modules/services/cloud-bench-workload-identity/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 0.15.0 |
| <a name="requirement_google"></a> [google](#requirement\_google) | >= 4.21.0 |
| <a name="requirement_google-beta"></a> [google-beta](#requirement\_google-beta) | >= 4.21.0 |
| <a name="requirement_random"></a> [random](#requirement\_random) | >= 3.1.0 |
| <a name="requirement_sysdig"></a> [sysdig](#requirement\_sysdig) | >= 0.5.46 |

## Providers
Expand Down
27 changes: 0 additions & 27 deletions modules/services/cloud-bench-workload-identity/task/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -19,30 +19,3 @@ data "google_organization" "organization" {
count = var.organization_domain == "" ? 0 : 1
domain = var.organization_domain
}

locals {
benchmark_task_name = var.is_organizational ? "Organization: ${data.google_organization.organization[0].org_id}" : trimprefix(data.google_project.project[0].id, "projects/")
accounts_scope_clause = var.is_organizational ? "gcp.projectId in (\"${join("\", \"", local.project_numbers)}\")" : "gcp.projectId = \"${local.project_numbers[0]}\""
regions_scope_clause = length(var.regions) == 0 ? "" : " and gcp.region in (\"${join("\", \"", var.regions)}\")"
}

###################################################
# Configure Sysdig Backend
###################################################

resource "random_integer" "minute" {
max = 59
min = 0
}

resource "random_integer" "hour" {
max = 23
min = 0
}

resource "sysdig_secure_benchmark_task" "benchmark_task" {
name = "Sysdig Secure for Cloud (GCP) - ${local.benchmark_task_name}"
schedule = "${random_integer.minute.result} ${random_integer.hour.result} * * *"
schema = "gcp_foundations_bench-1.2.0"
scope = "${local.accounts_scope_clause}${local.regions_scope_clause}"
}
4 changes: 0 additions & 4 deletions modules/services/cloud-bench-workload-identity/versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,6 @@ terraform {
required_version = ">= 0.15.0"

required_providers {
random = {
source = "hashicorp/random"
version = ">= 3.1.0"
}
google = {
source = "hashicorp/google"
version = ">= 4.21.0"
Expand Down
1 change: 0 additions & 1 deletion modules/services/cloud-bench/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ Deployed on **Sysdig Backend**
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 0.15.0 |
| <a name="requirement_google"></a> [google](#requirement\_google) | >= 4.21.0 |
| <a name="requirement_google-beta"></a> [google-beta](#requirement\_google-beta) | >= 4.21.0 |
| <a name="requirement_random"></a> [random](#requirement\_random) | >= 3.1.0 |
| <a name="requirement_sysdig"></a> [sysdig](#requirement\_sysdig) | >= 0.5.21 |

## Providers
Expand Down
27 changes: 0 additions & 27 deletions modules/services/cloud-bench/task/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -19,30 +19,3 @@ data "google_organization" "organization" {
count = var.organization_domain == "" ? 0 : 1
domain = var.organization_domain
}

locals {
benchmark_task_name = var.is_organizational ? "Organization: ${data.google_organization.organization[0].org_id}" : trimprefix(data.google_project.project[0].id, "projects/")
accounts_scope_clause = var.is_organizational ? "gcp.projectId in (\"${join("\", \"", local.project_numbers)}\")" : "gcp.projectId = \"${local.project_numbers[0]}\""
regions_scope_clause = length(var.regions) == 0 ? "" : " and gcp.region in (\"${join("\", \"", var.regions)}\")"
}

###################################################
# Configure Sysdig Backend
###################################################

resource "random_integer" "minute" {
max = 59
min = 0
}

resource "random_integer" "hour" {
max = 23
min = 0
}

resource "sysdig_secure_benchmark_task" "benchmark_task" {
name = "Sysdig Secure for Cloud (GCP) - ${local.benchmark_task_name}"
schedule = "${random_integer.minute.result} ${random_integer.hour.result} * * *"
schema = "gcp_foundations_bench-1.2.0"
scope = "${local.accounts_scope_clause}${local.regions_scope_clause}"
}
4 changes: 0 additions & 4 deletions modules/services/cloud-bench/versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,6 @@ terraform {
required_version = ">= 0.15.0"

required_providers {
random = {
source = "hashicorp/random"
version = ">= 3.1.0"
}
google = {
source = "hashicorp/google"
version = ">= 4.21.0"
Expand Down
1 change: 0 additions & 1 deletion modules/services/cloud-connector/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ module "cloud_connector_gcp" {
|------|---------|
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 0.15.0 |
| <a name="requirement_google"></a> [google](#requirement\_google) | >= 4.21.0 |
| <a name="requirement_random"></a> [random](#requirement\_random) | >= 3.1.0 |

## Providers

Expand Down