|
| 1 | +# Sysdig Secure for Cloud in AWS :: Single-Account on Kubernetes Cluster |
| 2 | + |
| 3 | +Deploy Sysdig Secure for Cloud in a provided existing Kubernetes Cluster. |
| 4 | + |
| 5 | +- Sysdig **Helm** charts will be used to deploy threat-detection and scanning modules |
| 6 | + - [Cloud-Connector Chart](https://charts.sysdig.com/charts/cloud-connector/) |
| 7 | + - [Cloud-Scanning Chart](https://charts.sysdig.com/charts/cloud-scanning/) |
| 8 | + - Because these charts require specific AWS credentials to be passed by parameter, a new user + access key will be created within account. See [`credentials.tf`](https://github.com/sysdiglabs/terraform-aws-secure-for-cloud/blob/master/examples/single-account-k8s/credentials.tf) |
| 9 | +- Used arquitecture is similar to [single-account](https://github.com/sysdiglabs/terraform-aws-secure-for-cloud/blob/master/examples/single-account) but changing ECS <---> with an existing EKS |
| 10 | + |
| 11 | +All the required resources and workloads will be run under the same AWS account. |
| 12 | + |
| 13 | +## Prerequisites |
| 14 | + |
| 15 | +Minimum requirements: |
| 16 | + |
| 17 | +1. AWS profile credentials configuration |
| 18 | +2. A Kubernetes cluster configured within your `~/.kube/config` |
| 19 | +3. Secure requirements, as input variable value |
| 20 | + ``` |
| 21 | + sysdig_secure_api_token=<SECURE_API_TOKEN> |
| 22 | + ``` |
| 23 | +
|
| 24 | +## Usage |
| 25 | +
|
| 26 | +For quick testing, use this snippet on your terraform files |
| 27 | +
|
| 28 | +```terraform |
| 29 | +module "secure_for_cloud_aws_single_account" { |
| 30 | + source = "sysdiglabs/secure-for-cloud/aws//examples/single-account-k8s" |
| 31 | +
|
| 32 | + sysdig_secure_api_token = "00000000-1111-2222-3333-444444444444" |
| 33 | +} |
| 34 | +``` |
| 35 | + |
| 36 | +See [inputs summary](#inputs) or module module [`variables.tf`](https://github.com/sysdiglabs/terraform-aws-secure-for-cloud/blob/master/examples/single-account-k8s/variables.tf) file for more optional configuration. |
| 37 | + |
| 38 | +To run this example you need have your [aws account profile configured in CLI](https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-profiles.html) and to execute: |
| 39 | +```terraform |
| 40 | +$ terraform init |
| 41 | +$ terraform plan |
| 42 | +$ terraform apply |
| 43 | +``` |
| 44 | + |
| 45 | +Notice that: |
| 46 | +* This example will create resources that cost money.<br/>Run `terraform destroy` when you don't need them anymore |
| 47 | +* All created resources will be created within the tags `product:sysdig-secure-for-cloud`, within the resource-group `sysdig-secure-for-cloud` |
| 48 | + |
| 49 | +<!-- BEGINNING OF PRE-COMMIT-TERRAFORM DOCS HOOK --> |
| 50 | +## Requirements |
| 51 | + |
| 52 | +| Name | Version | |
| 53 | +|------|---------| |
| 54 | +| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 0.15.0 | |
| 55 | +| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 3.50.0 | |
| 56 | +| <a name="requirement_helm"></a> [helm](#requirement\_helm) | >=2.3.0 | |
| 57 | +| <a name="requirement_sysdig"></a> [sysdig](#requirement\_sysdig) | >= 0.5.19 | |
| 58 | + |
| 59 | +## Providers |
| 60 | + |
| 61 | +| Name | Version | |
| 62 | +|------|---------| |
| 63 | +| <a name="provider_helm"></a> [helm](#provider\_helm) | >=2.3.0 | |
| 64 | + |
| 65 | +## Modules |
| 66 | + |
| 67 | +| Name | Source | Version | |
| 68 | +|------|--------|---------| |
| 69 | +| <a name="module_cloud_connector_sqs"></a> [cloud\_connector\_sqs](#module\_cloud\_connector\_sqs) | ../../modules/infrastructure/cloudtrail-subscription-sqs | | |
| 70 | +| <a name="module_cloud_scanning_sqs"></a> [cloud\_scanning\_sqs](#module\_cloud\_scanning\_sqs) | ../../modules/infrastructure/cloudtrail-subscription-sqs | | |
| 71 | +| <a name="module_cloudtrail"></a> [cloudtrail](#module\_cloudtrail) | ../../modules/infrastructure/cloudtrail | | |
| 72 | +| <a name="module_codebuild"></a> [codebuild](#module\_codebuild) | ../../modules/infrastructure/codebuild | | |
| 73 | +| <a name="module_credentials"></a> [credentials](#module\_credentials) | ../../modules/infrastructure/permissions/single-account-user | | |
| 74 | +| <a name="module_resource_group"></a> [resource\_group](#module\_resource\_group) | ../../modules/infrastructure/resource-group | | |
| 75 | +| <a name="module_ssm"></a> [ssm](#module\_ssm) | ../../modules/infrastructure/ssm | | |
| 76 | + |
| 77 | +## Resources |
| 78 | + |
| 79 | +| Name | Type | |
| 80 | +|------|------| |
| 81 | +| [helm_release.cloud_connector](https://registry.terraform.io/providers/hashicorp/helm/latest/docs/resources/release) | resource | |
| 82 | +| [helm_release.cloud_scanning](https://registry.terraform.io/providers/hashicorp/helm/latest/docs/resources/release) | resource | |
| 83 | + |
| 84 | +## Inputs |
| 85 | + |
| 86 | +| Name | Description | Type | Default | Required | |
| 87 | +|------|-------------|------|---------|:--------:| |
| 88 | +| <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 | |
| 89 | +| <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 | |
| 90 | +| <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 | |
| 91 | +| <a name="input_name"></a> [name](#input\_name) | Name for the Cloud Vision deployment | `string` | `"sysdig-secure-for-cloud-k8s"` | no | |
| 92 | +| <a name="input_region"></a> [region](#input\_region) | Default region for resource creation in both organization master and secure-for-cloud member account | `string` | `"eu-central-1"` | no | |
| 93 | +| <a name="input_sysdig_secure_endpoint"></a> [sysdig\_secure\_endpoint](#input\_sysdig\_secure\_endpoint) | Sysdig Secure API endpoint | `string` | `"https://secure.sysdig.com"` | no | |
| 94 | +| <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 | |
| 95 | + |
| 96 | +## Outputs |
| 97 | + |
| 98 | +No outputs. |
| 99 | +<!-- END OF PRE-COMMIT-TERRAFORM DOCS HOOK --> |
| 100 | + |
| 101 | + |
| 102 | +## Authors |
| 103 | + |
| 104 | +Module is maintained and supported by [Sysdig](https://sysdig.com). |
| 105 | + |
| 106 | +## License |
| 107 | + |
| 108 | +Apache 2 Licensed. See LICENSE for full details. |
0 commit comments