|
| 1 | +# Sysdig Secure for Cloud in GCP :: 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 the secure-for-cloud stack: |
| 6 | + - [Cloud-Connector Chart](https://charts.sysdig.com/charts/cloud-connector/) |
| 7 | + - Because these charts require specific GCP credentials to be passed by parameter, a new service account + key will |
| 8 | + be created within the project. See [`credentials.tf`](./credentials.tf) |
| 9 | +- Used architecture is similar to [single-project](../single-project) but changing Cloud Run <---> with an existing K8s |
| 10 | + |
| 11 | +All the required resources and workloads will be run under the same GCP project. |
| 12 | + |
| 13 | +## Prerequisites |
| 14 | + |
| 15 | +Minimum requirements: |
| 16 | + |
| 17 | +1. `gcloud` 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_gcp_single_project_k8s" { |
| 30 | + source = "sysdiglabs/secure-for-cloud/google//examples/single-project-k8s" |
| 31 | +
|
| 32 | + project_id = "your-project-id" |
| 33 | + sysdig_secure_api_token = "00000000-1111-2222-3333-444444444444" |
| 34 | +} |
| 35 | +``` |
| 36 | + |
| 37 | +See [inputs summary](#inputs) or module module [`variables.tf`](./variables.tf) file for more optional configuration. |
| 38 | + |
| 39 | +Notice that: |
| 40 | + |
| 41 | +* This example will create resources that **cost money**. Run `terraform destroy` when you don't need them anymore. |
| 42 | +* All created resources will be created within the tags `product:sysdig-secure-for-cloud`. |
| 43 | + |
| 44 | +<!-- BEGINNING OF PRE-COMMIT-TERRAFORM DOCS HOOK --> |
| 45 | +## Requirements |
| 46 | + |
| 47 | +| Name | Version | |
| 48 | +|------|---------| |
| 49 | +| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 0.15.0 | |
| 50 | +| <a name="requirement_google"></a> [google](#requirement\_google) | >= 3.67.0 | |
| 51 | +| <a name="requirement_helm"></a> [helm](#requirement\_helm) | >=2.3.0 | |
| 52 | +| <a name="requirement_sysdig"></a> [sysdig](#requirement\_sysdig) | >= 0.5.19 | |
| 53 | + |
| 54 | +## Providers |
| 55 | + |
| 56 | +| Name | Version | |
| 57 | +|------|---------| |
| 58 | +| <a name="provider_google"></a> [google](#provider\_google) | >= 3.67.0 | |
| 59 | +| <a name="provider_helm"></a> [helm](#provider\_helm) | >=2.3.0 | |
| 60 | + |
| 61 | +## Modules |
| 62 | + |
| 63 | +| Name | Source | Version | |
| 64 | +|------|--------|---------| |
| 65 | +| <a name="module_connector_project_sink"></a> [connector\_project\_sink](#module\_connector\_project\_sink) | ../../modules/infrastructure/project_sink | | |
| 66 | + |
| 67 | +## Resources |
| 68 | + |
| 69 | +| Name | Type | |
| 70 | +|------|------| |
| 71 | +| [google_pubsub_subscription.subscription](https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/pubsub_subscription) | resource | |
| 72 | +| [google_pubsub_subscription_iam_member.pull](https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/pubsub_subscription_iam_member) | resource | |
| 73 | +| [google_service_account.connector_sa](https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/service_account) | resource | |
| 74 | +| [google_service_account_key.connector_sa_key](https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/service_account_key) | resource | |
| 75 | +| [helm_release.cloud_connector](https://registry.terraform.io/providers/hashicorp/helm/latest/docs/resources/release) | resource | |
| 76 | + |
| 77 | +## Inputs |
| 78 | + |
| 79 | +| Name | Description | Type | Default | Required | |
| 80 | +|------|-------------|------|---------|:--------:| |
| 81 | +| <a name="input_project_id"></a> [project\_id](#input\_project\_id) | Project ID where the secure-for-cloud workload is going to be deployed | `string` | n/a | yes | |
| 82 | +| <a name="input_sysdig_secure_api_token"></a> [sysdig\_secure\_api\_token](#input\_sysdig\_secure\_api\_token) | Sysdig's Secure API Token | `string` | n/a | yes | |
| 83 | +| <a name="input_cloud_connector_image"></a> [cloud\_connector\_image](#input\_cloud\_connector\_image) | Cloud-connector image to deploy | `string` | `"quay.io/sysdig/cloud-connector"` | no | |
| 84 | +| <a name="input_location"></a> [location](#input\_location) | Zone where the stack will be deployed | `string` | `"us-central1"` | no | |
| 85 | +| <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 | |
| 86 | +| <a name="input_sysdig_secure_endpoint"></a> [sysdig\_secure\_endpoint](#input\_sysdig\_secure\_endpoint) | Sysdig Secure API endpoint | `string` | `"https://secure.sysdig.com"` | no | |
| 87 | + |
| 88 | +## Outputs |
| 89 | + |
| 90 | +No outputs. |
| 91 | +<!-- END OF PRE-COMMIT-TERRAFORM DOCS HOOK --> |
| 92 | + |
| 93 | +## Authors |
| 94 | + |
| 95 | +Module is maintained and supported by [Sysdig](https://sysdig.com). |
| 96 | + |
| 97 | +## License |
| 98 | + |
| 99 | +Apache 2 Licensed. See LICENSE for full details. |
0 commit comments