@venturekit/infra 0.0.0-dev.20260514025219 → 0.0.0-dev.20260515022321
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/dist/cdk/app-stack.d.ts +330 -0
- package/dist/cdk/app-stack.d.ts.map +1 -0
- package/dist/cdk/app-stack.js +875 -0
- package/dist/cdk/app-stack.js.map +1 -0
- package/dist/cdk/config-stack.d.ts +104 -0
- package/dist/cdk/config-stack.d.ts.map +1 -0
- package/dist/cdk/config-stack.js +161 -0
- package/dist/cdk/config-stack.js.map +1 -0
- package/dist/cdk/data-stack.d.ts +198 -0
- package/dist/cdk/data-stack.d.ts.map +1 -0
- package/dist/cdk/data-stack.js +511 -0
- package/dist/cdk/data-stack.js.map +1 -0
- package/dist/cdk/edge-stack.d.ts +91 -0
- package/dist/cdk/edge-stack.d.ts.map +1 -0
- package/dist/cdk/edge-stack.js +364 -0
- package/dist/cdk/edge-stack.js.map +1 -0
- package/dist/cdk/identity-stack.d.ts +98 -0
- package/dist/cdk/identity-stack.d.ts.map +1 -0
- package/dist/cdk/identity-stack.js +254 -0
- package/dist/cdk/identity-stack.js.map +1 -0
- package/dist/cdk/index.d.ts +16 -0
- package/dist/cdk/index.d.ts.map +1 -1
- package/dist/cdk/index.js +17 -0
- package/dist/cdk/index.js.map +1 -1
- package/dist/cdk/messaging-stack.d.ts +109 -0
- package/dist/cdk/messaging-stack.d.ts.map +1 -0
- package/dist/cdk/messaging-stack.js +320 -0
- package/dist/cdk/messaging-stack.js.map +1 -0
- package/dist/cdk/network-stack.d.ts +87 -0
- package/dist/cdk/network-stack.d.ts.map +1 -0
- package/dist/cdk/network-stack.js +265 -0
- package/dist/cdk/network-stack.js.map +1 -0
- package/dist/cdk/shared/cross-stack-refs.d.ts +278 -0
- package/dist/cdk/shared/cross-stack-refs.d.ts.map +1 -0
- package/dist/cdk/shared/cross-stack-refs.js +326 -0
- package/dist/cdk/shared/cross-stack-refs.js.map +1 -0
- package/dist/cdk/shared/lambda-helpers.d.ts +82 -0
- package/dist/cdk/shared/lambda-helpers.d.ts.map +1 -0
- package/dist/cdk/shared/lambda-helpers.js +201 -0
- package/dist/cdk/shared/lambda-helpers.js.map +1 -0
- package/dist/cdk/shared/ssm-keys.d.ts +460 -0
- package/dist/cdk/shared/ssm-keys.d.ts.map +1 -0
- package/dist/cdk/shared/ssm-keys.js +291 -0
- package/dist/cdk/shared/ssm-keys.js.map +1 -0
- package/dist/cdk/stack.d.ts +3 -11
- package/dist/cdk/stack.d.ts.map +1 -1
- package/dist/cdk/stack.js +184 -41
- package/dist/cdk/stack.js.map +1 -1
- package/package.json +2 -2
|
@@ -0,0 +1,460 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* SSM Parameter Store key builders for cross-stack references in the
|
|
3
|
+
* lifecycle-aligned multi-stack layout (network / data / identity /
|
|
4
|
+
* config / messaging / edge / app).
|
|
5
|
+
*
|
|
6
|
+
* # Why SSM and not `Fn::ImportValue`?
|
|
7
|
+
*
|
|
8
|
+
* CloudFormation cross-stack `Outputs` + `Fn::ImportValue` carries a
|
|
9
|
+
* hard lock: once a stack consumes another stack's export, the
|
|
10
|
+
* exporting stack cannot modify or delete that export until every
|
|
11
|
+
* consumer is removed. That makes the lower stable tiers (data,
|
|
12
|
+
* identity) unable to evolve their public surface without coordinated
|
|
13
|
+
* multi-stack redeploys — a single typo in a Cognito client id rename
|
|
14
|
+
* becomes a multi-week CFN choreography exercise.
|
|
15
|
+
*
|
|
16
|
+
* SSM Parameter Store has no such lock. The producer writes a
|
|
17
|
+
* `String` parameter; the consumer reads it via
|
|
18
|
+
* `StringParameter.valueForStringParameter(scope, name)` — a CFN
|
|
19
|
+
* dynamic reference (`{{resolve:ssm:…}}`) resolved at deploy time, not
|
|
20
|
+
* a stack-graph dependency. Producers can freely change values; the
|
|
21
|
+
* next consumer redeploy picks them up. Producers can be deleted with
|
|
22
|
+
* the parameter still in place; consumers fail loudly at synth/deploy
|
|
23
|
+
* with a clear "parameter not found" error rather than CFN's
|
|
24
|
+
* inscrutable "cannot modify export" rejection.
|
|
25
|
+
*
|
|
26
|
+
* # Naming convention
|
|
27
|
+
*
|
|
28
|
+
* /venturekit/<project>/<stage>/<category>/<resource-or-id>/<field>
|
|
29
|
+
*
|
|
30
|
+
* - Always rooted at `/venturekit/` so this module's parameters never
|
|
31
|
+
* collide with operator-managed parameters under `/<project>/...`.
|
|
32
|
+
* - `<project>` and `<stage>` produce a project- and env-isolated
|
|
33
|
+
* namespace so multiple projects in the same AWS account (or
|
|
34
|
+
* multiple stages of the same project) do not stomp on each other.
|
|
35
|
+
* - `<category>` mirrors the seven-tier split (`network`, `data`,
|
|
36
|
+
* `identity`, `config`, `messaging`, `edge`, `app`). Operators
|
|
37
|
+
* doing forensics can grep CloudTrail / `aws ssm describe-parameters
|
|
38
|
+
* --filters "Key=Name,Values=/venturekit/myapp/prod/data/"` to see
|
|
39
|
+
* exactly what one tier publishes.
|
|
40
|
+
* - `<resource-or-id>` is the user-declared `intent.id` for resources
|
|
41
|
+
* that come in arrays (databases, queues, auth pools, …); singletons
|
|
42
|
+
* collapse to a single key (`api/id` rather than `api/<id>/id`).
|
|
43
|
+
* - `<field>` is what specific attribute of the resource is stored
|
|
44
|
+
* (`endpoint`, `arn`, `secret-arn`, …). Always kebab-case.
|
|
45
|
+
*
|
|
46
|
+
* Lists (e.g. multi-AZ subnet IDs) are stored as comma-joined strings
|
|
47
|
+
* because SSM `StringList` parameters cannot be referenced via the
|
|
48
|
+
* `{{resolve:ssm:…}}` dynamic reference — only `String` and
|
|
49
|
+
* `SecureString`. The consumer-side helper `readSsmStringList` in
|
|
50
|
+
* `cross-stack-refs.ts` does the splitting.
|
|
51
|
+
*
|
|
52
|
+
* # Why a single source of truth?
|
|
53
|
+
*
|
|
54
|
+
* Every key is constructed via a function in this file — no inline
|
|
55
|
+
* string templating in stack code anywhere else. That gives us:
|
|
56
|
+
*
|
|
57
|
+
* - One place to change the convention (e.g. add a `version/` prefix
|
|
58
|
+
* for forward-compatible breaking changes to a key shape).
|
|
59
|
+
* - One place to grep when investigating "why is this Lambda
|
|
60
|
+
* reading parameter X?".
|
|
61
|
+
* - Test coverage that pins every key shape so a typo in a
|
|
62
|
+
* producer's write doesn't silently de-sync from a consumer's
|
|
63
|
+
* read three months later.
|
|
64
|
+
*
|
|
65
|
+
* # Stability guarantee
|
|
66
|
+
*
|
|
67
|
+
* The function names AND their return values are part of the
|
|
68
|
+
* cross-stack contract. Renaming a function = breaking every
|
|
69
|
+
* deployed stack that already wrote a parameter at the old name.
|
|
70
|
+
* Treat changes here the same way you'd treat changes to a public
|
|
71
|
+
* API: add new keys, deprecate old ones, never silently rename.
|
|
72
|
+
*/
|
|
73
|
+
/**
|
|
74
|
+
* VPC ID for the project's primary VPC. Singleton — VentureKit
|
|
75
|
+
* provisions exactly one VPC per stack-set even when multiple
|
|
76
|
+
* databases / caches / Lambdas live in it.
|
|
77
|
+
*/
|
|
78
|
+
export declare const networkKeys: {
|
|
79
|
+
readonly vpcId: (project: string, stage: string) => string;
|
|
80
|
+
/**
|
|
81
|
+
* Comma-joined private subnet IDs (subnets where Lambdas + RDS run).
|
|
82
|
+
* Stored as a single comma-joined `String` because CFN's
|
|
83
|
+
* `{{resolve:ssm:…}}` dynamic reference does not support
|
|
84
|
+
* `StringList` parameters. `readSsmStringList` in
|
|
85
|
+
* `cross-stack-refs.ts` re-splits on the consumer side.
|
|
86
|
+
*/
|
|
87
|
+
readonly privateSubnetIds: (project: string, stage: string) => string;
|
|
88
|
+
/** Comma-joined public subnet IDs — used by NAT GW + (future) ALB. */
|
|
89
|
+
readonly publicSubnetIds: (project: string, stage: string) => string;
|
|
90
|
+
/**
|
|
91
|
+
* Comma-joined isolated subnet IDs (no internet egress). RDS
|
|
92
|
+
* instances live here when `dataSafety='strict'` is in effect on
|
|
93
|
+
* presets that ship isolated subnets (medium+).
|
|
94
|
+
*/
|
|
95
|
+
readonly isolatedSubnetIds: (project: string, stage: string) => string;
|
|
96
|
+
/**
|
|
97
|
+
* Comma-joined Availability Zone names matching the order of the
|
|
98
|
+
* subnet ID lists above. CDK's `Vpc.fromVpcAttributes` requires
|
|
99
|
+
* per-subnet AZ to fully reconstruct the VPC abstraction in a
|
|
100
|
+
* consumer stack, and CFN won't infer it from the subnet IDs alone.
|
|
101
|
+
*/
|
|
102
|
+
readonly availabilityZones: (project: string, stage: string) => string;
|
|
103
|
+
};
|
|
104
|
+
export declare const dataKeys: {
|
|
105
|
+
/**
|
|
106
|
+
* RDS endpoint hostname (no port, no protocol). The port is fixed
|
|
107
|
+
* per engine type, so consumers reconstruct the JDBC URL from
|
|
108
|
+
* `engine` + `endpoint` + `port` rather than storing the assembled
|
|
109
|
+
* URL — keeps reads composable and avoids re-writing on engine
|
|
110
|
+
* upgrades.
|
|
111
|
+
*/
|
|
112
|
+
readonly rdsEndpoint: (project: string, stage: string, dbId: string) => string;
|
|
113
|
+
/** RDS port. Stored explicitly so consumers don't hardcode 5432/3306. */
|
|
114
|
+
readonly rdsPort: (project: string, stage: string, dbId: string) => string;
|
|
115
|
+
/**
|
|
116
|
+
* ARN of the Secrets Manager secret holding `{username,password}`
|
|
117
|
+
* for the master credentials. Lambdas in the app stack receive this
|
|
118
|
+
* via env var and call `GetSecretValue` at startup; a future
|
|
119
|
+
* `connect()` helper will resolve the cached secret to a Postgres
|
|
120
|
+
* URL transparently.
|
|
121
|
+
*/
|
|
122
|
+
readonly rdsSecretArn: (project: string, stage: string, dbId: string) => string;
|
|
123
|
+
/**
|
|
124
|
+
* Security Group ID for the RDS instance. The app stack creates its
|
|
125
|
+
* own Lambda SG locally and `rdsSg.connections.allowFrom(lambdaSg,
|
|
126
|
+
* port)`. CFN emits the resulting `AWS::EC2::SecurityGroupIngress`
|
|
127
|
+
* in the app stack — on app-stack delete, ingress is removed,
|
|
128
|
+
* RDS SG unaffected (see plan §6.1).
|
|
129
|
+
*/
|
|
130
|
+
readonly rdsSecurityGroupId: (project: string, stage: string, dbId: string) => string;
|
|
131
|
+
/** Database name created on the RDS instance (the actual SQL database). */
|
|
132
|
+
readonly rdsDatabaseName: (project: string, stage: string, dbId: string) => string;
|
|
133
|
+
/** S3 bucket name for an operator-declared storage intent. */
|
|
134
|
+
readonly bucketName: (project: string, stage: string, bucketId: string) => string;
|
|
135
|
+
/** S3 bucket ARN — for IAM scoping on the consumer side. */
|
|
136
|
+
readonly bucketArn: (project: string, stage: string, bucketId: string) => string;
|
|
137
|
+
/**
|
|
138
|
+
* CloudFront distribution domain (e.g. `d111111abcdef8.cloudfront.net`)
|
|
139
|
+
* — only present when the storage intent set `cdn: true`. Consumers
|
|
140
|
+
* inject as `STORAGE_<ID>_CDN_URL` for presign-then-rewrite flows.
|
|
141
|
+
*/
|
|
142
|
+
readonly cdnDomain: (project: string, stage: string, bucketId: string) => string;
|
|
143
|
+
/** DynamoDB table name (user-declared on free-tier OR rate-limits). */
|
|
144
|
+
readonly dynamoTableName: (project: string, stage: string, tableId: string) => string;
|
|
145
|
+
/** DynamoDB table ARN — for IAM scoping. */
|
|
146
|
+
readonly dynamoTableArn: (project: string, stage: string, tableId: string) => string;
|
|
147
|
+
/**
|
|
148
|
+
* ARN of the internal HMAC secret used by VentureKit auth/runtime
|
|
149
|
+
* for state-token signing. Singleton per project+stage.
|
|
150
|
+
*/
|
|
151
|
+
readonly internalHmacSecretArn: (project: string, stage: string) => string;
|
|
152
|
+
/**
|
|
153
|
+
* ElastiCache primary endpoint when a `caches` intent is declared.
|
|
154
|
+
* Currently keyed by `cacheId`; only one is typical but the keyed
|
|
155
|
+
* form keeps us forward-compatible with multi-cache setups.
|
|
156
|
+
*/
|
|
157
|
+
readonly cacheEndpoint: (project: string, stage: string, cacheId: string) => string;
|
|
158
|
+
/** ElastiCache port. Same rationale as `rdsPort`. */
|
|
159
|
+
readonly cachePort: (project: string, stage: string, cacheId: string) => string;
|
|
160
|
+
/** ElastiCache security group ID — for the cross-stack ingress pattern. */
|
|
161
|
+
readonly cacheSecurityGroupId: (project: string, stage: string, cacheId: string) => string;
|
|
162
|
+
};
|
|
163
|
+
export declare const identityKeys: {
|
|
164
|
+
/** Cognito User Pool ID for an `auth` intent. */
|
|
165
|
+
readonly userPoolId: (project: string, stage: string, authId: string) => string;
|
|
166
|
+
/** Cognito User Pool ARN — for IAM scoping `cognito-idp:Admin*` actions. */
|
|
167
|
+
readonly userPoolArn: (project: string, stage: string, authId: string) => string;
|
|
168
|
+
/**
|
|
169
|
+
* Primary App Client ID. Multi-client support exists in the intent
|
|
170
|
+
* (auth.clients[]) but the dominant case is a single SPA client;
|
|
171
|
+
* we publish the primary id as a singleton key to avoid the
|
|
172
|
+
* multi-client SSM tax for the common case. Future per-client keys
|
|
173
|
+
* can extend this convention with `${authId}/clients/${clientName}`.
|
|
174
|
+
*/
|
|
175
|
+
readonly primaryClientId: (project: string, stage: string, authId: string) => string;
|
|
176
|
+
/**
|
|
177
|
+
* ARN of the Secrets Manager secret holding `{clientId, clientSecret}`
|
|
178
|
+
* for a federated identity provider (Google / Facebook / Apple).
|
|
179
|
+
* Created by `createAuth` for every entry in
|
|
180
|
+
* `AuthIntent.federated[]`; the app stack reads it to enable
|
|
181
|
+
* `signInAsFederatedUser` server-side.
|
|
182
|
+
*/
|
|
183
|
+
readonly federatedSecretArn: (project: string, stage: string, authId: string, provider: string) => string;
|
|
184
|
+
};
|
|
185
|
+
export declare const configKeys: {
|
|
186
|
+
/**
|
|
187
|
+
* ARN of an operator-declared `secrets` intent (Secrets Manager
|
|
188
|
+
* variant). The SSM-store variant of the intent is *itself* an SSM
|
|
189
|
+
* parameter and doesn't need a separate cross-stack key — the app
|
|
190
|
+
* stack reads the original parameter directly.
|
|
191
|
+
*/
|
|
192
|
+
readonly secretArn: (project: string, stage: string, secretId: string) => string;
|
|
193
|
+
/**
|
|
194
|
+
* SNS events topic ARN for a `notify` intent. The bounce-handler
|
|
195
|
+
* Lambda in the app stack subscribes to this; operators may attach
|
|
196
|
+
* additional console-level subscribers for paging / observability.
|
|
197
|
+
*/
|
|
198
|
+
readonly notifyEventsTopicArn: (project: string, stage: string, notifyId: string) => string;
|
|
199
|
+
/** Notify SES configuration set name — needed by the dispatcher Lambda. */
|
|
200
|
+
readonly notifyConfigurationSetName: (project: string, stage: string, notifyId: string) => string;
|
|
201
|
+
/**
|
|
202
|
+
* ARN of the WhatsApp Cloud API token Secret (only present when the
|
|
203
|
+
* notify intent declares `'whatsapp'` in `channels`). Operator
|
|
204
|
+
* pastes the Meta token into the secret value after first deploy.
|
|
205
|
+
*/
|
|
206
|
+
readonly whatsappTokenSecretArn: (project: string, stage: string, notifyId: string) => string;
|
|
207
|
+
};
|
|
208
|
+
export declare const messagingKeys: {
|
|
209
|
+
/** SQS queue ARN for a user-declared `queues` intent. */
|
|
210
|
+
readonly queueArn: (project: string, stage: string, queueId: string) => string;
|
|
211
|
+
/** SQS queue URL — what `SendMessage` callers actually need. */
|
|
212
|
+
readonly queueUrl: (project: string, stage: string, queueId: string) => string;
|
|
213
|
+
/** Dead-letter queue ARN — for IAM scoping + ESM redrive policy. */
|
|
214
|
+
readonly queueDlqArn: (project: string, stage: string, queueId: string) => string;
|
|
215
|
+
/**
|
|
216
|
+
* Visibility timeout (seconds, integer) of the primary work queue.
|
|
217
|
+
* App-stack synth uses this to validate the
|
|
218
|
+
* `queue.visibilityTimeout >= 6 * fn.timeout` invariant when the
|
|
219
|
+
* queue lives in another stack and CDK can't infer it (plan §6.3).
|
|
220
|
+
*/
|
|
221
|
+
readonly queueVisibilityTimeoutSeconds: (project: string, stage: string, queueId: string) => string;
|
|
222
|
+
/** Notify dispatcher DLQ ARN — created by the messaging tier. */
|
|
223
|
+
readonly notifyDispatcherDlqArn: (project: string, stage: string, notifyId: string) => string;
|
|
224
|
+
/** Notify bounce-handler DLQ ARN. */
|
|
225
|
+
readonly notifyBounceDlqArn: (project: string, stage: string, notifyId: string) => string;
|
|
226
|
+
};
|
|
227
|
+
export declare const edgeKeys: {
|
|
228
|
+
/** API Gateway HttpApi ID. Singleton per stack-set. */
|
|
229
|
+
readonly apiId: (project: string, stage: string) => string;
|
|
230
|
+
/**
|
|
231
|
+
* API Gateway public endpoint (`https://<id>.execute-api.<region>.amazonaws.com`).
|
|
232
|
+
* Convenience for monitoring + smoke tests; consumers that need
|
|
233
|
+
* just the ID use `apiId` above.
|
|
234
|
+
*/
|
|
235
|
+
readonly apiEndpoint: (project: string, stage: string) => string;
|
|
236
|
+
/**
|
|
237
|
+
* Custom domain hostname (e.g. `api.example.com`). Only present
|
|
238
|
+
* when a `domains` intent is declared. Consumers that build OAuth
|
|
239
|
+
* redirect URIs / webhook URLs should prefer this when set.
|
|
240
|
+
*/
|
|
241
|
+
readonly apiCustomDomain: (project: string, stage: string) => string;
|
|
242
|
+
/**
|
|
243
|
+
* API Gateway default stage name. Always `'$default'` for HttpApi
|
|
244
|
+
* but published explicitly so future support for named stages
|
|
245
|
+
* (canary, blue/green) doesn't require a key-shape change.
|
|
246
|
+
*/
|
|
247
|
+
readonly apiDefaultStageName: (project: string, stage: string) => string;
|
|
248
|
+
/**
|
|
249
|
+
* CloudFront distribution domain (`*.cloudfront.net` or the
|
|
250
|
+
* configured alias) fronting a storage-tier S3 bucket. Only
|
|
251
|
+
* present when the `storage` intent declares `cdn: true`. App-
|
|
252
|
+
* stack code injects this into Lambda env vars as
|
|
253
|
+
* `STORAGE_<UPPER_ID>_CDN_URL` and `VENTURE_STORAGE_CDN_URL`
|
|
254
|
+
* (primary intent), so application code can build public URLs
|
|
255
|
+
* without an SDK lookup.
|
|
256
|
+
*/
|
|
257
|
+
readonly storageCdnDomain: (project: string, stage: string, storageId: string) => string;
|
|
258
|
+
/**
|
|
259
|
+
* CloudFront distribution ID for a storage-tier bucket CDN. App-
|
|
260
|
+
* stack handlers that need to issue invalidations
|
|
261
|
+
* (`CreateInvalidation` after a content rewrite) read this.
|
|
262
|
+
*/
|
|
263
|
+
readonly storageCdnDistributionId: (project: string, stage: string, storageId: string) => string;
|
|
264
|
+
};
|
|
265
|
+
/**
|
|
266
|
+
* Single namespace exporting every category for ergonomic imports
|
|
267
|
+
* elsewhere: `import { ssmKeys } from './shared/ssm-keys.js';
|
|
268
|
+
* ssmKeys.data.rdsEndpoint(project, stage, 'main')`.
|
|
269
|
+
*/
|
|
270
|
+
export declare const ssmKeys: {
|
|
271
|
+
readonly network: {
|
|
272
|
+
readonly vpcId: (project: string, stage: string) => string;
|
|
273
|
+
/**
|
|
274
|
+
* Comma-joined private subnet IDs (subnets where Lambdas + RDS run).
|
|
275
|
+
* Stored as a single comma-joined `String` because CFN's
|
|
276
|
+
* `{{resolve:ssm:…}}` dynamic reference does not support
|
|
277
|
+
* `StringList` parameters. `readSsmStringList` in
|
|
278
|
+
* `cross-stack-refs.ts` re-splits on the consumer side.
|
|
279
|
+
*/
|
|
280
|
+
readonly privateSubnetIds: (project: string, stage: string) => string;
|
|
281
|
+
/** Comma-joined public subnet IDs — used by NAT GW + (future) ALB. */
|
|
282
|
+
readonly publicSubnetIds: (project: string, stage: string) => string;
|
|
283
|
+
/**
|
|
284
|
+
* Comma-joined isolated subnet IDs (no internet egress). RDS
|
|
285
|
+
* instances live here when `dataSafety='strict'` is in effect on
|
|
286
|
+
* presets that ship isolated subnets (medium+).
|
|
287
|
+
*/
|
|
288
|
+
readonly isolatedSubnetIds: (project: string, stage: string) => string;
|
|
289
|
+
/**
|
|
290
|
+
* Comma-joined Availability Zone names matching the order of the
|
|
291
|
+
* subnet ID lists above. CDK's `Vpc.fromVpcAttributes` requires
|
|
292
|
+
* per-subnet AZ to fully reconstruct the VPC abstraction in a
|
|
293
|
+
* consumer stack, and CFN won't infer it from the subnet IDs alone.
|
|
294
|
+
*/
|
|
295
|
+
readonly availabilityZones: (project: string, stage: string) => string;
|
|
296
|
+
};
|
|
297
|
+
readonly data: {
|
|
298
|
+
/**
|
|
299
|
+
* RDS endpoint hostname (no port, no protocol). The port is fixed
|
|
300
|
+
* per engine type, so consumers reconstruct the JDBC URL from
|
|
301
|
+
* `engine` + `endpoint` + `port` rather than storing the assembled
|
|
302
|
+
* URL — keeps reads composable and avoids re-writing on engine
|
|
303
|
+
* upgrades.
|
|
304
|
+
*/
|
|
305
|
+
readonly rdsEndpoint: (project: string, stage: string, dbId: string) => string;
|
|
306
|
+
/** RDS port. Stored explicitly so consumers don't hardcode 5432/3306. */
|
|
307
|
+
readonly rdsPort: (project: string, stage: string, dbId: string) => string;
|
|
308
|
+
/**
|
|
309
|
+
* ARN of the Secrets Manager secret holding `{username,password}`
|
|
310
|
+
* for the master credentials. Lambdas in the app stack receive this
|
|
311
|
+
* via env var and call `GetSecretValue` at startup; a future
|
|
312
|
+
* `connect()` helper will resolve the cached secret to a Postgres
|
|
313
|
+
* URL transparently.
|
|
314
|
+
*/
|
|
315
|
+
readonly rdsSecretArn: (project: string, stage: string, dbId: string) => string;
|
|
316
|
+
/**
|
|
317
|
+
* Security Group ID for the RDS instance. The app stack creates its
|
|
318
|
+
* own Lambda SG locally and `rdsSg.connections.allowFrom(lambdaSg,
|
|
319
|
+
* port)`. CFN emits the resulting `AWS::EC2::SecurityGroupIngress`
|
|
320
|
+
* in the app stack — on app-stack delete, ingress is removed,
|
|
321
|
+
* RDS SG unaffected (see plan §6.1).
|
|
322
|
+
*/
|
|
323
|
+
readonly rdsSecurityGroupId: (project: string, stage: string, dbId: string) => string;
|
|
324
|
+
/** Database name created on the RDS instance (the actual SQL database). */
|
|
325
|
+
readonly rdsDatabaseName: (project: string, stage: string, dbId: string) => string;
|
|
326
|
+
/** S3 bucket name for an operator-declared storage intent. */
|
|
327
|
+
readonly bucketName: (project: string, stage: string, bucketId: string) => string;
|
|
328
|
+
/** S3 bucket ARN — for IAM scoping on the consumer side. */
|
|
329
|
+
readonly bucketArn: (project: string, stage: string, bucketId: string) => string;
|
|
330
|
+
/**
|
|
331
|
+
* CloudFront distribution domain (e.g. `d111111abcdef8.cloudfront.net`)
|
|
332
|
+
* — only present when the storage intent set `cdn: true`. Consumers
|
|
333
|
+
* inject as `STORAGE_<ID>_CDN_URL` for presign-then-rewrite flows.
|
|
334
|
+
*/
|
|
335
|
+
readonly cdnDomain: (project: string, stage: string, bucketId: string) => string;
|
|
336
|
+
/** DynamoDB table name (user-declared on free-tier OR rate-limits). */
|
|
337
|
+
readonly dynamoTableName: (project: string, stage: string, tableId: string) => string;
|
|
338
|
+
/** DynamoDB table ARN — for IAM scoping. */
|
|
339
|
+
readonly dynamoTableArn: (project: string, stage: string, tableId: string) => string;
|
|
340
|
+
/**
|
|
341
|
+
* ARN of the internal HMAC secret used by VentureKit auth/runtime
|
|
342
|
+
* for state-token signing. Singleton per project+stage.
|
|
343
|
+
*/
|
|
344
|
+
readonly internalHmacSecretArn: (project: string, stage: string) => string;
|
|
345
|
+
/**
|
|
346
|
+
* ElastiCache primary endpoint when a `caches` intent is declared.
|
|
347
|
+
* Currently keyed by `cacheId`; only one is typical but the keyed
|
|
348
|
+
* form keeps us forward-compatible with multi-cache setups.
|
|
349
|
+
*/
|
|
350
|
+
readonly cacheEndpoint: (project: string, stage: string, cacheId: string) => string;
|
|
351
|
+
/** ElastiCache port. Same rationale as `rdsPort`. */
|
|
352
|
+
readonly cachePort: (project: string, stage: string, cacheId: string) => string;
|
|
353
|
+
/** ElastiCache security group ID — for the cross-stack ingress pattern. */
|
|
354
|
+
readonly cacheSecurityGroupId: (project: string, stage: string, cacheId: string) => string;
|
|
355
|
+
};
|
|
356
|
+
readonly identity: {
|
|
357
|
+
/** Cognito User Pool ID for an `auth` intent. */
|
|
358
|
+
readonly userPoolId: (project: string, stage: string, authId: string) => string;
|
|
359
|
+
/** Cognito User Pool ARN — for IAM scoping `cognito-idp:Admin*` actions. */
|
|
360
|
+
readonly userPoolArn: (project: string, stage: string, authId: string) => string;
|
|
361
|
+
/**
|
|
362
|
+
* Primary App Client ID. Multi-client support exists in the intent
|
|
363
|
+
* (auth.clients[]) but the dominant case is a single SPA client;
|
|
364
|
+
* we publish the primary id as a singleton key to avoid the
|
|
365
|
+
* multi-client SSM tax for the common case. Future per-client keys
|
|
366
|
+
* can extend this convention with `${authId}/clients/${clientName}`.
|
|
367
|
+
*/
|
|
368
|
+
readonly primaryClientId: (project: string, stage: string, authId: string) => string;
|
|
369
|
+
/**
|
|
370
|
+
* ARN of the Secrets Manager secret holding `{clientId, clientSecret}`
|
|
371
|
+
* for a federated identity provider (Google / Facebook / Apple).
|
|
372
|
+
* Created by `createAuth` for every entry in
|
|
373
|
+
* `AuthIntent.federated[]`; the app stack reads it to enable
|
|
374
|
+
* `signInAsFederatedUser` server-side.
|
|
375
|
+
*/
|
|
376
|
+
readonly federatedSecretArn: (project: string, stage: string, authId: string, provider: string) => string;
|
|
377
|
+
};
|
|
378
|
+
readonly config: {
|
|
379
|
+
/**
|
|
380
|
+
* ARN of an operator-declared `secrets` intent (Secrets Manager
|
|
381
|
+
* variant). The SSM-store variant of the intent is *itself* an SSM
|
|
382
|
+
* parameter and doesn't need a separate cross-stack key — the app
|
|
383
|
+
* stack reads the original parameter directly.
|
|
384
|
+
*/
|
|
385
|
+
readonly secretArn: (project: string, stage: string, secretId: string) => string;
|
|
386
|
+
/**
|
|
387
|
+
* SNS events topic ARN for a `notify` intent. The bounce-handler
|
|
388
|
+
* Lambda in the app stack subscribes to this; operators may attach
|
|
389
|
+
* additional console-level subscribers for paging / observability.
|
|
390
|
+
*/
|
|
391
|
+
readonly notifyEventsTopicArn: (project: string, stage: string, notifyId: string) => string;
|
|
392
|
+
/** Notify SES configuration set name — needed by the dispatcher Lambda. */
|
|
393
|
+
readonly notifyConfigurationSetName: (project: string, stage: string, notifyId: string) => string;
|
|
394
|
+
/**
|
|
395
|
+
* ARN of the WhatsApp Cloud API token Secret (only present when the
|
|
396
|
+
* notify intent declares `'whatsapp'` in `channels`). Operator
|
|
397
|
+
* pastes the Meta token into the secret value after first deploy.
|
|
398
|
+
*/
|
|
399
|
+
readonly whatsappTokenSecretArn: (project: string, stage: string, notifyId: string) => string;
|
|
400
|
+
};
|
|
401
|
+
readonly messaging: {
|
|
402
|
+
/** SQS queue ARN for a user-declared `queues` intent. */
|
|
403
|
+
readonly queueArn: (project: string, stage: string, queueId: string) => string;
|
|
404
|
+
/** SQS queue URL — what `SendMessage` callers actually need. */
|
|
405
|
+
readonly queueUrl: (project: string, stage: string, queueId: string) => string;
|
|
406
|
+
/** Dead-letter queue ARN — for IAM scoping + ESM redrive policy. */
|
|
407
|
+
readonly queueDlqArn: (project: string, stage: string, queueId: string) => string;
|
|
408
|
+
/**
|
|
409
|
+
* Visibility timeout (seconds, integer) of the primary work queue.
|
|
410
|
+
* App-stack synth uses this to validate the
|
|
411
|
+
* `queue.visibilityTimeout >= 6 * fn.timeout` invariant when the
|
|
412
|
+
* queue lives in another stack and CDK can't infer it (plan §6.3).
|
|
413
|
+
*/
|
|
414
|
+
readonly queueVisibilityTimeoutSeconds: (project: string, stage: string, queueId: string) => string;
|
|
415
|
+
/** Notify dispatcher DLQ ARN — created by the messaging tier. */
|
|
416
|
+
readonly notifyDispatcherDlqArn: (project: string, stage: string, notifyId: string) => string;
|
|
417
|
+
/** Notify bounce-handler DLQ ARN. */
|
|
418
|
+
readonly notifyBounceDlqArn: (project: string, stage: string, notifyId: string) => string;
|
|
419
|
+
};
|
|
420
|
+
readonly edge: {
|
|
421
|
+
/** API Gateway HttpApi ID. Singleton per stack-set. */
|
|
422
|
+
readonly apiId: (project: string, stage: string) => string;
|
|
423
|
+
/**
|
|
424
|
+
* API Gateway public endpoint (`https://<id>.execute-api.<region>.amazonaws.com`).
|
|
425
|
+
* Convenience for monitoring + smoke tests; consumers that need
|
|
426
|
+
* just the ID use `apiId` above.
|
|
427
|
+
*/
|
|
428
|
+
readonly apiEndpoint: (project: string, stage: string) => string;
|
|
429
|
+
/**
|
|
430
|
+
* Custom domain hostname (e.g. `api.example.com`). Only present
|
|
431
|
+
* when a `domains` intent is declared. Consumers that build OAuth
|
|
432
|
+
* redirect URIs / webhook URLs should prefer this when set.
|
|
433
|
+
*/
|
|
434
|
+
readonly apiCustomDomain: (project: string, stage: string) => string;
|
|
435
|
+
/**
|
|
436
|
+
* API Gateway default stage name. Always `'$default'` for HttpApi
|
|
437
|
+
* but published explicitly so future support for named stages
|
|
438
|
+
* (canary, blue/green) doesn't require a key-shape change.
|
|
439
|
+
*/
|
|
440
|
+
readonly apiDefaultStageName: (project: string, stage: string) => string;
|
|
441
|
+
/**
|
|
442
|
+
* CloudFront distribution domain (`*.cloudfront.net` or the
|
|
443
|
+
* configured alias) fronting a storage-tier S3 bucket. Only
|
|
444
|
+
* present when the `storage` intent declares `cdn: true`. App-
|
|
445
|
+
* stack code injects this into Lambda env vars as
|
|
446
|
+
* `STORAGE_<UPPER_ID>_CDN_URL` and `VENTURE_STORAGE_CDN_URL`
|
|
447
|
+
* (primary intent), so application code can build public URLs
|
|
448
|
+
* without an SDK lookup.
|
|
449
|
+
*/
|
|
450
|
+
readonly storageCdnDomain: (project: string, stage: string, storageId: string) => string;
|
|
451
|
+
/**
|
|
452
|
+
* CloudFront distribution ID for a storage-tier bucket CDN. App-
|
|
453
|
+
* stack handlers that need to issue invalidations
|
|
454
|
+
* (`CreateInvalidation` after a content rewrite) read this.
|
|
455
|
+
*/
|
|
456
|
+
readonly storageCdnDistributionId: (project: string, stage: string, storageId: string) => string;
|
|
457
|
+
};
|
|
458
|
+
};
|
|
459
|
+
export type SsmKeys = typeof ssmKeys;
|
|
460
|
+
//# sourceMappingURL=ssm-keys.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ssm-keys.d.ts","sourceRoot":"","sources":["../../../src/cdk/shared/ssm-keys.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuEG;AAYH;;;;GAIG;AACH,eAAO,MAAM,WAAW;8BACL,MAAM,SAAS,MAAM,KAAG,MAAM;IAG/C;;;;;;OAMG;yCACyB,MAAM,SAAS,MAAM,KAAG,MAAM;IAG1D,sEAAsE;wC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