Skip to content

Commit f7360a9

Browse files
SSPROD-57435 - fix: add cdr timing (#69)
* SSPROD-57435 - fix: add cdr timing * SSPROD-57435 - fix: add cdr timing
1 parent 444d2d3 commit f7360a9

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

modules/integrations/pub-sub/main.tf

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -238,6 +238,13 @@ resource "google_service_account_iam_member" "custom_auth" {
238238
member = "principalSet://iam.googleapis.com/projects/${data.google_project.project.number}/locations/global/workloadIdentityPools/${google_iam_workload_identity_pool.ingestion_auth_pool.workload_identity_pool_id}/attribute.aws_role/arn:aws:sts::${data.sysdig_secure_trusted_cloud_identity.trusted_identity.aws_account_id}:assumed-role/${data.sysdig_secure_trusted_cloud_identity.trusted_identity.aws_role_name}/${data.sysdig_secure_tenant_external_id.external_id.external_id}"
239239
}
240240

241+
# add some timing for SA and permissions to be completely ready before calling Sysdig Backend, ensure that the validation will pass on first try
242+
resource "time_sleep" "wait_for_apply_google_permissions" {
243+
depends_on = [sysdig_secure_cloud_auth_account_component.gcp_pubsub_datasource]
244+
245+
create_duration = "30s"
246+
}
247+
241248
#-----------------------------------------------------------------------------------------------------------------------------------------
242249
# Call Sysdig Backend to add the pub-sub integration to the Sysdig Cloud Account
243250
#

modules/integrations/pub-sub/versions.tf

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,9 @@ terraform {
1414
source = "hashicorp/random"
1515
version = ">= 3.1"
1616
}
17+
time = {
18+
source = "hashicorp/time"
19+
version = "0.13.1"
20+
}
1721
}
1822
}

0 commit comments

Comments
 (0)