@@ -23,17 +23,17 @@ Skip step 4 and remove `aws_access_key_id` and `aws_secret_access_key` parameter
2323## Suggested building-blocks
2424
25251 . Define different ** AWS providers**
26- 1 . Populate ` _REGION_ ` and ` _S3_REGION_ `
26+ 1 . Populate ` _REGION_ ` . Currently, same region is to be used
2727 2 . Because we are going to provision resources on multiple accounts, we're gonna need several AWS providers
2828
2929 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
3131
3232
3333``` terraform
3434provider "aws" {
3535 alias = "s3"
36- region = "_S3_REGION_ "
36+ region = "_REGION_ "
3737 ...
3838}
3939
@@ -101,29 +101,59 @@ module "org_user" {
101101
1021025 . ** Sysdig workload deployment on K8s**
103103
104- * Populate ` _SYSDIG_SECURE_ENDPOINT_ ` and ` _SYSDID_SECURE_API_TOKEN_ `
104+ * Populate ` _SYSDIG_SECURE_ENDPOINT_ ` , ` _SYSDID_SECURE_API_TOKEN_ ` and ` _REGION_ `
105105
106106``` 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+ }
112123
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+ }
119138
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+ }
123143
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+ }
126148
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+ ]
128157}
158+
129159```
0 commit comments