Skip to content

Commit 332370f

Browse files
feat(vm): modular vm feedback
1 parent 0dad000 commit 332370f

File tree

4 files changed

+13
-20
lines changed

4 files changed

+13
-20
lines changed

modules/agentless-scan/README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,6 @@ No modules.
7676
| <a name="input_project_id"></a> [project\_id](#input\_project\_id) | GCP Project ID | `string` | n/a | yes |
7777
| <a name="input_is_organizational"></a> [is\_organizational](#input\_is\_organizational) | Optional. Determines whether module must scope whole organization. Otherwise single project will be scoped | `bool` | `false` | no |
7878
| <a name="input_organization_domain"></a> [organization\_domain](#input\_organization\_domain) | Optional. If `is_organizational=true` is set, its mandatory to specify this value, with the GCP Organization domain. e.g. sysdig.com | `string` | `null` | no |
79-
| <a name="input_role_name"></a> [role\_name](#input\_role\_name) | Optional. Name for the Worker Role on the Customer infrastructure | `string` | `"SysdigAgentlessHostRole"` | no |
8079
| <a name="input_sysdig_account_id"></a> [sysdig\_account\_id](#input\_sysdig\_account\_id) | Sysdig provided GCP Account designated for the host scan.<br/>One of `sysdig_backend` or `sysdig_account_id`must be provided | `string` | `null` | no |
8180
| <a name="input_sysdig_secure_account_id"></a> [sysdig\_secure\_account\_id](#input\_sysdig\_secure\_account\_id) | ID of the Sysdig Cloud Account to enable Agentless Scanning integration for (in case of organization, ID of the Sysdig management account) | `string` | `null` | no |
8281
| <a name="input_suffix"></a> [suffix](#input\_suffix) | Optional. Suffix word to enable multiple deployments with different naming<br/>(Workload Identity Pool and Providers have a soft deletion on Google Platform that will disallow name re-utilization)<br/>By default a random value will be autogenerated. | `string` | `null` | no |

modules/agentless-scan/main.tf

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -147,20 +147,20 @@ resource "google_service_account_iam_member" "controller_custom_gcp" {
147147
# Custom IAM roles and bindings
148148
#-----------------------------------------------------------------------------------------
149149

150-
resource "google_project_iam_custom_role" "controller" {
150+
resource "google_project_iam_custom_role" "controller_role" {
151151
count = var.is_organizational ? 0 : 1
152152

153153
project = var.project_id
154-
role_id = "${var.role_name}Discovery${local.suffix}"
155-
title = "${var.role_name}, for Host Discovery"
154+
role_id = "SysdigCloudVMDiscovery${local.suffix}"
155+
title = "SysdigCloudVM, for Host Discovery"
156156
permissions = local.host_discovery_permissions
157157
}
158158

159-
resource "google_project_iam_binding" "controller_custom" {
159+
resource "google_project_iam_binding" "controller_binding" {
160160
count = var.is_organizational ? 0 : 1
161161

162162
project = var.project_id
163-
role = google_project_iam_custom_role.controller[0].id
163+
role = google_project_iam_custom_role.controller_role[0].id
164164
members = [
165165
"serviceAccount:${google_service_account.controller.email}",
166166
]
@@ -170,8 +170,8 @@ resource "google_project_iam_custom_role" "worker_role" {
170170
count = var.is_organizational ? 0 : 1
171171

172172
project = var.project_id
173-
role_id = "${var.role_name}Scan${local.suffix}"
174-
title = "${var.role_name}, for Host Scan"
173+
role_id = "SysdigCloudVMScan${local.suffix}"
174+
title = "SysdigCloudVM, for Host Scan"
175175
permissions = local.host_scan_permissions
176176
}
177177

modules/agentless-scan/organizational.tf

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,20 +11,20 @@ data "google_organization" "org" {
1111
# Custom IAM roles and bindings
1212
#-----------------------------------------------------------------------------------------
1313

14-
resource "google_organization_iam_custom_role" "controller" {
14+
resource "google_organization_iam_custom_role" "controller_role" {
1515
count = var.is_organizational ? 1 : 0
1616

1717
org_id = data.google_organization.org[0].org_id
18-
role_id = "${var.role_name}Discovery${title(local.suffix)}"
19-
title = "${var.role_name}, for Host Discovery"
18+
role_id = "SysdigCloudVMDiscovery${local.suffix}"
19+
title = "SysdigCloudVM, for Host Discovery"
2020
permissions = local.host_discovery_permissions
2121
}
2222

2323
resource "google_organization_iam_binding" "controller_custom" {
2424
count = var.is_organizational ? 1 : 0
2525

2626
org_id = data.google_organization.org[0].org_id
27-
role = google_organization_iam_custom_role.controller[0].id
27+
role = google_organization_iam_custom_role.controller_role[0].id
2828
members = [
2929
"serviceAccount:${google_service_account.controller.email}",
3030
]
@@ -34,8 +34,8 @@ resource "google_organization_iam_custom_role" "worker_role" {
3434
count = var.is_organizational ? 1 : 0
3535

3636
org_id = data.google_organization.org[0].org_id
37-
role_id = "${var.role_name}Scan${title(local.suffix)}"
38-
title = "${var.role_name}, for Host Scan"
37+
role_id = "SysdigCloudVMScan${local.suffix}"
38+
title = "SysdigCloudVM, for Host Scan"
3939
permissions = local.host_scan_permissions
4040
}
4141

modules/agentless-scan/variables.tf

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,6 @@ variable "organization_domain" {
1515
default = ""
1616
}
1717

18-
variable "role_name" {
19-
type = string
20-
description = "Name for Sysdig operations on discovery and scan role"
21-
default = "SysdigCloudVM"
22-
}
23-
2418
variable "sysdig_account_id" {
2519
type = string
2620
description = "Sysdig provided GCP Account designated for the host scan. One of sysdig_backend or sysdig_account_id must be provided"

0 commit comments

Comments
 (0)