Skip to content

Commit 51e23ee

Browse files
feat: add option to attach a permissions boundary
1 parent 220725f commit 51e23ee

File tree

3 files changed

+11
-3
lines changed

3 files changed

+11
-3
lines changed

modules/services/cloud-bench/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ No modules.
5555
|------|-------------|------|---------|:--------:|
5656
| <a name="input_is_organizational"></a> [is\_organizational](#input\_is\_organizational) | true/false whether secure-for-cloud should be deployed in an organizational setup (all accounts of org) or not (only on default aws provider account) | `bool` | `false` | no |
5757
| <a name="input_name"></a> [name](#input\_name) | The name of the IAM Role that will be created. | `string` | `"sfc-cloudbench"` | no |
58+
| <a name="input_permissions_boundary_arn"></a> [permissions\_boundary\_arn](#input\_permissions\_boundary\_arn) | ARN of a permissions boundary policy to attach to the cloudbench role | `string` | `null` | no |
5859
| <a name="input_provision_caller_account"></a> [provision\_caller\_account](#input\_provision\_caller\_account) | true/false whether to provision the aws provider account (if is\_organizational=true management account, if is\_organizational=false it will depend on the provider setup on the caller module | `bool` | `true` | no |
5960
| <a name="input_region"></a> [region](#input\_region) | Default region for resource creation in organization mode | `string` | `"eu-central-1"` | no |
6061
| <a name="input_tags"></a> [tags](#input\_tags) | customization of tags to be assigned to all resources. <br/>always include 'product' default tag for resource-group proper functioning.<br/>can also make use of the [provider-level `default-tags`](https://registry.terraform.io/providers/hashicorp/aws/latest/docs#default_tags) | `map(string)` | <pre>{<br> "product": "sysdig-secure-for-cloud"<br>}</pre> | no |

modules/services/cloud-bench/main.tf

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,9 +69,10 @@ data "aws_iam_policy_document" "trust_relationship" {
6969
resource "aws_iam_role" "cloudbench_role" {
7070
count = var.is_organizational && !var.provision_caller_account ? 0 : 1
7171

72-
name = var.name
73-
assume_role_policy = data.aws_iam_policy_document.trust_relationship.json
74-
tags = var.tags
72+
name = var.name
73+
assume_role_policy = data.aws_iam_policy_document.trust_relationship.json
74+
tags = var.tags
75+
permissions_boundary = var.permissions_boundary_arn
7576
}
7677

7778

modules/services/cloud-bench/variables.tf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,3 +34,9 @@ variable "tags" {
3434
"product" = "sysdig-secure-for-cloud"
3535
}
3636
}
37+
38+
variable "permissions_boundary_arn" {
39+
type = string
40+
description = "ARN of a permissions boundary policy to attach to the cloudbench role"
41+
default = null
42+
}

0 commit comments

Comments
 (0)