stacktape 3.5.8 → 3.6.0-beta.0
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/.tsconfig.bun-build.json +1 -0
- package/ai-docs/cli-ref/aws-profile-create.md +22 -0
- package/ai-docs/cli-ref/aws-profile-delete.md +22 -0
- package/ai-docs/cli-ref/aws-profile-list.md +20 -0
- package/ai-docs/cli-ref/aws-profile-update.md +22 -0
- package/ai-docs/cli-ref/bastion-session.md +29 -0
- package/ai-docs/cli-ref/bastion-tunnel.md +30 -0
- package/ai-docs/cli-ref/bucket-sync.md +30 -0
- package/ai-docs/cli-ref/cf-module-update.md +26 -0
- package/ai-docs/cli-ref/cf-rollback.md +28 -0
- package/ai-docs/cli-ref/codebuild-deploy.md +34 -0
- package/ai-docs/cli-ref/compile-template.md +25 -0
- package/ai-docs/cli-ref/container-session.md +30 -0
- package/ai-docs/cli-ref/debug-alarms.md +28 -0
- package/ai-docs/cli-ref/debug-aws-sdk.md +33 -0
- package/ai-docs/cli-ref/debug-container-exec.md +36 -0
- package/ai-docs/cli-ref/debug-dynamodb.md +35 -0
- package/ai-docs/cli-ref/debug-logs.md +34 -0
- package/ai-docs/cli-ref/debug-metrics.md +33 -0
- package/ai-docs/cli-ref/debug-opensearch.md +35 -0
- package/ai-docs/cli-ref/debug-redis.md +36 -0
- package/ai-docs/cli-ref/debug-sql.md +35 -0
- package/ai-docs/cli-ref/defaults-configure.md +29 -0
- package/ai-docs/cli-ref/defaults-list.md +20 -0
- package/ai-docs/cli-ref/delete.md +24 -0
- package/ai-docs/cli-ref/deploy.md +25 -0
- package/ai-docs/cli-ref/deployment-script-run.md +28 -0
- package/ai-docs/cli-ref/dev-stop.md +26 -0
- package/ai-docs/cli-ref/dev.md +45 -0
- package/ai-docs/cli-ref/domain-add.md +26 -0
- package/ai-docs/cli-ref/help.md +18 -0
- package/ai-docs/cli-ref/info-operations.md +22 -0
- package/ai-docs/cli-ref/info-stack.md +30 -0
- package/ai-docs/cli-ref/info-stacks.md +26 -0
- package/ai-docs/cli-ref/info-whoami.md +22 -0
- package/ai-docs/cli-ref/init.md +30 -0
- package/ai-docs/cli-ref/login.md +20 -0
- package/ai-docs/cli-ref/logout.md +18 -0
- package/ai-docs/cli-ref/mcp-add.md +22 -0
- package/ai-docs/cli-ref/mcp.md +20 -0
- package/ai-docs/cli-ref/org-create.md +24 -0
- package/ai-docs/cli-ref/org-delete.md +24 -0
- package/ai-docs/cli-ref/org-list.md +22 -0
- package/ai-docs/cli-ref/package-workloads.md +25 -0
- package/ai-docs/cli-ref/param-get.md +26 -0
- package/ai-docs/cli-ref/preview-changes.md +23 -0
- package/ai-docs/cli-ref/project-create.md +22 -0
- package/ai-docs/cli-ref/projects-list.md +22 -0
- package/ai-docs/cli-ref/rollback.md +28 -0
- package/ai-docs/cli-ref/script-run.md +29 -0
- package/ai-docs/cli-ref/secret-create.md +28 -0
- package/ai-docs/cli-ref/secret-delete.md +26 -0
- package/ai-docs/cli-ref/secret-get.md +26 -0
- package/ai-docs/cli-ref/upgrade.md +20 -0
- package/ai-docs/cli-ref/version.md +18 -0
- package/ai-docs/concept/connecting-resources.md +369 -0
- package/ai-docs/concept/directives.md +371 -0
- package/ai-docs/concept/extending-cloudformation.md +315 -0
- package/ai-docs/concept/overrides-and-transforms.md +352 -0
- package/ai-docs/concept/stages-and-environments.md +347 -0
- package/ai-docs/concept/typescript-config.md +447 -0
- package/ai-docs/concept/yaml-config.md +338 -0
- package/ai-docs/config-ref/_root.md +142 -0
- package/ai-docs/config-ref/application-load-balancer.md +1109 -0
- package/ai-docs/config-ref/astro-web.md +115 -0
- package/ai-docs/config-ref/aws-cdk-construct.md +68 -0
- package/ai-docs/config-ref/bastion.md +93 -0
- package/ai-docs/config-ref/batch-job.md +179 -0
- package/ai-docs/config-ref/bucket.md +348 -0
- package/ai-docs/config-ref/cdn.md +496 -0
- package/ai-docs/config-ref/custom-resource.md +80 -0
- package/ai-docs/config-ref/deployment-script.md +79 -0
- package/ai-docs/config-ref/dynamo-db-table.md +202 -0
- package/ai-docs/config-ref/edge-lambda-function.md +87 -0
- package/ai-docs/config-ref/efs-filesystem.md +72 -0
- package/ai-docs/config-ref/event-bus.md +63 -0
- package/ai-docs/config-ref/function.md +409 -0
- package/ai-docs/config-ref/hosting-bucket.md +171 -0
- package/ai-docs/config-ref/http-api-gateway.md +149 -0
- package/ai-docs/config-ref/http-endpoint.md +92 -0
- package/ai-docs/config-ref/kinesis-stream.md +97 -0
- package/ai-docs/config-ref/mongo-db-atlas-cluster.md +254 -0
- package/ai-docs/config-ref/multi-container-workload.md +399 -0
- package/ai-docs/config-ref/network-load-balancer.md +118 -0
- package/ai-docs/config-ref/nextjs-web.md +147 -0
- package/ai-docs/config-ref/nuxt-web.md +81 -0
- package/ai-docs/config-ref/open-search.md +206 -0
- package/ai-docs/config-ref/private-service.md +75 -0
- package/ai-docs/config-ref/redis-cluster.md +223 -0
- package/ai-docs/config-ref/relational-database.md +525 -0
- package/ai-docs/config-ref/remix-web.md +74 -0
- package/ai-docs/config-ref/sns-topic.md +69 -0
- package/ai-docs/config-ref/solidstart-web.md +75 -0
- package/ai-docs/config-ref/sqs-queue-not-empty.md +405 -0
- package/ai-docs/config-ref/sqs-queue.md +232 -0
- package/ai-docs/config-ref/state-machine.md +235 -0
- package/ai-docs/config-ref/sveltekit-web.md +81 -0
- package/ai-docs/config-ref/tanstack-web.md +75 -0
- package/ai-docs/config-ref/upstash-redis.md +59 -0
- package/ai-docs/config-ref/user-auth-pool.md +876 -0
- package/ai-docs/config-ref/web-app-firewall.md +212 -0
- package/ai-docs/config-ref/web-service.md +178 -0
- package/ai-docs/config-ref/worker-service.md +41 -0
- package/ai-docs/getting-started/console.md +232 -0
- package/ai-docs/getting-started/deployment.md +434 -0
- package/ai-docs/getting-started/dev-mode.md +118 -0
- package/ai-docs/getting-started/how-it-works.md +119 -0
- package/ai-docs/getting-started/intro.md +157 -0
- package/ai-docs/getting-started/using-with-ai.md +228 -0
- package/ai-docs/getting-started/workflow.md +197 -0
- package/ai-docs/index.json +1514 -0
- package/ai-docs/recipe/background-jobs.md +183 -0
- package/ai-docs/recipe/database-migrations.md +240 -0
- package/ai-docs/recipe/graphql-api.md +211 -0
- package/ai-docs/recipe/monorepo-setup.md +183 -0
- package/ai-docs/recipe/nextjs-full-stack.md +188 -0
- package/ai-docs/recipe/rest-api-with-database.md +156 -0
- package/ai-docs/recipe/scheduled-tasks.md +186 -0
- package/ai-docs/recipe/static-website.md +241 -0
- package/ai-docs/troubleshooting/cloudformation-stack-states.md +189 -0
- package/bin/stacktape.js +0 -12
- package/package.json +1 -1
- package/plain.d.ts +309 -54
|
@@ -0,0 +1,525 @@
|
|
|
1
|
+
---
|
|
2
|
+
docType: config-ref
|
|
3
|
+
title: Relational Database
|
|
4
|
+
resourceType: relational-database
|
|
5
|
+
tags:
|
|
6
|
+
- relational-database
|
|
7
|
+
- rds
|
|
8
|
+
- postgres
|
|
9
|
+
- postgresql
|
|
10
|
+
- mysql
|
|
11
|
+
- database
|
|
12
|
+
- db
|
|
13
|
+
- sql
|
|
14
|
+
- aurora
|
|
15
|
+
source: types/stacktape-config/relational-databases.d.ts
|
|
16
|
+
priority: 1
|
|
17
|
+
---
|
|
18
|
+
|
|
19
|
+
# Relational Database
|
|
20
|
+
|
|
21
|
+
A fully managed relational (SQL) database resource.
|
|
22
|
+
|
|
23
|
+
Supports various database engines like PostgreSQL, MySQL, and MariaDB, with features like clustering and high availability.
|
|
24
|
+
|
|
25
|
+
Resource type: `relational-database`
|
|
26
|
+
|
|
27
|
+
## TypeScript Definition
|
|
28
|
+
|
|
29
|
+
```typescript
|
|
30
|
+
/**
|
|
31
|
+
* #### A fully managed relational (SQL) database resource.
|
|
32
|
+
*
|
|
33
|
+
* ---
|
|
34
|
+
*
|
|
35
|
+
* Supports various database engines like PostgreSQL, MySQL, and MariaDB, with features like clustering and high availability.
|
|
36
|
+
*/
|
|
37
|
+
interface RelationalDatabase {
|
|
38
|
+
type: 'relational-database';
|
|
39
|
+
properties: RelationalDatabaseProps;
|
|
40
|
+
overrides?: ResourceOverrides;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
interface RelationalDatabaseProps {
|
|
44
|
+
/**
|
|
45
|
+
* #### Master user credentials (username and password).
|
|
46
|
+
*
|
|
47
|
+
* ---
|
|
48
|
+
*
|
|
49
|
+
* Included in the auto-generated connection string. Store the password in a Stacktape secret
|
|
50
|
+
* to avoid exposing it in your config file.
|
|
51
|
+
*/
|
|
52
|
+
credentials: RelationalDatabaseCredentials;
|
|
53
|
+
/**
|
|
54
|
+
* #### Database engine: what type of database and how it runs.
|
|
55
|
+
*
|
|
56
|
+
* ---
|
|
57
|
+
*
|
|
58
|
+
* - **RDS** (`postgres`, `mysql`, `mariadb`, etc.): Single-node, fixed-size. Simple and predictable pricing.
|
|
59
|
+
* - **Aurora** (`aurora-postgresql`, `aurora-mysql`): High-performance clustered DB with auto-failover.
|
|
60
|
+
* Up to 5x faster than standard MySQL / 3x faster than standard PostgreSQL.
|
|
61
|
+
* - **Aurora Serverless v2** (`aurora-postgresql-serverless-v2`): Auto-scales from 0.5 to 128 ACUs.
|
|
62
|
+
* **Recommended for most new projects** — pay only for what you use.
|
|
63
|
+
*/
|
|
64
|
+
engine: AuroraServerlessEngine | RdsEngine | AuroraEngine | AuroraServerlessV2Engine;
|
|
65
|
+
/**
|
|
66
|
+
* #### Who can connect to this database (network-level access control).
|
|
67
|
+
*
|
|
68
|
+
* ---
|
|
69
|
+
*
|
|
70
|
+
* Default is `internet` — anyone with credentials can connect (fine for development).
|
|
71
|
+
* For production, use `scoping-workloads-in-vpc` to restrict access to only resources
|
|
72
|
+
* that list this database in their `connectTo`.
|
|
73
|
+
*/
|
|
74
|
+
accessibility?: DatabaseAccessibility;
|
|
75
|
+
/**
|
|
76
|
+
* #### Prevent accidental deletion of the database. Must be disabled before deleting.
|
|
77
|
+
*
|
|
78
|
+
* @default false
|
|
79
|
+
*/
|
|
80
|
+
deletionProtection?: boolean;
|
|
81
|
+
/**
|
|
82
|
+
* #### Days to keep automated daily backups (0-35). Set to 0 to disable (RDS only).
|
|
83
|
+
*
|
|
84
|
+
* @default 1
|
|
85
|
+
*/
|
|
86
|
+
automatedBackupRetentionDays?: number;
|
|
87
|
+
/**
|
|
88
|
+
* #### When maintenance (patching, upgrades) happens. Format: `Sun:02:00-Sun:04:00` (UTC).
|
|
89
|
+
*
|
|
90
|
+
* ---
|
|
91
|
+
*
|
|
92
|
+
* The database may be briefly unavailable during this window.
|
|
93
|
+
* Use multi-AZ or Aurora to minimize downtime.
|
|
94
|
+
*/
|
|
95
|
+
preferredMaintenanceWindow?: string;
|
|
96
|
+
/**
|
|
97
|
+
* #### Alarms for this database (merged with global alarms from the Stacktape Console).
|
|
98
|
+
*/
|
|
99
|
+
alarms?: RelationalDatabaseAlarm[];
|
|
100
|
+
/**
|
|
101
|
+
* #### Global alarm names to exclude from this database.
|
|
102
|
+
*/
|
|
103
|
+
disabledGlobalAlarms?: string[];
|
|
104
|
+
/**
|
|
105
|
+
* #### Database logging (connections, slow queries, errors).
|
|
106
|
+
*
|
|
107
|
+
* ---
|
|
108
|
+
*
|
|
109
|
+
* Logs are sent to CloudWatch and retained for 90 days by default.
|
|
110
|
+
* Available log types vary by engine.
|
|
111
|
+
*/
|
|
112
|
+
logging?: RelationalDatabaseLogging;
|
|
113
|
+
/**
|
|
114
|
+
* #### Dev mode: runs locally in Docker by default. Set `remote: true` to use the deployed database.
|
|
115
|
+
*/
|
|
116
|
+
dev?: DevModeConfig;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
interface SharedEngineProperties {
|
|
120
|
+
/**
|
|
121
|
+
* #### Engine version (e.g., `16.6` for PostgreSQL, `8.0.36` for MySQL).
|
|
122
|
+
*/
|
|
123
|
+
version: string;
|
|
124
|
+
/**
|
|
125
|
+
* #### Skip automatic minor version upgrades (e.g., 16.4 → 16.5).
|
|
126
|
+
*
|
|
127
|
+
* @default false
|
|
128
|
+
*/
|
|
129
|
+
disableAutoMinorVersionUpgrade?: boolean;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
/**
|
|
133
|
+
* #### Aurora: high-performance clustered database with auto-failover.
|
|
134
|
+
*
|
|
135
|
+
* ---
|
|
136
|
+
*
|
|
137
|
+
* Up to 5x faster than MySQL, 3x faster than PostgreSQL. Data is replicated across 3 AZs
|
|
138
|
+
* automatically. If the primary instance fails, a read replica is promoted in seconds.
|
|
139
|
+
*/
|
|
140
|
+
interface AuroraEngine {
|
|
141
|
+
type: 'aurora-mysql' | 'aurora-postgresql';
|
|
142
|
+
properties: AuroraEngineProperties;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
/**
|
|
146
|
+
* #### Aurora Serverless v1: auto-scaling database that can pause when idle.
|
|
147
|
+
*
|
|
148
|
+
* ---
|
|
149
|
+
*
|
|
150
|
+
* Scales compute capacity automatically and pauses during inactivity (you only pay for storage).
|
|
151
|
+
*
|
|
152
|
+
* > **For new projects, use Aurora Serverless v2 instead** — it has faster scaling and more granular capacity control.
|
|
153
|
+
*/
|
|
154
|
+
interface AuroraServerlessEngine {
|
|
155
|
+
type: 'aurora-mysql-serverless' | 'aurora-postgresql-serverless';
|
|
156
|
+
properties?: AuroraServerlessEngineProperties;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
/**
|
|
160
|
+
* #### Aurora Serverless v2: recommended for most new projects.
|
|
161
|
+
*
|
|
162
|
+
* ---
|
|
163
|
+
*
|
|
164
|
+
* Scales instantly from 0.5 to 128 ACUs in 0.5-ACU increments (~1 ACU ≈ 2 GB RAM).
|
|
165
|
+
* You pay only for the capacity used, making it cost-effective for variable workloads.
|
|
166
|
+
*/
|
|
167
|
+
interface AuroraServerlessV2Engine {
|
|
168
|
+
type: 'aurora-mysql-serverless-v2' | 'aurora-postgresql-serverless-v2';
|
|
169
|
+
properties: AuroraServerlessV2EngineProperties;
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
/**
|
|
173
|
+
* #### Standard RDS: single-instance database with predictable pricing.
|
|
174
|
+
*
|
|
175
|
+
* ---
|
|
176
|
+
*
|
|
177
|
+
* Choose a fixed instance size and pay hourly. AWS handles patching, backups, and recovery.
|
|
178
|
+
* For high availability, enable `multiAz` on the primary instance.
|
|
179
|
+
*/
|
|
180
|
+
interface RdsEngine {
|
|
181
|
+
type:
|
|
182
|
+
| 'postgres'
|
|
183
|
+
| 'mariadb'
|
|
184
|
+
| 'mysql'
|
|
185
|
+
| 'oracle-ee'
|
|
186
|
+
| 'oracle-se2'
|
|
187
|
+
| 'sqlserver-ee'
|
|
188
|
+
| 'sqlserver-ex'
|
|
189
|
+
| 'sqlserver-se'
|
|
190
|
+
| 'sqlserver-web';
|
|
191
|
+
properties: RdsEngineProperties;
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
interface RdsEnginePrimaryInstance {
|
|
195
|
+
/**
|
|
196
|
+
* #### Instance size (e.g., `db.t4g.micro`, `db.r6g.large`).
|
|
197
|
+
*
|
|
198
|
+
* ---
|
|
199
|
+
*
|
|
200
|
+
* Determines CPU, memory, and network capacity. Quick guide:
|
|
201
|
+
* - **db.t4g.micro** (~$12/mo): Dev/testing, 2 vCPU, 1 GB RAM
|
|
202
|
+
* - **db.t4g.medium** (~$50/mo): Small production, 2 vCPU, 4 GB RAM
|
|
203
|
+
* - **db.r6g.large** (~$180/mo): Production, 2 vCPU, 16 GB RAM
|
|
204
|
+
*
|
|
205
|
+
* `t` family instances are burstable (fine for low/variable load). Use `r` family for steady workloads.
|
|
206
|
+
*/
|
|
207
|
+
instanceSize: string;
|
|
208
|
+
/**
|
|
209
|
+
* #### Create a standby replica in another availability zone for automatic failover.
|
|
210
|
+
*
|
|
211
|
+
* ---
|
|
212
|
+
*
|
|
213
|
+
* If the primary goes down, traffic fails over to the standby automatically.
|
|
214
|
+
* Also reduces downtime during maintenance. Doubles the instance cost.
|
|
215
|
+
*/
|
|
216
|
+
multiAz?: boolean;
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
interface RelationalDatabaseCredentials {
|
|
220
|
+
/**
|
|
221
|
+
* #### Admin username. Avoid special characters: `[]{}(),;?*=!@`.
|
|
222
|
+
*
|
|
223
|
+
* ---
|
|
224
|
+
*
|
|
225
|
+
* > **Warning:** Changing this after creation **replaces the database and deletes all data**.
|
|
226
|
+
*
|
|
227
|
+
* @default "db_master_user"
|
|
228
|
+
*/
|
|
229
|
+
masterUserName?: string;
|
|
230
|
+
/**
|
|
231
|
+
* #### Admin password. Avoid special characters: `[]{}(),;?*=!@`.
|
|
232
|
+
*
|
|
233
|
+
* ---
|
|
234
|
+
*
|
|
235
|
+
* Use `$Secret()` to store it securely instead of hardcoding:
|
|
236
|
+
* ```yaml
|
|
237
|
+
* masterUserPassword: $Secret('database.password')
|
|
238
|
+
* ```
|
|
239
|
+
*/
|
|
240
|
+
masterUserPassword: string;
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
interface DatabaseAccessibility {
|
|
244
|
+
/**
|
|
245
|
+
* #### Controls who can connect to your database.
|
|
246
|
+
*
|
|
247
|
+
* ---
|
|
248
|
+
*
|
|
249
|
+
* - **`internet`** (default): Anyone with the credentials can connect. Simplest setup, great for development.
|
|
250
|
+
* The database is still protected by username/password.
|
|
251
|
+
* - **`vpc`**: Only your app's resources (and anything in the same VPC) can connect.
|
|
252
|
+
* You can also whitelist specific IPs (e.g., your office) using `whitelistedIps`.
|
|
253
|
+
* - **`scoping-workloads-in-vpc`**: Most restrictive. Only resources that explicitly list this
|
|
254
|
+
* database in their `connectTo` can reach it. Best for production.
|
|
255
|
+
* - **`whitelisted-ips-only`**: Only the IP addresses you list in `whitelistedIps` can connect.
|
|
256
|
+
*
|
|
257
|
+
* > Aurora Serverless engines only support `vpc` or `scoping-workloads-in-vpc`.
|
|
258
|
+
*
|
|
259
|
+
* @default "internet"
|
|
260
|
+
*/
|
|
261
|
+
accessibilityMode: 'internet' | 'vpc' | 'scoping-workloads-in-vpc' | 'whitelisted-ips-only';
|
|
262
|
+
/**
|
|
263
|
+
* #### Remove the database's public IP entirely (VPC-only access).
|
|
264
|
+
*
|
|
265
|
+
* ---
|
|
266
|
+
*
|
|
267
|
+
* > For Aurora, this can only be set at creation time and cannot be changed later.
|
|
268
|
+
*/
|
|
269
|
+
forceDisablePublicIp?: boolean;
|
|
270
|
+
/**
|
|
271
|
+
* #### IP addresses or CIDR ranges allowed to connect (e.g., `203.0.113.50/32`).
|
|
272
|
+
*
|
|
273
|
+
* ---
|
|
274
|
+
*
|
|
275
|
+
* - In `vpc`/`scoping-workloads-in-vpc`: adds external IPs on top of VPC access (e.g., your office).
|
|
276
|
+
* - In `whitelisted-ips-only`: only these IPs can connect.
|
|
277
|
+
* - No effect in `internet` mode.
|
|
278
|
+
*/
|
|
279
|
+
whitelistedIps?: string[];
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
// eslint-disable-next-line @typescript-eslint/no-empty-interface
|
|
283
|
+
interface RdsEngineReadReplica extends RdsEnginePrimaryInstance {}
|
|
284
|
+
|
|
285
|
+
interface RdsEngineProperties extends SharedEngineProperties {
|
|
286
|
+
/**
|
|
287
|
+
* #### Name of the database created on initialization. For Oracle, this is the SID. Not applicable to SQL Server.
|
|
288
|
+
*/
|
|
289
|
+
dbName?: string;
|
|
290
|
+
/**
|
|
291
|
+
* #### Port the database listens on. Defaults: PostgreSQL 5432, MySQL/MariaDB 3306, Oracle 1521, SQL Server 1433.
|
|
292
|
+
*/
|
|
293
|
+
port?: number;
|
|
294
|
+
/**
|
|
295
|
+
* #### Storage configuration. Auto-scales up when free space is low.
|
|
296
|
+
*/
|
|
297
|
+
storage?: RdsEngineStorage;
|
|
298
|
+
/**
|
|
299
|
+
* #### The primary (writer) instance. Handles all write operations.
|
|
300
|
+
*/
|
|
301
|
+
primaryInstance: RdsEnginePrimaryInstance;
|
|
302
|
+
/**
|
|
303
|
+
* #### Read replicas to offload read traffic from the primary instance.
|
|
304
|
+
*
|
|
305
|
+
* ---
|
|
306
|
+
*
|
|
307
|
+
* Each replica gets its own endpoint. Data is replicated asynchronously from the primary.
|
|
308
|
+
*/
|
|
309
|
+
readReplicas?: RdsEngineReadReplica[];
|
|
310
|
+
}
|
|
311
|
+
|
|
312
|
+
interface RelationalDatabaseLogging extends LogForwardingBase {
|
|
313
|
+
/**
|
|
314
|
+
* #### Disable CloudWatch logging entirely.
|
|
315
|
+
*
|
|
316
|
+
* @default false
|
|
317
|
+
*/
|
|
318
|
+
disabled?: boolean;
|
|
319
|
+
/**
|
|
320
|
+
* #### How many days to keep logs.
|
|
321
|
+
*
|
|
322
|
+
* @default 90
|
|
323
|
+
*/
|
|
324
|
+
retentionDays?: 1 | 3 | 5 | 7 | 14 | 30 | 60 | 90 | 120 | 150 | 180 | 365 | 400 | 545 | 731 | 1827 | 3653;
|
|
325
|
+
/**
|
|
326
|
+
* #### Which log types to export. Depends on engine:
|
|
327
|
+
*
|
|
328
|
+
* - **PostgreSQL**: `postgresql`
|
|
329
|
+
* - **MySQL/MariaDB**: `audit`, `error`, `general`, `slowquery`
|
|
330
|
+
* - **Oracle**: `alert`, `audit`, `listener`, `trace`
|
|
331
|
+
* - **SQL Server**: `agent`, `error`
|
|
332
|
+
*/
|
|
333
|
+
logTypes?: string[];
|
|
334
|
+
/**
|
|
335
|
+
* #### Fine-grained logging settings (PostgreSQL: slow queries, statements; MySQL: audit events).
|
|
336
|
+
*/
|
|
337
|
+
engineSpecificOptions?: PostgresLoggingOptions | MysqlLoggingOptions;
|
|
338
|
+
}
|
|
339
|
+
|
|
340
|
+
interface PostgresLoggingOptions {
|
|
341
|
+
/**
|
|
342
|
+
* #### Log new client connections.
|
|
343
|
+
* @default false
|
|
344
|
+
*/
|
|
345
|
+
log_connections?: boolean;
|
|
346
|
+
/**
|
|
347
|
+
* #### Log client disconnections.
|
|
348
|
+
* @default false
|
|
349
|
+
*/
|
|
350
|
+
log_disconnections?: boolean;
|
|
351
|
+
/**
|
|
352
|
+
* #### Log sessions waiting for locks (helps find lock contention issues).
|
|
353
|
+
* @default false
|
|
354
|
+
*/
|
|
355
|
+
log_lock_waits?: boolean;
|
|
356
|
+
/**
|
|
357
|
+
* #### Log queries slower than this (ms). `-1` = disabled, `0` = log all. Great for finding slow queries.
|
|
358
|
+
* @default 10000
|
|
359
|
+
*/
|
|
360
|
+
log_min_duration_statement?: number;
|
|
361
|
+
/**
|
|
362
|
+
* #### Which SQL statements to log: `none`, `ddl` (CREATE/ALTER), `mod` (ddl + INSERT/UPDATE/DELETE), `all`.
|
|
363
|
+
* @default "ddl"
|
|
364
|
+
*/
|
|
365
|
+
log_statement?: 'none' | 'ddl' | 'mod' | 'all';
|
|
366
|
+
}
|
|
367
|
+
|
|
368
|
+
interface MysqlLoggingOptions {
|
|
369
|
+
/**
|
|
370
|
+
* #### What to record in the audit log: connections, all queries, DDL only, DML only, etc.
|
|
371
|
+
* @default ["QUERY_DDL"]
|
|
372
|
+
*/
|
|
373
|
+
server_audit_events?: ('CONNECT' | 'QUERY' | 'QUERY_DDL' | 'QUERY_DML' | 'QUERY_DML_NO_SELECT' | 'QUERY_DCL')[];
|
|
374
|
+
/**
|
|
375
|
+
* #### Queries slower than this (seconds) are logged as "slow queries". `-1` to disable.
|
|
376
|
+
* @default 10
|
|
377
|
+
*/
|
|
378
|
+
long_query_time?: number;
|
|
379
|
+
}
|
|
380
|
+
|
|
381
|
+
interface RdsEngineStorage {
|
|
382
|
+
/**
|
|
383
|
+
* #### Initial storage in GB. Auto-scales up when free space is low.
|
|
384
|
+
* @default 20
|
|
385
|
+
*/
|
|
386
|
+
initialSize?: number;
|
|
387
|
+
/**
|
|
388
|
+
* #### Max storage in GB. The database won't auto-scale beyond this.
|
|
389
|
+
* @default 200
|
|
390
|
+
*/
|
|
391
|
+
maxSize?: number;
|
|
392
|
+
}
|
|
393
|
+
|
|
394
|
+
interface AuroraServerlessEngineProperties extends Omit<SharedEngineProperties, 'version'> {
|
|
395
|
+
/**
|
|
396
|
+
* #### Engine version. Usually managed by AWS automatically for serverless v1.
|
|
397
|
+
*/
|
|
398
|
+
version?: string;
|
|
399
|
+
/**
|
|
400
|
+
* #### Name of the initial database.
|
|
401
|
+
* @default "defdb"
|
|
402
|
+
*/
|
|
403
|
+
dbName?: string;
|
|
404
|
+
/**
|
|
405
|
+
* #### Minimum ACUs to scale down to (~1 ACU ≈ 2 GB RAM).
|
|
406
|
+
*
|
|
407
|
+
* ---
|
|
408
|
+
*
|
|
409
|
+
* MySQL: 1-256 (powers of 2). PostgreSQL: 2-256 (powers of 2).
|
|
410
|
+
*
|
|
411
|
+
* @default 2
|
|
412
|
+
*/
|
|
413
|
+
minCapacity?: number;
|
|
414
|
+
/**
|
|
415
|
+
* #### Maximum ACUs to scale up to.
|
|
416
|
+
*
|
|
417
|
+
* ---
|
|
418
|
+
*
|
|
419
|
+
* MySQL: 1-256 (powers of 2). PostgreSQL: 2-256 (powers of 2).
|
|
420
|
+
*
|
|
421
|
+
* @default 4
|
|
422
|
+
*/
|
|
423
|
+
maxCapacity?: number;
|
|
424
|
+
/**
|
|
425
|
+
* #### Pause the database after this many seconds of inactivity (no connections).
|
|
426
|
+
*
|
|
427
|
+
* ---
|
|
428
|
+
*
|
|
429
|
+
* When paused, you only pay for storage. Range: 300 (5 min) - 86400 (24 hr).
|
|
430
|
+
* Omit to never pause.
|
|
431
|
+
*/
|
|
432
|
+
pauseAfterSeconds?: number;
|
|
433
|
+
}
|
|
434
|
+
|
|
435
|
+
interface AuroraServerlessV2EngineProperties extends SharedEngineProperties {
|
|
436
|
+
/**
|
|
437
|
+
* #### Name of the initial database.
|
|
438
|
+
* @default "defdb"
|
|
439
|
+
*/
|
|
440
|
+
dbName?: string;
|
|
441
|
+
/**
|
|
442
|
+
* #### Minimum ACUs (0.5-128 in 0.5 increments). ~1 ACU ≈ 2 GB RAM.
|
|
443
|
+
*
|
|
444
|
+
* ---
|
|
445
|
+
*
|
|
446
|
+
* Set low (0.5) for dev/staging to minimize cost. The database scales up instantly under load.
|
|
447
|
+
*
|
|
448
|
+
* @default 0.5
|
|
449
|
+
*/
|
|
450
|
+
minCapacity?: number;
|
|
451
|
+
/**
|
|
452
|
+
* #### Maximum ACUs (0.5-128 in 0.5 increments). Caps your scaling and cost.
|
|
453
|
+
*
|
|
454
|
+
* @default 10
|
|
455
|
+
*/
|
|
456
|
+
maxCapacity?: number;
|
|
457
|
+
/**
|
|
458
|
+
* #### Number of reader instances in the Aurora Serverless v2 cluster.
|
|
459
|
+
*
|
|
460
|
+
* ---
|
|
461
|
+
*
|
|
462
|
+
* Aurora Serverless v2 always has one writer instance. This value adds additional readers
|
|
463
|
+
* (`0` means writer only, `2` means writer + 2 readers).
|
|
464
|
+
*
|
|
465
|
+
* @default 0
|
|
466
|
+
*/
|
|
467
|
+
serverlessReadersCount?: number;
|
|
468
|
+
}
|
|
469
|
+
|
|
470
|
+
interface AuroraEngineProperties extends SharedEngineProperties {
|
|
471
|
+
/**
|
|
472
|
+
* #### Name of the initial database.
|
|
473
|
+
* @default "defdb"
|
|
474
|
+
*/
|
|
475
|
+
dbName?: string;
|
|
476
|
+
/**
|
|
477
|
+
* #### Port. Defaults: aurora-mysql 3306, aurora-postgresql 5432.
|
|
478
|
+
*/
|
|
479
|
+
port?: number;
|
|
480
|
+
/**
|
|
481
|
+
* #### Cluster instances. First = primary (writer), rest = read replicas.
|
|
482
|
+
*
|
|
483
|
+
* ---
|
|
484
|
+
*
|
|
485
|
+
* Reads are load-balanced across all instances. If the primary fails,
|
|
486
|
+
* a replica is automatically promoted (usually within 30 seconds).
|
|
487
|
+
*/
|
|
488
|
+
instances: AuroraEngineInstance[];
|
|
489
|
+
}
|
|
490
|
+
|
|
491
|
+
interface AuroraEngineInstance {
|
|
492
|
+
/**
|
|
493
|
+
* #### Instance size (e.g., `db.t4g.medium`, `db.r6g.large`).
|
|
494
|
+
*
|
|
495
|
+
* ---
|
|
496
|
+
*
|
|
497
|
+
* `t` family = burstable (dev/low-traffic). `r` family = memory-optimized (production).
|
|
498
|
+
*/
|
|
499
|
+
instanceSize: string;
|
|
500
|
+
}
|
|
501
|
+
|
|
502
|
+
type RelationalDatabaseReferencableParam =
|
|
503
|
+
| 'host'
|
|
504
|
+
| 'hosts'
|
|
505
|
+
| 'connectionString'
|
|
506
|
+
| 'jdbcConnectionString'
|
|
507
|
+
| 'port'
|
|
508
|
+
| 'dbName'
|
|
509
|
+
| 'readerHost'
|
|
510
|
+
| 'readerPort'
|
|
511
|
+
| 'readerConnectionString'
|
|
512
|
+
| 'readerJdbcConnectionString'
|
|
513
|
+
| 'readReplicaHosts'
|
|
514
|
+
| 'readReplicaConnectionStrings'
|
|
515
|
+
| 'readReplicaJdbcConnectionStrings'
|
|
516
|
+
| `readReplica${number}Port`;
|
|
517
|
+
|
|
518
|
+
type NormalizedSQLEngine = Exclude<
|
|
519
|
+
StpRelationalDatabase['engine']['type'],
|
|
520
|
+
| 'aurora-postgresql-serverless'
|
|
521
|
+
| 'aurora-mysql-serverless'
|
|
522
|
+
| 'aurora-postgresql-serverless-v2'
|
|
523
|
+
| 'aurora-mysql-serverless-v2'
|
|
524
|
+
>;
|
|
525
|
+
```
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
---
|
|
2
|
+
docType: config-ref
|
|
3
|
+
title: Remix Web
|
|
4
|
+
resourceType: remix-web
|
|
5
|
+
tags:
|
|
6
|
+
- remix-web
|
|
7
|
+
- remix
|
|
8
|
+
source: types/stacktape-config/remix-web.d.ts
|
|
9
|
+
priority: 1
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
# Remix Web
|
|
13
|
+
|
|
14
|
+
Deploy a Remix SSR app with Lambda for server rendering, S3 for static assets, and CloudFront CDN.
|
|
15
|
+
|
|
16
|
+
Resource type: `remix-web`
|
|
17
|
+
|
|
18
|
+
## TypeScript Definition
|
|
19
|
+
|
|
20
|
+
```typescript
|
|
21
|
+
/**
|
|
22
|
+
* #### Deploy a Remix SSR app with Lambda for server rendering, S3 for static assets, and CloudFront CDN.
|
|
23
|
+
*/
|
|
24
|
+
interface RemixWeb {
|
|
25
|
+
type: 'remix-web';
|
|
26
|
+
properties: RemixWebProps;
|
|
27
|
+
overrides?: ResourceOverrides;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
interface RemixWebProps extends ResourceAccessProps {
|
|
31
|
+
/**
|
|
32
|
+
* #### Directory containing your `vite.config.ts` (or `remix.config.js`). For monorepos, point to the Remix workspace.
|
|
33
|
+
*
|
|
34
|
+
* @default "."
|
|
35
|
+
*/
|
|
36
|
+
appDirectory?: string;
|
|
37
|
+
/**
|
|
38
|
+
* #### Override the default `remix vite:build` command.
|
|
39
|
+
*/
|
|
40
|
+
buildCommand?: string;
|
|
41
|
+
/**
|
|
42
|
+
* #### Environment variables for the SSR function. Use `$ResourceParam()` or `$Secret()` for dynamic values.
|
|
43
|
+
*/
|
|
44
|
+
environment?: EnvironmentVar[];
|
|
45
|
+
/**
|
|
46
|
+
* #### Attach custom domains with auto-managed DNS records and TLS certificates.
|
|
47
|
+
*
|
|
48
|
+
* ---
|
|
49
|
+
*
|
|
50
|
+
* **Prerequisite:** A Route 53 hosted zone for your domain must exist in your AWS account.
|
|
51
|
+
*/
|
|
52
|
+
customDomains?: DomainConfiguration[];
|
|
53
|
+
/**
|
|
54
|
+
* #### Customize the SSR Lambda function (memory, timeout, VPC, logging).
|
|
55
|
+
*/
|
|
56
|
+
serverLambda?: SsrWebServerLambdaConfig;
|
|
57
|
+
/**
|
|
58
|
+
* #### Name of a `web-app-firewall` resource to protect this app. Firewall `scope` must be `cdn`.
|
|
59
|
+
*/
|
|
60
|
+
useFirewall?: string;
|
|
61
|
+
/**
|
|
62
|
+
* #### Dev server config for `stacktape dev`. Defaults to `remix vite:dev`.
|
|
63
|
+
*/
|
|
64
|
+
dev?: SsrWebDevConfig;
|
|
65
|
+
/**
|
|
66
|
+
* #### Set custom headers (e.g., `Cache-Control`) for static files matching a pattern.
|
|
67
|
+
*/
|
|
68
|
+
fileOptions?: DirectoryUploadFilter[];
|
|
69
|
+
/**
|
|
70
|
+
* #### CDN cache controls for SSR routes and specific path patterns.
|
|
71
|
+
*/
|
|
72
|
+
cdn?: SsrWebCdnConfig;
|
|
73
|
+
}
|
|
74
|
+
```
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
---
|
|
2
|
+
docType: config-ref
|
|
3
|
+
title: Sns Topic
|
|
4
|
+
resourceType: sns-topic
|
|
5
|
+
tags:
|
|
6
|
+
- sns-topic
|
|
7
|
+
- sns
|
|
8
|
+
- notification
|
|
9
|
+
- pubsub
|
|
10
|
+
source: types/stacktape-config/sns-topic.d.ts
|
|
11
|
+
priority: 1
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
# Sns Topic
|
|
15
|
+
|
|
16
|
+
Pub/sub messaging: publish once, deliver to many subscribers (Lambda, SQS, email, SMS, HTTP).
|
|
17
|
+
|
|
18
|
+
Serverless, pay-per-message. Use when one event needs to trigger multiple actions — e.g., order placed
|
|
19
|
+
triggers email confirmation + inventory update + analytics. Subscribers are configured on the subscriber side.
|
|
20
|
+
|
|
21
|
+
Resource type: `sns-topic`
|
|
22
|
+
|
|
23
|
+
## TypeScript Definition
|
|
24
|
+
|
|
25
|
+
```typescript
|
|
26
|
+
/**
|
|
27
|
+
* #### Pub/sub messaging: publish once, deliver to many subscribers (Lambda, SQS, email, SMS, HTTP).
|
|
28
|
+
*
|
|
29
|
+
* ---
|
|
30
|
+
*
|
|
31
|
+
* Serverless, pay-per-message. Use when one event needs to trigger multiple actions — e.g., order placed
|
|
32
|
+
* triggers email confirmation + inventory update + analytics. Subscribers are configured on the subscriber side.
|
|
33
|
+
*/
|
|
34
|
+
interface SnsTopic {
|
|
35
|
+
type: 'sns-topic';
|
|
36
|
+
properties?: SnsTopicProps;
|
|
37
|
+
overrides?: ResourceOverrides;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
interface SnsTopicProps {
|
|
41
|
+
/**
|
|
42
|
+
* #### Sender name shown on SMS messages sent to subscribers (e.g., "MyApp"). Max 11 characters.
|
|
43
|
+
*/
|
|
44
|
+
smsDisplayName?: string;
|
|
45
|
+
/**
|
|
46
|
+
* #### Guarantees message order and exactly-once delivery. Use for financial transactions, sequential workflows.
|
|
47
|
+
*
|
|
48
|
+
* ---
|
|
49
|
+
*
|
|
50
|
+
* FIFO topics can only deliver to FIFO SQS queues (not email, SMS, or HTTP).
|
|
51
|
+
* Requires either `contentBasedDeduplication: true` or a unique `MessageDeduplicationId` per message.
|
|
52
|
+
*
|
|
53
|
+
* @default false
|
|
54
|
+
*/
|
|
55
|
+
fifoEnabled?: boolean;
|
|
56
|
+
/**
|
|
57
|
+
* #### Automatically deduplicates messages based on content (SHA-256 hash) within a 5-minute window.
|
|
58
|
+
*
|
|
59
|
+
* ---
|
|
60
|
+
*
|
|
61
|
+
* Saves you from generating a unique deduplication ID for each message. Requires `fifoEnabled: true`.
|
|
62
|
+
*
|
|
63
|
+
* @default false
|
|
64
|
+
*/
|
|
65
|
+
contentBasedDeduplication?: boolean;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
type SnsTopicReferencableParam = 'arn' | 'name';
|
|
69
|
+
```
|