@caelo-cms/provisioning 0.3.8 → 0.3.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +2 -2
- package/stacks/gcp-firebase/index.ts +14 -8
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@caelo-cms/provisioning",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.9",
|
|
4
4
|
"private": false,
|
|
5
5
|
"license": "MPL-2.0",
|
|
6
6
|
"description": "Pulumi-driven provisioning for Caelo CMS — `bunx @caelo-cms/provisioning --provider <self-hosted|gcp|aws|azure>` brings up a TLS-served install with Postgres + storage + secrets manager + the admin + the API gateway.",
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"prepublishOnly": "tsc -b --force && tsc --project stacks/gcp/tsconfig.json && tsc --project stacks/gcp-firebase/tsconfig.json"
|
|
39
39
|
},
|
|
40
40
|
"dependencies": {
|
|
41
|
-
"@caelo-cms/shared": "^0.3.
|
|
41
|
+
"@caelo-cms/shared": "^0.3.9",
|
|
42
42
|
"@clack/prompts": "1.3.0",
|
|
43
43
|
"@pulumi/aws": "^7",
|
|
44
44
|
"@pulumi/awsx": "^3",
|
|
@@ -464,12 +464,18 @@ const adminSvc = cloudRunService({
|
|
|
464
464
|
// v0.3.1 — Firebase Hosting uses a Google-managed service identity
|
|
465
465
|
// to proxy traffic via `rewrites` to Cloud Run. Grant it
|
|
466
466
|
// `roles/run.invoker` on the gateway so /api/** requests succeed.
|
|
467
|
-
//
|
|
468
|
-
//
|
|
469
|
-
// the
|
|
470
|
-
//
|
|
471
|
-
|
|
472
|
-
|
|
467
|
+
//
|
|
468
|
+
// v0.3.9 — The Firebase Hosting service identity SA is created
|
|
469
|
+
// on-demand, not when the API is merely enabled. Constructing the
|
|
470
|
+
// email by name and granting IAM to it fails with "Service account
|
|
471
|
+
// ... does not exist". `gcp.projects.ServiceIdentity` triggers
|
|
472
|
+
// creation and returns the email; we depend on it so the binding
|
|
473
|
+
// always sees the SA. Same pattern the gcp stack uses for IAP.
|
|
474
|
+
const firebaseHostingIdentity = new gcp.projects.ServiceIdentity(
|
|
475
|
+
`${namePrefix}-firebasehosting-identity`,
|
|
476
|
+
{ project, service: "firebasehosting.googleapis.com" },
|
|
477
|
+
opts,
|
|
478
|
+
);
|
|
473
479
|
|
|
474
480
|
new gcp.cloudrun.IamMember(
|
|
475
481
|
`${namePrefix}-gateway-firebase-invoker`,
|
|
@@ -478,9 +484,9 @@ new gcp.cloudrun.IamMember(
|
|
|
478
484
|
project,
|
|
479
485
|
service: gatewaySvc.name,
|
|
480
486
|
role: "roles/run.invoker",
|
|
481
|
-
member:
|
|
487
|
+
member: pulumi.interpolate`serviceAccount:${firebaseHostingIdentity.email}`,
|
|
482
488
|
},
|
|
483
|
-
opts,
|
|
489
|
+
{ ...opts, dependsOn: [firebaseHostingIdentity] },
|
|
484
490
|
);
|
|
485
491
|
|
|
486
492
|
// =========================================================================
|