Skip to content

Commit e48c659

Browse files
author
iru
authored
docs: several clarifications (#96)
* docs: clarify import for trust_relationship * docs: add troubleshooting PORT error * docs: add sysdig_secure_endpoint as default endpoint is not that used
1 parent f716cf2 commit e48c659

File tree

5 files changed

+21
-18
lines changed

5 files changed

+21
-18
lines changed

README.md

+15-6
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,8 @@ provider "google-beta" {
8181
}
8282
8383
provider "sysdig" {
84-
sysdig_secure_api_token = "00000000-1111-2222-3333-444444444444"
84+
sysdig_secure_url = "<SYSDIG_SECURE_URL>"
85+
sysdig_secure_endpoint = "<SYSDIG_SECURE_API_TOKEN>"
8586
}
8687
8788
module "cloud_bench" {
@@ -138,7 +139,7 @@ And a CloudBuild being launched successfully.
138139
## Troubleshooting
139140
140141
### Q: Getting "Error creating WorkloadIdentityPool: googleapi: Error 409: Requested entity already exists"<br/>
141-
A: Currently Sysdig Backend does not support dynamic WorkloadPool and it's name is fixed to `sysdiglcoud`.
142+
A: Currently Sysdig Backend does not support dynamic WorkloadPool and it's name is fixed to `sysdigcloud`.
142143
<br/>Besides, Google, only performs a soft-deletion of this resource.
143144
https://cloud.google.com/iam/docs/manage-workload-identity-pools-providers#delete-pool
144145
> You can undelete a pool for up to 30 days after deletion. After 30 days, deletion is permanent. Until a pool is permanently deleted, you cannot reuse its name when creating a new workload identity pool.<br/>
@@ -150,12 +151,17 @@ $ gcloud iam workload-identity-pools undelete sysdigcloud --location=global
150151
$ gcloud iam workload-identity-pools providers undelete sysdigcloud --workload-identity-pool="sysdigcloud" --location=global
151152
152153
# import to terraform state
153-
# input your project-id, and for organization example, change the import resource accordingly
154-
$ terraform import 'module.sfc_example_single-project.module.cloud_bench[0].module.trust_relationship["<YOUR_PROJECT_ID>"].google_iam_workload_identity_pool.pool' sysdigcloud
155-
$ terraform import 'module.sfc_example_single-project.module.cloud_bench[0].module.trust_relationship["<YOUR_PROJECT_ID>"].google_iam_workload_identity_pool_provider.pool_provider' sysdigcloud/sysdigcloud
154+
# for this you have to adapt the import resource to your specific usage
155+
# ex.: for single-project, input your project-id
156+
$ terraform import 'module.secure-for-cloud_example_single-project.module.cloud_bench[0].module.trust_relationship["<YOUR_PROJECT_ID>"].google_iam_workload_identity_pool.pool' sysdigcloud
157+
$ terraform import 'module.secure-for-cloud_example_single-project.module.cloud_bench[0].module.trust_relationship["<YOUR_PROJECT_ID>"].google_iam_workload_identity_pool_provider.pool_provider' sysdigcloud/sysdigcloud
158+
159+
# ex.: for organization example you should change its reference too, per project
160+
$ terraform import 'module.secure-for-cloud_example_organization.module.cloud_bench[0].module.trust_relationship["<YOUR_PROJECT_ID>"].google_iam_workload_identity_pool.pool' sysdigcloud
161+
$ terraform import 'module.secure-for-cloud_example_organization.module.cloud_bench[0].module.trust_relationship["<YOUR_PROJECT_ID>"].google_iam_workload_identity_pool_provider.pool_provider' sysdigcloud/sysdigcloud
156162
```
157163

158-
### Q: Gettint "Error creating Topic: googleapi: Error 409: Resource already exists in the project (resource=gcr)"
164+
### Q: Getting "Error creating Topic: googleapi: Error 409: Resource already exists in the project (resource=gcr)"
159165
```text
160166
│ Error: Error creating Topic: googleapi: Error 409: Resource already exists in the project (resource=gcr).
161167
@@ -172,6 +178,9 @@ $ terraform import 'module.sfc_example_single_project.module.pubsub_http_subscri
172178
Contact us to develop a workaround for this, where the topic name is to be reused.
173179
174180
181+
### Q: Getting "Cloud Run error: Container failed to start. Failed to start and then listen on the port defined by the PORT environment variable."
182+
A: If cloud-connector cloud run module cannot start it will give this error. The error is given by the health-check system, it's not specific to its PORT per-se
183+
S: Verify possible logs before the deployment crashes. Could be limitations due to Sysdig license (expired trial subscription or free-tier usage where cloud-account limit has been surpassed)
175184
176185
### Q: Scanning does not seem to work<br/>
177186
A: Verify that `gcr` topic exists. If `create_gcr_topic` is set to false and `gcr` topic is not found, the GCR scanning is omitted and won't be deployed. For more info see GCR PubSub topic.

examples/organization/README.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,8 @@ module "secure-for-cloud_example_organization" {
5050
source = "sysdiglabs/secure-for-cloud/google//examples/organization"
5151
5252
repository_project_ids = ["<PROJECT_SCAN_ID1>", "<PROJECT_SCAN_ID2>"]
53-
sysdig_secure_api_token = "00000000-1111-2222-3333-444444444444"
53+
sysdig_secure_url = "<SYSDIG_SECURE_URL>"
54+
sysdig_secure_endpoint = "<SYSDIG_SECURE_API_TOKEN>"
5455
organization_domain = "<ORG_DOMAIN>"
5556
}
5657
```

examples/single-project-k8s/README.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,8 @@ provider "helm" {
4343
4444
module "secure_for_cloud_gcp_single_project_k8s" {
4545
source = "sysdiglabs/secure-for-cloud/google//examples/single-project-k8s"
46-
sysdig_secure_api_token = "00000000-1111-2222-3333-444444444444"
46+
sysdig_secure_url = "<SYSDIG_SECURE_URL>"
47+
sysdig_secure_endpoint = "<SYSDIG_SECURE_API_TOKEN>"
4748
}
4849
```
4950

examples/single-project/README.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,8 @@ provider "google-beta" {
4949
5050
module "secure-for-cloud_example_single-project" {
5151
source = "sysdiglabs/secure-for-cloud/google//examples/single-project"
52-
sysdig_secure_api_token = "00000000-1111-2222-3333-444444444444"
52+
sysdig_secure_url = "<SYSDIG_SECURE_URL>"
53+
sysdig_secure_endpoint = "<SYSDIG_SECURE_API_TOKEN>"
5354
}
5455
```
5556

test/fixtures/single-project-k8s/backend.tf

-9
This file was deleted.

0 commit comments

Comments
 (0)