@@ -23,17 +23,17 @@ Skip step 4 and remove `aws_access_key_id` and `aws_secret_access_key` parameter
23
23
## Suggested building-blocks
24
24
25
25
1 . Define different ** AWS providers**
26
- 1 . Populate ` _REGION_ ` and ` _S3_REGION_ `
26
+ 1 . Populate ` _REGION_ ` . Currently, same region is to be used
27
27
2 . Because we are going to provision resources on multiple accounts, we're gonna need several AWS providers
28
28
29
29
2 . ` s3 ` for s3-sns-sqs resources to be deployed. IAM user-credentials, to be used for k8s must also be in S3 account
30
- 3 . ` sfc ` for secure-for-cloud utilitary resources to be deployed
30
+ 3 . ` sfc ` for secure-for-cloud utility resources to be deployed
31
31
32
32
33
33
``` terraform
34
34
provider "aws" {
35
35
alias = "s3"
36
- region = "_S3_REGION_ "
36
+ region = "_REGION_ "
37
37
...
38
38
}
39
39
@@ -101,29 +101,59 @@ module "org_user" {
101
101
102
102
5 . ** Sysdig workload deployment on K8s**
103
103
104
- * Populate ` _SYSDIG_SECURE_ENDPOINT_ ` and ` _SYSDID_SECURE_API_TOKEN_ `
104
+ * Populate ` _SYSDIG_SECURE_ENDPOINT_ ` , ` _SYSDID_SECURE_API_TOKEN_ ` and ` _REGION_ `
105
105
106
106
``` terraform
107
- # force some waiting for org_user creation (eventual consistency)
108
- resource "time_sleep" "wait" {
109
- depends_on = [module.org_user]
110
- create_duration = "5s"
111
- }
107
+ resource "helm_release" "cloud_connector" {
108
+
109
+ provider = helm
110
+
111
+ name = "cloud-connector"
112
+
113
+ repository = "https://charts.sysdig.com"
114
+ chart = "cloud-connector"
115
+
116
+ create_namespace = true
117
+ namespace = "sysdig"
118
+
119
+ set {
120
+ name = "image.pullPolicy"
121
+ value = "Always"
122
+ }
112
123
113
- module "org_k8s_threat_reuse_cloudtrail" {
114
- providers = {
115
- aws = aws.sfc
116
- }
117
- source = "sysdiglabs/secure-for-cloud/aws//examples-internal/organizational-k8s-threat-reuse_cloudtrail"
118
- name = "test-orgk8s"
124
+ set {
125
+ name = "sysdig.url"
126
+ value = "_SYSDIG_SECURE_ENDPOINT_"
127
+ }
128
+
129
+ set_sensitive {
130
+ name = "sysdig.secureAPIToken"
131
+ value = "_SYSDID_SECURE_API_TOKEN_"
132
+ }
133
+
134
+ set_sensitive {
135
+ name = "aws.accessKeyId"
136
+ value = module.org_user.sfc_user_access_key_id
137
+ }
119
138
120
- sysdig_secure_endpoint = _SYSDIG_SECURE_ENDPOINT_
121
- sysdig_secure_api_token = _SYSDID_SECURE_API_TOKEN_
122
- cloudtrail_s3_sns_sqs_url = module.cloudtrail_s3_sns_sqs.cloudtrail_subscribed_sqs_url
139
+ set_sensitive {
140
+ name = "aws.secretAccessKey"
141
+ value = module.org_user.sfc_user_secret_access_key
142
+ }
123
143
124
- aws_access_key_id = module.org_user.sfc_user_access_key_id
125
- aws_secret_access_key = module.org_user.sfc_user_secret_access_key
144
+ set {
145
+ name = "aws.region"
146
+ value = "_REGION_"
147
+ }
126
148
127
- depends_on = [module.org_user.sfc_user_arn, time_sleep.wait]
149
+ values = [
150
+ <<CONFIG
151
+ logging: info
152
+ ingestors:
153
+ - aws-cloudtrail-s3-sns-sqs:
154
+ queueURL: ${module.cloudtrail_s3_sns_sqs.cloudtrail_subscribed_sqs_url}
155
+ CONFIG
156
+ ]
128
157
}
158
+
129
159
```
0 commit comments