You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: organizational, add support for single-account deployment (#128)
small steps to go for organizational single-account setup as required by
many customers; ⚠️ scanning still not supported
- added use-case explanation
- added `deploy_benchmark_organizational` to deploy `cloud-bench` module
on single account OR stackset (organizational)
- added test (wip, evaluating if required time makes sense)
<!--
Thank you for your contribution!
## General recommendations
Check contribution guidelines at
https://github.com/sysdiglabs/terraform-aws-secure-for-cloud/blob/master/CONTRIBUTE.md#contribution-checklist
For a cleaner PR make sure you follow these recommendations:
- Review modified files and delete small changes that were not intended
and maybe slip the commit.
- Use Pull Request Drafts for visibility on Work-In-Progress branches
and use them on daily mob/pairing for team review
- Unless an external revision is desired, in order to validate or gather
some feedback, you are free to merge as long as **validation checks are
green-lighted**
## Checklist
- [ ] If `test/fixtures/*/main.tf` files are modified. I have updated:
- [ ] the snippets in the README.md file under root folder.
- [ ] the snippets in the README.md file for the corresponding example.
- [ ] If `examples` folder are modified. I have updated:
- [ ] README.md file with pertinent changes.
- [ ] `test/fixtures/*/main.tf` in case the snippet needs modifications.
- [ ] If any architectural change has been made, I have updated the
diagrams.
-->
Copy file name to clipboardExpand all lines: README.md
+2-2
Original file line number
Diff line number
Diff line change
@@ -20,7 +20,7 @@ For other Cloud providers check: [GCP](https://github.com/sysdiglabs/terraform-g
20
20
21
21
## Usage
22
22
23
-
There are several ways to deploy Secure for Cloud in you AWS infrastructure,
23
+
There are several ways to deploy Secure for Cloud in you AWS infrastructure,
24
24
-**[`/examples`](https://github.com/sysdiglabs/terraform-aws-secure-for-cloud/tree/master/examples)** for the most common scenarios
25
25
-[Single Account on ECS](https://github.com/sysdiglabs/terraform-aws-secure-for-cloud/tree/master/examples/single-account-ecs/)
26
26
-[Single Account on AppRunner](https://github.com/sysdiglabs/terraform-aws-secure-for-cloud/tree/master/examples/single-account-apprunner/)
@@ -115,7 +115,7 @@ ecs:DescribeTaskDefinition
115
115
116
116
Check official documentation on [Secure for cloud - AWS, Confirm the Services are working](https://docs.sysdig.com/en/docs/installation/sysdig-secure-for-cloud/deploy-sysdig-secure-for-cloud-on-aws/#confirm-the-services-are-working)
117
117
118
-
### General
118
+
### General
119
119
120
120
Generally speaking, a triggered situation (threat or image-scanning) whould be check (from more functional-side to more technical)
| <aname="input_cloudtrail_kms_enable"></a> [cloudtrail\_kms\_enable](#input\_cloudtrail\_kms\_enable)| true/false whether the created cloudtrail should deliver encrypted events to s3 |`bool`|`true`| no |
183
186
| <aname="input_connector_ecs_task_role_name"></a> [connector\_ecs\_task\_role\_name](#input\_connector\_ecs\_task\_role\_name)| Name for the ecs task role. This is only required to resolve cyclic dependency with organizational approach |`string`|`"organizational-ECSTaskRole"`| no |
184
187
| <aname="input_deploy_benchmark"></a> [deploy\_benchmark](#input\_deploy\_benchmark)| Whether to deploy or not the cloud benchmarking |`bool`|`true`| no |
188
+
| <aname="input_deploy_benchmark_organizational"></a> [deploy\_benchmark\_organizational](#input\_deploy\_benchmark\_organizational)| true/false whether benchmark module should be deployed on organizational or single-account mode (1 role per org accounts if true, 1 role in default aws provider account if false)</li></ul> |`bool`|`true`| no |
185
189
| <aname="input_deploy_image_scanning_ecr"></a> [deploy\_image\_scanning\_ecr](#input\_deploy\_image\_scanning\_ecr)| true/false whether to deploy the image scanning on ECR pushed images |`bool`|`false`| no |
186
190
| <aname="input_deploy_image_scanning_ecs"></a> [deploy\_image\_scanning\_ecs](#input\_deploy\_image\_scanning\_ecs)| true/false whether to deploy the image scanning on ECS running images |`bool`|`false`| no |
187
191
| <aname="input_ecs_cluster_name"></a> [ecs\_cluster\_name](#input\_ecs\_cluster\_name)| Name of a pre-existing ECS (elastic container service) cluster. If defaulted, a new ECS cluster/VPC/Security Group will be created. If specified all three parameters `ecs_cluster_name`, `ecs_vpc_id` and `ecs_vpc_subnets_private_ids` are required. ECS location will/must be within the `sysdig_secure_for_cloud_member_account_id` parameter accountID |`string`|`"create"`| no |
Copy file name to clipboardExpand all lines: examples/organizational/variables.tf
+6
Original file line number
Diff line number
Diff line change
@@ -98,6 +98,12 @@ variable "deploy_benchmark" {
98
98
default=true
99
99
}
100
100
101
+
variable"deploy_benchmark_organizational" {
102
+
type=bool
103
+
default=true
104
+
description="true/false whether benchmark module should be deployed on organizational or single-account mode (1 role per org accounts if true, 1 role in default aws provider account if false)</li></ul>"
105
+
}
106
+
101
107
variable"benchmark_regions" {
102
108
type=list(string)
103
109
description="List of regions in which to run the benchmark. If empty, the task will contain all aws regions by default."
| <aname="input_cloudtrail_kms_enable"></a> [cloudtrail\_kms\_enable](#input\_cloudtrail\_kms\_enable)| true/false whether s3 should be encrypted |`bool`|`true`| no |
45
45
| <aname="input_is_multi_region_trail"></a> [is\_multi\_region\_trail](#input\_is\_multi\_region\_trail)| true/false whether cloudtrail will ingest multiregional events |`bool`|`true`| no |
46
-
| <aname="input_is_organizational"></a> [is\_organizational](#input\_is\_organizational)| whether secure-for-cloud should be deployed in an organizational setup|`bool`|`false`| no |
46
+
| <aname="input_is_organizational"></a> [is\_organizational](#input\_is\_organizational)|true/false whether cloudtrail is organizational or not|`bool`|`false`| no |
47
47
| <aname="input_name"></a> [name](#input\_name)| Name to be assigned to all child resources. A suffix may be added internally when required. Use default value unless you need to install multiple instances |`string`|`"sfc"`| no |
48
48
| <aname="input_organizational_config"></a> [organizational\_config](#input\_organizational\_config)| organizational\_config. following attributes must be given<br><ul><li>`sysdig_secure_for_cloud_member_account_id` to enable reading permission</li><br><li>`organizational_role_per_account` to enable SNS topic subscription. by default "OrganizationAccountAccessRole"</li></ul> | <pre>object({<br> sysdig_secure_for_cloud_member_account_id = string<br> organizational_role_per_account = string<br> })</pre> | <pre>{<br> "organizational_role_per_account": null,<br> "sysdig_secure_for_cloud_member_account_id": null<br>}</pre> | no |
49
49
| <aname="input_s3_bucket_expiration_days"></a> [s3\_bucket\_expiration\_days](#input\_s3\_bucket\_expiration\_days)| Number of days that the logs will persist in the bucket |`number`|`5`| no |
| <aname="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 aws regions by default. |`list(string)`|`[]`| no |
62
-
| <aname="input_is_organizational"></a> [is\_organizational](#input\_is\_organizational)| whether secure-for-cloud should be deployed in an organizational setup |`bool`|`false`| no |
62
+
| <aname="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 |
63
63
| <aname="input_name"></a> [name](#input\_name)| The name of the IAM Role that will be created. |`string`|`"sfc-cloudbench"`| no |
64
-
| <aname="input_provision_in_management_account"></a> [provision\_in\_management\_account](#input\_provision\_in\_management\_account)|Whether to deploy the stack in the management account |`bool`|`true`| no |
64
+
| <aname="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 |
65
65
| <aname="input_region"></a> [region](#input\_region)| Default region for resource creation in organization mode |`string`|`"eu-central-1"`| no |
66
66
| <aname="input_tags"></a> [tags](#input\_tags)| sysdig secure-for-cloud tags. always include 'product' default tag for resource-group proper functioning |`map(string)`| <pre>{<br> "product": "sysdig-secure-for-cloud"<br>}</pre> | no |
Copy file name to clipboardExpand all lines: modules/services/cloud-bench/variables.tf
+3-3
Original file line number
Diff line number
Diff line change
@@ -11,7 +11,7 @@ variable "name" {
11
11
variable"is_organizational" {
12
12
type=bool
13
13
default=false
14
-
description="whether secure-for-cloud should be deployed in an organizational setup"
14
+
description="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)"
description="Whether to deploy the stack in the management account"
32
+
description="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"
0 commit comments