Skip to content

Commit 331b156

Browse files
author
iru
authored
Chore/refact homogeneization (#41)
* chore(refact): deploy vs. enable homogenization * chore(doc): example homogeneization * chore(doc): contrib homogeneization * chore(doc): cc/cs intro
1 parent 294c3cb commit 331b156

File tree

18 files changed

+45
-54
lines changed

18 files changed

+45
-54
lines changed

CONTRIBUTE.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,9 @@
4949
Technical validation for terraform **lint**, **validation**, and **documentation**
5050

5151
We're using **pre-commit** | https://pre-commit.com
52-
- Defined in `/.pre-commit-config.yaml`
53-
- custom configuration | https://github.com/sysdiglabs/terraform-google-secure-for-cloud/blob/master/.pre-commit-config.yaml
54-
- current `terraform-docs` version, requires developer to create `README.md` file, with the enclosure tags for docs to insert the automated content
52+
- Defined in `/.pre-commit-config.yaml`
53+
- custom configuration | https://github.com/sysdiglabs/terraform-google-secure-for-cloud/blob/master/.pre-commit-config.yaml
54+
- current `terraform-docs` version, requires developer to create `README.md` file, with the enclosure tags for docs to insert the automated content
5555
```markdown
5656
<!-- BEGINNING OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
5757
<!-- END OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
@@ -72,7 +72,7 @@ Implemented vía **Terraform Kitchen** | https://newcontext-oss.github.io/kitche
7272

7373
Ruby 2.7 is required to launch the tests.
7474
Run `bundle install` to get kitchen-terraform bundle.
75-
GCP project and AWS credentials should be configured locally.
75+
Cloud Provider credentials should be configured locally.
7676
```shell
7777
# launch the tests, in other words, it will run `terraform apply`
7878
$ bundle exec kitchen converge

README.md

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,12 @@ More info in [`./examples/single-account`](https://github.com/sysdiglabs/terrafo
2929

3030
### - Single-Account with a pre-existing Kubernetes Cluster
3131

32-
If you already own a Kubernetes Cluster on AWS, you can use it to deploy Sysdig Secure for Cloud, instead of default ECS cluster.
33-
32+
If you already own a Kubernetes Cluster on AWS, you can use it to deploy Sysdig Secure for Cloud, instead of default ECS cluster.<br/>
3433
More info in [`./examples/single-account-k8s`](https://github.com/sysdiglabs/terraform-aws-secure-for-cloud/tree/master/examples/single-account-k8s)
3534

3635
### - Organizational
3736

38-
Using an organizational configuration Cloudtrail.
37+
Using an organizational configuration Cloudtrail.<br/>
3938
More info in [`./examples/organizational`](https://github.com/sysdiglabs/terraform-aws-secure-for-cloud/tree/master/examples/organizational)
4039

4140
![organizational diagram](https://raw.githubusercontent.com/sysdiglabs/terraform-aws-secure-for-cloud/5b7cf5e8028b3177536c9c847020ad6319342b44/examples/organizational/diagram-org.png)
@@ -109,9 +108,9 @@ Notice that:
109108
source_profile=<AWS_MANAGEMENT_ACCOUNT_PROFILE>
110109
```
111110
112-
- Q: How to test **cloud-scanner** image-scanning?<br/>
113-
A: Upload any image to the ECR repository of AWS. You should see a log in the ECS-cloud-scanner task + CodeBuild project being launched successfully
114-
<br/>
111+
- Q: How to test **cloud-scanner** image-scanning?<br/>
112+
A: Upload any image to the ECR repository of AWS. You should see a log in the ECS-cloud-scanner task + CodeBuild project being launched successfully
113+
<br/>
115114
116115
117116
<br/><br/>

examples/organizational/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Sysdig Secure for Cloud in AWS :: Shared Organizational Trail
1+
# Sysdig Secure for Cloud in AWS<br/>[ Example :: Shared Organizational Trail ]
22

33
Deploy Sysdig Secure for Cloud sharing the Trail within an organization.
44

examples/single-account-k8s/README.md

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Sysdig Secure for Cloud in AWS <br/>:: Single-Account on Kubernetes Cluster
1+
# Sysdig Secure for Cloud in AWS <br/>[ Example :: Single-Account on Kubernetes Cluster ]
22

33
Deploy Sysdig Secure for Cloud in a provided existing Kubernetes Cluster.
44

@@ -17,17 +17,12 @@ All the required resources and workloads will be run under the same AWS account.
1717
Minimum requirements:
1818

1919
1. **AWS** profile credentials configuration
20-
2120
2. **Kubernetes** cluster configured within your helm provider
22-
2321
3. **Sysdig** Secure requirements, as input variable value
24-
2522
```
2623
sysdig_secure_api_token=<SECURE_API_TOKEN>
2724
```
2825

29-
30-
3126
## Usage
3227

3328
For quick testing, use this snippet on your terraform files
@@ -106,8 +101,8 @@ Notice that:
106101
| <a name="input_sysdig_secure_api_token"></a> [sysdig\_secure\_api\_token](#input\_sysdig\_secure\_api\_token) | Sysdig Secure API token | `string` | n/a | yes |
107102
| <a name="input_cloudtrail_is_multi_region_trail"></a> [cloudtrail\_is\_multi\_region\_trail](#input\_cloudtrail\_is\_multi\_region\_trail) | true/false whether cloudtrail will ingest multiregional events. testing/economization purpose. | `bool` | `true` | no |
108103
| <a name="input_cloudtrail_kms_enable"></a> [cloudtrail\_kms\_enable](#input\_cloudtrail\_kms\_enable) | true/false whether s3 should be encrypted. testing/economization purpose. | `bool` | `true` | no |
109-
| <a name="input_enable_cloud_connector"></a> [enable\_cloud\_connector](#input\_enable\_cloud\_connector) | true/false whether to provision cloud\_connector permissions | `bool` | `true` | no |
110-
| <a name="input_enable_cloud_scanning"></a> [enable\_cloud\_scanning](#input\_enable\_cloud\_scanning) | true/false whether to provision cloud\_scanning permissions | `bool` | `true` | no |
104+
| <a name="input_deploy_image_scanning"></a> [deploy\_image\_scanning](#input\_deploy\_image\_scanning) | true/false whether to deploy cloud\_scanning | `bool` | `true` | no |
105+
| <a name="input_deploy_threat_detection"></a> [deploy\_threat\_detection](#input\_deploy\_threat\_detection) | true/false whether to deploy cloud\_connector | `bool` | `true` | no |
111106
| <a name="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 |
112107
| <a name="input_region"></a> [region](#input\_region) | Default region for resource creation | `string` | `"eu-central-1"` | no |
113108
| <a name="input_sysdig_secure_endpoint"></a> [sysdig\_secure\_endpoint](#input\_sysdig\_secure\_endpoint) | Sysdig Secure API endpoint | `string` | `"https://secure.sysdig.com"` | no |

examples/single-account-k8s/cloud-connector.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# requirements
33
#-------------------------------------
44
module "cloud_connector_sqs" {
5-
count = var.enable_cloud_connector ? 1 : 0
5+
count = var.deploy_threat_detection ? 1 : 0
66
source = "../../modules/infrastructure/sqs-sns-subscription"
77

88
name = "${var.name}-cloud_connector"
@@ -15,7 +15,7 @@ module "cloud_connector_sqs" {
1515
# cloud_connector
1616
#-------------------------------------
1717
resource "helm_release" "cloud_connector" {
18-
count = var.enable_cloud_connector ? 1 : 0
18+
count = var.deploy_threat_detection ? 1 : 0
1919

2020
name = "cloud-connector"
2121
repository = "https://charts.sysdig.com"

examples/single-account-k8s/cloud-scanning.tf

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# requirements
33
#-------------------------------------
44
module "cloud_scanning_sqs" {
5-
count = var.enable_cloud_scanning ? 1 : 0
5+
count = var.deploy_image_scanning ? 1 : 0
66
source = "../../modules/infrastructure/sqs-sns-subscription"
77

88
name = "${var.name}-cloud_scanning"
@@ -12,7 +12,7 @@ module "cloud_scanning_sqs" {
1212

1313

1414
module "codebuild" {
15-
count = var.enable_cloud_scanning ? 1 : 0
15+
count = var.deploy_image_scanning ? 1 : 0
1616
source = "../../modules/infrastructure/codebuild"
1717

1818
secure_api_token_secret_name = module.ssm.secure_api_token_secret_name
@@ -26,7 +26,7 @@ module "codebuild" {
2626
# cloud_scanning
2727
#-------------------------------------
2828
resource "helm_release" "cloud_scanning" {
29-
count = var.enable_cloud_scanning ? 1 : 0
29+
count = var.deploy_image_scanning ? 1 : 0
3030
name = "cloud-scanning"
3131

3232
repository = "https://charts.sysdig.com"

examples/single-account-k8s/credentials.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@ module "iam_user" {
22
source = "../../modules/infrastructure/permissions/iam-user"
33
name = var.name
44
ssm_secure_api_token_arn = module.ssm.secure_api_token_secret_arn
5-
enable_cloud_connector = var.enable_cloud_connector
6-
enable_cloud_scanning = var.enable_cloud_scanning
5+
deploy_threat_detection = var.deploy_threat_detection
6+
deploy_image_scanning = var.deploy_image_scanning
77
}

examples/single-account-k8s/variables.tf

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,15 @@ variable "sysdig_secure_api_token" {
88
# optionals - with defaults
99
#---------------------------------
1010

11-
variable "enable_cloud_connector" {
11+
variable "deploy_threat_detection" {
1212
type = bool
13-
description = "true/false whether to provision cloud_connector permissions"
13+
description = "true/false whether to deploy cloud_connector"
1414
default = true
1515
}
1616

17-
variable "enable_cloud_scanning" {
17+
variable "deploy_image_scanning" {
1818
type = bool
19-
description = "true/false whether to provision cloud_scanning permissions"
19+
description = "true/false whether to deploy cloud_scanning"
2020
default = true
2121
}
2222

examples/single-account/README.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
1-
# Sysdig Secure for Cloud in AWS :: Single-Account on ECS Fargate Service
1+
# Sysdig Secure for Cloud in AWS<br/>[ Example :: Single-Account ]
22

3-
Deploy Sysdig Secure for Cloud in a single AWS account
4-
5-
All the required resources and workloads will be run under the same AWS account.
3+
Deploy Sysdig Secure for Cloud in a single AWS account.<br/>
4+
All the required resources and workloads will be run under the same account.
65

76
![single-account diagram](https://raw.githubusercontent.com/sysdiglabs/terraform-aws-secure-for-cloud/7d142829a701ce78f13691a4af4be373625e7ee2/examples/single-account/diagram-single.png)
87

modules/infrastructure/permissions/eks-org-role/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,8 @@ No modules.
5252
|------|-------------|------|---------|:--------:|
5353
| <a name="input_cloudtrail_s3_arn"></a> [cloudtrail\_s3\_arn](#input\_cloudtrail\_s3\_arn) | Cloudtrail S3 bucket ARN | `string` | n/a | yes |
5454
| <a name="input_user_arn"></a> [user\_arn](#input\_user\_arn) | ARN of the IAM user to which roles will be added | `string` | n/a | yes |
55-
| <a name="input_enable_cloud_connector"></a> [enable\_cloud\_connector](#input\_enable\_cloud\_connector) | true/false whether to provision cloud\_connector permissions | `bool` | `true` | no |
56-
| <a name="input_enable_cloud_scanning"></a> [enable\_cloud\_scanning](#input\_enable\_cloud\_scanning) | true/false whether to provision cloud\_scanning permissions | `bool` | `true` | no |
55+
| <a name="input_deploy_image_scanning"></a> [deploy\_image\_scanning](#input\_deploy\_image\_scanning) | true/false whether to provision cloud\_scanning permissions | `bool` | `true` | no |
56+
| <a name="input_deploy_threat_detection"></a> [deploy\_threat\_detection](#input\_deploy\_threat\_detection) | true/false whether to provision cloud\_connector permissions | `bool` | `true` | no |
5757
| <a name="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 |
5858
| <a name="input_organizational_role_per_account"></a> [organizational\_role\_per\_account](#input\_organizational\_role\_per\_account) | Name of the organizational role deployed by AWS in each account of the organization | `string` | `"OrganizationAccountAccessRole"` | no |
5959
| <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 |

0 commit comments

Comments
 (0)