Skip to content

Commit 7fdb1df

Browse files
feat: Custom Role name in Cloud Bench (#26)
* feat: Custom Role name in CLoud Bench * fix: Update README's with pre-commit
1 parent a1b0b26 commit 7fdb1df

File tree

7 files changed

+15
-7
lines changed

7 files changed

+15
-7
lines changed

examples-internal/single-account-benchmark/versions.tf

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ terraform {
66
}
77
sysdig = {
88
source = "sysdiglabs/sysdig"
9-
version = ">= 0.5.19"
9+
version = ">= 0.5.21"
1010
}
1111
}
1212
}

examples/single-account/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ Notice that:
4848
|------|---------|
4949
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 0.15.0 |
5050
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 3.50.0 |
51-
| <a name="requirement_sysdig"></a> [sysdig](#requirement\_sysdig) | >= 0.5.19 |
51+
| <a name="requirement_sysdig"></a> [sysdig](#requirement\_sysdig) | >= 0.5.21 |
5252

5353
## Providers
5454

examples/single-account/versions.tf

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ terraform {
66
}
77
sysdig = {
88
source = "sysdiglabs/sysdig"
9-
version = ">= 0.5.19"
9+
version = ">= 0.5.21"
1010
}
1111
}
1212
}

modules/services/cloud-bench/README.md

+3-2
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,14 @@ Deploys
1414
|------|---------|
1515
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 0.15.0 |
1616
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 3.50.0 |
17-
| <a name="requirement_sysdig"></a> [sysdig](#requirement\_sysdig) | >= 0.5.19 |
17+
| <a name="requirement_sysdig"></a> [sysdig](#requirement\_sysdig) | >= 0.5.21 |
1818

1919
## Providers
2020

2121
| Name | Version |
2222
|------|---------|
2323
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 3.50.0 |
24-
| <a name="provider_sysdig"></a> [sysdig](#provider\_sysdig) | >= 0.5.19 |
24+
| <a name="provider_sysdig"></a> [sysdig](#provider\_sysdig) | >= 0.5.21 |
2525

2626
## Modules
2727

@@ -45,6 +45,7 @@ No modules.
4545
|------|-------------|------|---------|:--------:|
4646
| <a name="input_account_id"></a> [account\_id](#input\_account\_id) | the account\_id in which to provision the cloud-bench IAM role | `string` | n/a | yes |
4747
| <a name="input_regions"></a> [regions](#input\_regions) | List of regions in which to run the benchmark. If empty, the task will contain all aws regions by default. | `list(string)` | `[]` | no |
48+
| <a name="input_role_name"></a> [role\_name](#input\_role\_name) | The name of the IAM Role that will be created. | `string` | `"SysdigCloudBench"` | no |
4849
| <a name="input_tags"></a> [tags](#input\_tags) | sysdig secure-for-cloud tags | `map(string)` | <pre>{<br> "product": "sysdig-secure-for-cloud"<br>}</pre> | no |
4950

5051
## Outputs

modules/services/cloud-bench/main.tf

+2-1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ resource "sysdig_secure_cloud_account" "cloud_account" {
55
account_id = var.account_id
66
cloud_provider = "aws"
77
role_enabled = "true"
8+
role_name = var.role_name
89
}
910

1011
data "sysdig_secure_trusted_cloud_identity" "trusted_identity" {
@@ -30,7 +31,7 @@ resource "sysdig_secure_benchmark_task" "benchmark_task" {
3031
#
3132

3233
resource "aws_iam_role" "cloudbench_role" {
33-
name = "SysdigCloudBench"
34+
name = var.role_name
3435
assume_role_policy = data.aws_iam_policy_document.trust_relationship.json
3536
tags = var.tags
3637
}

modules/services/cloud-bench/variables.tf

+6
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,12 @@ variable "account_id" {
77
# optionals - with default
88
#---------------------------------
99

10+
variable "role_name" {
11+
type = string
12+
description = "The name of the IAM Role that will be created."
13+
default = "SysdigCloudBench"
14+
}
15+
1016
variable "regions" {
1117
type = list(string)
1218
description = "List of regions in which to run the benchmark. If empty, the task will contain all aws regions by default."

modules/services/cloud-bench/versions.tf

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ terraform {
66
}
77
sysdig = {
88
source = "sysdiglabs/sysdig"
9-
version = ">= 0.5.19"
9+
version = ">= 0.5.21"
1010
}
1111
}
1212
}

0 commit comments

Comments
 (0)