sourcegraph/dev/managedservicesplatform
Robert Lin 2958abc326
fix/msp/postgresqlroles: wait for databases to be provisioned (#63362)
Wait for databases to be provisioned before granting database-specific
roles to the operator access user.

## Test plan

Re-apply fixed
https://sourcegraph.slack.com/archives/C05E2LHPQLX/p1718850688397579,
indicating a race condition on database creation. Diff looks good:

```diff
@@ -1447,10 +1472,15 @@
             "path": "cloudrun/cloudrun-postgresqlroles-msp_iam-operator_access_service_account_table_grant",
             "uniqueId": "cloudrun-postgresqlroles-msp_iam-operator_access_service_account_table_grant"
           }
         },
         "database": "msp_iam",
+        "depends_on": [
+          "google_sql_database.postgresql-database-enterprise-portal",
+          "google_sql_database.postgresql-database-enterprise_portal",
+          "google_sql_database.postgresql-database-msp_iam"
+        ],
         "object_type": "table",
         "objects": [
         ],
         "privileges": [
           "SELECT"
```

## Changelog

- MSP Cloud SQL: Fix race condition between database creation and role
grants for the read-only operator access user
2024-06-20 07:43:14 -07:00
..
clouddeploy bazel: transcribe test ownership to bazel tags (#62664) 2024-05-16 15:51:16 +01:00
googlesecretsmanager bazel: transcribe test ownership to bazel tags (#62664) 2024-05-16 15:51:16 +01:00
internal fix/msp/postgresqlroles: wait for databases to be provisioned (#63362) 2024-06-20 07:43:14 -07:00
operationdocs chore/msp: blindly retry Notion page deletion (#63052) 2024-06-03 22:32:06 +00:00
spec chore/msp: document gRPC notes in spec docstrings (#63140) 2024-06-06 14:20:50 -07:00
stacks feat/msp: update handbook link in alerts dashboard, sort custom alerts first (#63089) 2024-06-05 09:09:22 -07:00
terraformcloud bazel: transcribe test ownership to bazel tags (#62664) 2024-05-16 15:51:16 +01:00
BUILD.bazel bazel: transcribe test ownership to bazel tags (#62664) 2024-05-16 15:51:16 +01:00
cdktf.go sg/msp: filter generated environments by category (#62131) 2024-04-24 09:44:16 -07:00
CODENOTIFY chore: update CODENOTIFY for Joe (#56647) 2023-09-14 16:09:33 +00:00
managedservicesplatform.go feat/msp: do not use tfvars file outside of deploy-type 'subscription' (#62704) 2024-05-16 09:43:47 -07:00