stacktape 3.5.7 → 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.
Files changed (123) hide show
  1. package/.tsconfig.bun-build.json +1 -0
  2. package/ai-docs/cli-ref/aws-profile-create.md +22 -0
  3. package/ai-docs/cli-ref/aws-profile-delete.md +22 -0
  4. package/ai-docs/cli-ref/aws-profile-list.md +20 -0
  5. package/ai-docs/cli-ref/aws-profile-update.md +22 -0
  6. package/ai-docs/cli-ref/bastion-session.md +29 -0
  7. package/ai-docs/cli-ref/bastion-tunnel.md +30 -0
  8. package/ai-docs/cli-ref/bucket-sync.md +30 -0
  9. package/ai-docs/cli-ref/cf-module-update.md +26 -0
  10. package/ai-docs/cli-ref/cf-rollback.md +28 -0
  11. package/ai-docs/cli-ref/codebuild-deploy.md +34 -0
  12. package/ai-docs/cli-ref/compile-template.md +25 -0
  13. package/ai-docs/cli-ref/container-session.md +30 -0
  14. package/ai-docs/cli-ref/debug-alarms.md +28 -0
  15. package/ai-docs/cli-ref/debug-aws-sdk.md +33 -0
  16. package/ai-docs/cli-ref/debug-container-exec.md +36 -0
  17. package/ai-docs/cli-ref/debug-dynamodb.md +35 -0
  18. package/ai-docs/cli-ref/debug-logs.md +34 -0
  19. package/ai-docs/cli-ref/debug-metrics.md +33 -0
  20. package/ai-docs/cli-ref/debug-opensearch.md +35 -0
  21. package/ai-docs/cli-ref/debug-redis.md +36 -0
  22. package/ai-docs/cli-ref/debug-sql.md +35 -0
  23. package/ai-docs/cli-ref/defaults-configure.md +29 -0
  24. package/ai-docs/cli-ref/defaults-list.md +20 -0
  25. package/ai-docs/cli-ref/delete.md +24 -0
  26. package/ai-docs/cli-ref/deploy.md +25 -0
  27. package/ai-docs/cli-ref/deployment-script-run.md +28 -0
  28. package/ai-docs/cli-ref/dev-stop.md +26 -0
  29. package/ai-docs/cli-ref/dev.md +45 -0
  30. package/ai-docs/cli-ref/domain-add.md +26 -0
  31. package/ai-docs/cli-ref/help.md +18 -0
  32. package/ai-docs/cli-ref/info-operations.md +22 -0
  33. package/ai-docs/cli-ref/info-stack.md +30 -0
  34. package/ai-docs/cli-ref/info-stacks.md +26 -0
  35. package/ai-docs/cli-ref/info-whoami.md +22 -0
  36. package/ai-docs/cli-ref/init.md +30 -0
  37. package/ai-docs/cli-ref/login.md +20 -0
  38. package/ai-docs/cli-ref/logout.md +18 -0
  39. package/ai-docs/cli-ref/mcp-add.md +22 -0
  40. package/ai-docs/cli-ref/mcp.md +20 -0
  41. package/ai-docs/cli-ref/org-create.md +24 -0
  42. package/ai-docs/cli-ref/org-delete.md +24 -0
  43. package/ai-docs/cli-ref/org-list.md +22 -0
  44. package/ai-docs/cli-ref/package-workloads.md +25 -0
  45. package/ai-docs/cli-ref/param-get.md +26 -0
  46. package/ai-docs/cli-ref/preview-changes.md +23 -0
  47. package/ai-docs/cli-ref/project-create.md +22 -0
  48. package/ai-docs/cli-ref/projects-list.md +22 -0
  49. package/ai-docs/cli-ref/rollback.md +28 -0
  50. package/ai-docs/cli-ref/script-run.md +29 -0
  51. package/ai-docs/cli-ref/secret-create.md +28 -0
  52. package/ai-docs/cli-ref/secret-delete.md +26 -0
  53. package/ai-docs/cli-ref/secret-get.md +26 -0
  54. package/ai-docs/cli-ref/upgrade.md +20 -0
  55. package/ai-docs/cli-ref/version.md +18 -0
  56. package/ai-docs/concept/connecting-resources.md +369 -0
  57. package/ai-docs/concept/directives.md +371 -0
  58. package/ai-docs/concept/extending-cloudformation.md +315 -0
  59. package/ai-docs/concept/overrides-and-transforms.md +352 -0
  60. package/ai-docs/concept/stages-and-environments.md +347 -0
  61. package/ai-docs/concept/typescript-config.md +447 -0
  62. package/ai-docs/concept/yaml-config.md +338 -0
  63. package/ai-docs/config-ref/_root.md +142 -0
  64. package/ai-docs/config-ref/application-load-balancer.md +1109 -0
  65. package/ai-docs/config-ref/astro-web.md +115 -0
  66. package/ai-docs/config-ref/aws-cdk-construct.md +68 -0
  67. package/ai-docs/config-ref/bastion.md +93 -0
  68. package/ai-docs/config-ref/batch-job.md +179 -0
  69. package/ai-docs/config-ref/bucket.md +348 -0
  70. package/ai-docs/config-ref/cdn.md +496 -0
  71. package/ai-docs/config-ref/custom-resource.md +80 -0
  72. package/ai-docs/config-ref/deployment-script.md +79 -0
  73. package/ai-docs/config-ref/dynamo-db-table.md +202 -0
  74. package/ai-docs/config-ref/edge-lambda-function.md +87 -0
  75. package/ai-docs/config-ref/efs-filesystem.md +72 -0
  76. package/ai-docs/config-ref/event-bus.md +63 -0
  77. package/ai-docs/config-ref/function.md +409 -0
  78. package/ai-docs/config-ref/hosting-bucket.md +171 -0
  79. package/ai-docs/config-ref/http-api-gateway.md +149 -0
  80. package/ai-docs/config-ref/http-endpoint.md +92 -0
  81. package/ai-docs/config-ref/kinesis-stream.md +97 -0
  82. package/ai-docs/config-ref/mongo-db-atlas-cluster.md +254 -0
  83. package/ai-docs/config-ref/multi-container-workload.md +399 -0
  84. package/ai-docs/config-ref/network-load-balancer.md +118 -0
  85. package/ai-docs/config-ref/nextjs-web.md +147 -0
  86. package/ai-docs/config-ref/nuxt-web.md +81 -0
  87. package/ai-docs/config-ref/open-search.md +206 -0
  88. package/ai-docs/config-ref/private-service.md +75 -0
  89. package/ai-docs/config-ref/redis-cluster.md +223 -0
  90. package/ai-docs/config-ref/relational-database.md +525 -0
  91. package/ai-docs/config-ref/remix-web.md +74 -0
  92. package/ai-docs/config-ref/sns-topic.md +69 -0
  93. package/ai-docs/config-ref/solidstart-web.md +75 -0
  94. package/ai-docs/config-ref/sqs-queue-not-empty.md +405 -0
  95. package/ai-docs/config-ref/sqs-queue.md +232 -0
  96. package/ai-docs/config-ref/state-machine.md +235 -0
  97. package/ai-docs/config-ref/sveltekit-web.md +81 -0
  98. package/ai-docs/config-ref/tanstack-web.md +75 -0
  99. package/ai-docs/config-ref/upstash-redis.md +59 -0
  100. package/ai-docs/config-ref/user-auth-pool.md +876 -0
  101. package/ai-docs/config-ref/web-app-firewall.md +212 -0
  102. package/ai-docs/config-ref/web-service.md +178 -0
  103. package/ai-docs/config-ref/worker-service.md +41 -0
  104. package/ai-docs/getting-started/console.md +232 -0
  105. package/ai-docs/getting-started/deployment.md +434 -0
  106. package/ai-docs/getting-started/dev-mode.md +118 -0
  107. package/ai-docs/getting-started/how-it-works.md +119 -0
  108. package/ai-docs/getting-started/intro.md +157 -0
  109. package/ai-docs/getting-started/using-with-ai.md +228 -0
  110. package/ai-docs/getting-started/workflow.md +197 -0
  111. package/ai-docs/index.json +1514 -0
  112. package/ai-docs/recipe/background-jobs.md +183 -0
  113. package/ai-docs/recipe/database-migrations.md +240 -0
  114. package/ai-docs/recipe/graphql-api.md +211 -0
  115. package/ai-docs/recipe/monorepo-setup.md +183 -0
  116. package/ai-docs/recipe/nextjs-full-stack.md +188 -0
  117. package/ai-docs/recipe/rest-api-with-database.md +156 -0
  118. package/ai-docs/recipe/scheduled-tasks.md +186 -0
  119. package/ai-docs/recipe/static-website.md +241 -0
  120. package/ai-docs/troubleshooting/cloudformation-stack-states.md +189 -0
  121. package/bin/stacktape.js +206 -41
  122. package/package.json +1 -1
  123. package/plain.d.ts +309 -54
@@ -0,0 +1,81 @@
1
+ ---
2
+ docType: config-ref
3
+ title: Nuxt Web
4
+ resourceType: nuxt-web
5
+ tags:
6
+ - nuxt-web
7
+ - nuxt
8
+ - nuxt.js
9
+ source: types/stacktape-config/nuxt-web.d.ts
10
+ priority: 1
11
+ ---
12
+
13
+ # Nuxt Web
14
+
15
+ Deploy a Nuxt SSR app with Lambda (Nitro aws-lambda preset), S3 for static assets, and CloudFront CDN.
16
+
17
+ For static-only Nuxt sites, use `hosting-bucket` with `hostingContentType: 'nuxt-static-website'` instead.
18
+
19
+ Resource type: `nuxt-web`
20
+
21
+ ## TypeScript Definition
22
+
23
+ ```typescript
24
+ /**
25
+ * #### Deploy a Nuxt SSR app with Lambda (Nitro aws-lambda preset), S3 for static assets, and CloudFront CDN.
26
+ *
27
+ * ---
28
+ *
29
+ * For static-only Nuxt sites, use `hosting-bucket` with `hostingContentType: 'nuxt-static-website'` instead.
30
+ */
31
+ interface NuxtWeb {
32
+ type: 'nuxt-web';
33
+ properties: NuxtWebProps;
34
+ overrides?: ResourceOverrides;
35
+ }
36
+
37
+ interface NuxtWebProps extends ResourceAccessProps {
38
+ /**
39
+ * #### Directory containing your `nuxt.config.ts`. For monorepos, point to the Nuxt workspace.
40
+ *
41
+ * @default "."
42
+ */
43
+ appDirectory?: string;
44
+ /**
45
+ * #### Override the default `nuxt build` command.
46
+ */
47
+ buildCommand?: string;
48
+ /**
49
+ * #### Environment variables for the SSR function. Use `$ResourceParam()` or `$Secret()` for dynamic values.
50
+ */
51
+ environment?: EnvironmentVar[];
52
+ /**
53
+ * #### Attach custom domains with auto-managed DNS records and TLS certificates.
54
+ *
55
+ * ---
56
+ *
57
+ * **Prerequisite:** A Route 53 hosted zone for your domain must exist in your AWS account.
58
+ */
59
+ customDomains?: DomainConfiguration[];
60
+ /**
61
+ * #### Customize the SSR Lambda function (memory, timeout, VPC, logging).
62
+ */
63
+ serverLambda?: SsrWebServerLambdaConfig;
64
+ /**
65
+ * #### Name of a `web-app-firewall` resource to protect this app. Firewall `scope` must be `cdn`.
66
+ */
67
+ useFirewall?: string;
68
+ /**
69
+ * #### Dev server config for `stacktape dev`. Defaults to `nuxt dev`.
70
+ */
71
+ dev?: SsrWebDevConfig;
72
+ /**
73
+ * #### Set custom headers (e.g., `Cache-Control`) for static files matching a pattern.
74
+ */
75
+ fileOptions?: DirectoryUploadFilter[];
76
+ /**
77
+ * #### CDN cache controls for SSR routes and specific path patterns.
78
+ */
79
+ cdn?: SsrWebCdnConfig;
80
+ }
81
+ ```
@@ -0,0 +1,206 @@
1
+ ---
2
+ docType: config-ref
3
+ title: Open Search Domain
4
+ resourceType: open-search
5
+ tags:
6
+ - open-search
7
+ - opensearch
8
+ - elasticsearch
9
+ - elastic
10
+ source: types/stacktape-config/open-search.d.ts
11
+ priority: 1
12
+ ---
13
+
14
+ # Open Search Domain
15
+
16
+ Managed search and analytics engine (OpenSearch/Elasticsearch compatible).
17
+
18
+ Full-text search, log analytics, and real-time dashboards. Use for search features in your app,
19
+ centralized logging, or time-series data analysis. Costs start at ~$50/month (single small node).
20
+
21
+ Resource type: `open-search`
22
+
23
+ ## TypeScript Definition
24
+
25
+ ```typescript
26
+ /**
27
+ * #### Managed search and analytics engine (OpenSearch/Elasticsearch compatible).
28
+ *
29
+ * ---
30
+ *
31
+ * Full-text search, log analytics, and real-time dashboards. Use for search features in your app,
32
+ * centralized logging, or time-series data analysis. Costs start at ~$50/month (single small node).
33
+ */
34
+ interface OpenSearchDomain {
35
+ type: 'open-search-domain'; // open-search?
36
+ properties?: OpenSearchDomainProps;
37
+ overrides?: ResourceOverrides;
38
+ }
39
+
40
+ interface OpenSearchDomainProps {
41
+ /**
42
+ * #### OpenSearch engine version. Pin this to avoid surprises when the default changes.
43
+ *
44
+ * @default '2.17'
45
+ */
46
+ version?: '2.17' | '2.15' | '2.13' | '2.11' | '2.9' | '2.7' | '2.5' | '2.3' | '1.3' | '1.2' | '1.1' | '1.0';
47
+ /**
48
+ * #### Instance types, counts, and cluster topology (data nodes, master nodes, warm storage).
49
+ *
50
+ * ---
51
+ *
52
+ * Defaults to a single `m4.large.search` node if not specified.
53
+ */
54
+ clusterConfig?: OpenSearchClusterConfig;
55
+ /**
56
+ * #### EBS volume size, IOPS, and throughput per data node. Only for EBS-backed instance types.
57
+ *
58
+ * ---
59
+ *
60
+ * `iops` and `throughput` settings only apply to GP3 volumes.
61
+ */
62
+ storage?: OpenSearchStorage;
63
+ /**
64
+ * #### Name of a `user-pool` resource in your config. Enables login to OpenSearch Dashboards via Cognito.
65
+ */
66
+ userPool?: string;
67
+ /**
68
+ * #### Error logs, search slow logs, and indexing slow logs. Sent to CloudWatch automatically.
69
+ */
70
+ logging?: OpenSearchLogConfiguration;
71
+ /**
72
+ * #### Network access mode: public internet (default), VPC-only, or VPC with security-group scoping.
73
+ *
74
+ * ---
75
+ *
76
+ * Even in `internet` mode, access requires IAM credentials. VPC modes add network-level isolation.
77
+ * **Warning:** you cannot switch between `internet` and `vpc`/`scoping-workloads-in-vpc` after creation.
78
+ */
79
+ accessibility?: OpenSearchAccessibility;
80
+ }
81
+
82
+ interface OpenSearchAccessibility {
83
+ /**
84
+ * #### How the domain can be reached.
85
+ *
86
+ * ---
87
+ *
88
+ * - **`internet`**: Accessible from anywhere (still requires IAM credentials).
89
+ * - **`vpc`**: Only accessible from resources inside your VPC (functions with `joinDefaultVpc: true`, containers, batch jobs).
90
+ * - **`scoping-workloads-in-vpc`**: Like `vpc`, but also requires security-group access via `connectTo`.
91
+ *
92
+ * **Cannot be changed after creation** — switching between internet and VPC modes requires a new domain.
93
+ *
94
+ * @default internet
95
+ */
96
+ accessibilityMode: 'internet' | 'vpc' | 'scoping-workloads-in-vpc';
97
+ }
98
+
99
+ interface OpenSearchClusterConfig {
100
+ /**
101
+ * #### Instance type for data nodes (e.g., `t3.medium.search`, `r6g.large.search`).
102
+ *
103
+ * ---
104
+ *
105
+ * Data nodes store data and handle queries. For production, pair with dedicated master nodes.
106
+ */
107
+ instanceType: string;
108
+ /**
109
+ * #### Number of data nodes. More nodes = more storage capacity and query throughput.
110
+ */
111
+ instanceCount: number;
112
+ /**
113
+ * #### Instance type for dedicated master nodes (e.g., `m5.large.search`). Manages cluster state, not data.
114
+ *
115
+ * ---
116
+ *
117
+ * Recommended for clusters with 3+ data nodes to prevent split-brain. Use an odd count (3, 5, or 7).
118
+ */
119
+ dedicatedMasterType?: string;
120
+ /**
121
+ * #### Number of dedicated master nodes. Must be odd (3, 5, or 7) for quorum.
122
+ */
123
+ dedicatedMasterCount?: number;
124
+ /**
125
+ * #### Instance type for warm (UltraWarm) nodes — cheaper storage for infrequently accessed data.
126
+ *
127
+ * ---
128
+ *
129
+ * Data on warm nodes is still searchable but with higher query latency. Great for retaining old logs
130
+ * or time-series data at lower cost.
131
+ */
132
+ warmType?: string;
133
+ /**
134
+ * #### Number of warm (UltraWarm) nodes for lower-cost storage of older data.
135
+ */
136
+ warmCount?: number;
137
+ /**
138
+ * #### Disable Multi-AZ replication. Not recommended — reduces availability and data durability.
139
+ *
140
+ * ---
141
+ *
142
+ * Multi-AZ is auto-enabled for clusters with 2+ nodes. It distributes nodes across availability zones
143
+ * so the cluster survives an AZ outage.
144
+ *
145
+ * @default false
146
+ */
147
+ multiAzDisabled?: boolean;
148
+ /**
149
+ * #### Enable Multi-AZ with a standby AZ for highest availability (99.99% SLA).
150
+ *
151
+ * ---
152
+ *
153
+ * Distributes nodes across 3 AZs with one as standby. The standby takes over instantly during failures
154
+ * without re-balancing. Requires: version 1.3+, 3 dedicated master + data nodes, GP3/SSD instances.
155
+ *
156
+ * @default false
157
+ */
158
+ standbyEnabled?: boolean;
159
+ }
160
+
161
+ interface OpenSearchStorage {
162
+ /**
163
+ * #### EBS volume size per data node in GiB. Min/max depends on instance type (typically 10–16,384 GiB).
164
+ */
165
+ size: number;
166
+ /**
167
+ * #### Provisioned IOPS per data node. GP3 volumes only.
168
+ * @default 3000
169
+ */
170
+ iops?: number;
171
+ /**
172
+ * #### Provisioned throughput per data node in MiB/s. GP3 volumes only.
173
+ * @default 125
174
+ */
175
+ throughput?: number;
176
+ }
177
+ interface OpenSearchLogConfiguration {
178
+ /**
179
+ * #### Error logs — script compilation errors, invalid queries, indexing issues, snapshot failures.
180
+ */
181
+ errorLogs?: OpenSearchLogRetentionSettings;
182
+ /**
183
+ * #### Search slow logs — queries exceeding thresholds you configure in OpenSearch index settings.
184
+ */
185
+ searchSlowLogs?: OpenSearchLogRetentionSettings;
186
+ /**
187
+ * #### Indexing slow logs — indexing operations exceeding thresholds you configure in OpenSearch index settings.
188
+ */
189
+ indexSlowLogs?: OpenSearchLogRetentionSettings;
190
+ }
191
+
192
+ interface OpenSearchLogRetentionSettings {
193
+ /**
194
+ * #### Disable this log type.
195
+ * @default false
196
+ */
197
+ disabled?: boolean;
198
+ /**
199
+ * #### Days to keep logs in CloudWatch before automatic deletion.
200
+ * @default 14
201
+ */
202
+ retentionDays?: 1 | 3 | 5 | 7 | 14 | 30 | 60 | 90 | 120 | 150 | 180 | 365 | 400 | 545 | 731 | 1827 | 3653;
203
+ }
204
+
205
+ type OpenSearchDomainReferencableParams = 'arn' | 'domainEndpoint';
206
+ ```
@@ -0,0 +1,75 @@
1
+ ---
2
+ docType: config-ref
3
+ title: Private Service
4
+ resourceType: private-service
5
+ tags:
6
+ - private-service
7
+ - internal-service
8
+ - vpc-service
9
+ source: types/stacktape-config/private-services.d.ts
10
+ priority: 1
11
+ ---
12
+
13
+ # Private Service
14
+
15
+ Always-on container with a private endpoint, reachable only from other resources in your stack.
16
+
17
+ Use for internal APIs, microservices, or gRPC servers that shouldn't be publicly accessible.
18
+ Other containers in the same stack can reach it by name (e.g., `http://myService:3000`).
19
+
20
+ Resource type: `private-service`
21
+
22
+ ## TypeScript Definition
23
+
24
+ ```typescript
25
+ /**
26
+ * #### Always-on container with a private endpoint, reachable only from other resources in your stack.
27
+ *
28
+ * ---
29
+ *
30
+ * Use for internal APIs, microservices, or gRPC servers that shouldn't be publicly accessible.
31
+ * Other containers in the same stack can reach it by name (e.g., `http://myService:3000`).
32
+ */
33
+ interface PrivateService {
34
+ type: 'private-service';
35
+ properties: PrivateServiceProps;
36
+ overrides?: ResourceOverrides;
37
+ }
38
+
39
+ interface PrivateServiceProps extends SimpleServiceContainer {
40
+ // /**
41
+ // * #### Alias name under which other resources of the stack (web-services, private-services, worker-services, multi-container-workloads) can find this service
42
+ // * ---
43
+ // * - Combination of `alias`(host) and `port` creates a unique identifier(address). You can then reach service on the address, i.e. using URL in form `protocol://alias:port` for example `http://my-service:8080` or `grpc://appserver:8080`.
44
+ // * - By default alias is lowercased name of the resource.
45
+ // */
46
+ // alias?: string;
47
+ /**
48
+ * #### Port this service listens on. Injected as the `PORT` env var.
49
+ * @default 3000
50
+ */
51
+ port?: number;
52
+ /**
53
+ * #### Protocol for metrics collection. Set to enable protocol-specific metrics (e.g., HTTP 5xx tracking).
54
+ */
55
+ protocol?: 'http' | 'http2' | 'grpc';
56
+ /**
57
+ * #### How traffic reaches this service from other resources.
58
+ *
59
+ * ---
60
+ *
61
+ * - **`service-connect`** (default, ~$0.50/mo): Direct container-to-container. Cheapest option.
62
+ * Only reachable from other container-based resources in the stack.
63
+ * - **`application-load-balancer`** (~$18/mo): HTTP load balancer. Reachable from any VPC resource.
64
+ *
65
+ * @default service-connect
66
+ */
67
+ loadBalancing?: PrivateServiceLoadBalancing;
68
+ }
69
+
70
+ interface PrivateServiceLoadBalancing {
71
+ type: ContainerWorkloadServiceConnectIntegration['type'] | ApplicationLoadBalancer['type'];
72
+ }
73
+
74
+ type PrivateServiceReferencableParams = ContainerWorkloadReferencableParam | 'address';
75
+ ```
@@ -0,0 +1,223 @@
1
+ ---
2
+ docType: config-ref
3
+ title: Redis Cluster
4
+ resourceType: redis-cluster
5
+ tags:
6
+ - redis-cluster
7
+ - elasticache
8
+ - redis
9
+ - cache
10
+ source: types/stacktape-config/redis-cluster.d.ts
11
+ priority: 1
12
+ ---
13
+
14
+ # Redis Cluster
15
+
16
+ In-memory data store for caching, sessions, queues, and real-time data. Sub-millisecond latency.
17
+
18
+ Resource type: `redis-cluster`
19
+
20
+ ## TypeScript Definition
21
+
22
+ ```typescript
23
+ /**
24
+ * #### In-memory data store for caching, sessions, queues, and real-time data. Sub-millisecond latency.
25
+ */
26
+ interface RedisCluster {
27
+ type: 'redis-cluster';
28
+ properties: RedisClusterProps;
29
+ overrides?: ResourceOverrides;
30
+ }
31
+
32
+ interface RedisClusterProps {
33
+ /**
34
+ * #### Split data across multiple shards for horizontal scaling.
35
+ *
36
+ * ---
37
+ *
38
+ * Each shard has its own primary + replicas. Routing is automatic.
39
+ *
40
+ * > **Must be set at creation time** — can't be added later.
41
+ * > Requires `numReplicaNodes >= 1`. Replica count can't be changed after creation.
42
+ */
43
+ enableSharding?: boolean;
44
+ /**
45
+ * #### Number of shards (only with `enableSharding: true`).
46
+ * @default 1
47
+ */
48
+ numShards?: number;
49
+ /**
50
+ * #### Read replicas per shard. Increases read throughput and availability.
51
+ *
52
+ * ---
53
+ *
54
+ * If the primary fails and `enableAutomaticFailover` is on, a replica takes over.
55
+ * Can't be changed after creation for sharded clusters.
56
+ *
57
+ * @default 0
58
+ */
59
+ numReplicaNodes?: number;
60
+ /**
61
+ * #### Auto-promote a replica to primary if the primary node fails.
62
+ *
63
+ * ---
64
+ *
65
+ * Requires `numReplicaNodes >= 1`. Always enabled for sharded clusters.
66
+ *
67
+ * > Deploy replicas first, then enable failover in a separate deployment.
68
+ */
69
+ enableAutomaticFailover?: boolean;
70
+ /**
71
+ * #### The size of each Redis node. Affects memory, performance, and cost.
72
+ *
73
+ * ---
74
+ *
75
+ * **Quick guide:**
76
+ * - **`cache.t4g.micro`** (~$0.016/hr, 0.5 GB): Development, testing, low-traffic apps.
77
+ * - **`cache.t4g.small`** (~$0.032/hr, 1.37 GB): Small production apps, session stores.
78
+ * - **`cache.m7g.large`** (~$0.15/hr, 6.38 GB): Production workloads with moderate data.
79
+ * - **`cache.r7g.large`** (~$0.20/hr, 13.07 GB): Large datasets, memory-heavy caching.
80
+ *
81
+ * **Families:** `t` = burstable (cheap, variable). `m` = general purpose. `r` = memory-optimized.
82
+ * Suffix `g` = ARM/Graviton (better price-performance).
83
+ *
84
+ * This size applies to every node (primary + replicas). You can change it later without data loss.
85
+ */
86
+ instanceSize:
87
+ | 'cache.t3.micro'
88
+ | 'cache.t3.small'
89
+ | 'cache.t3.medium'
90
+ | 'cache.t4g.micro'
91
+ | 'cache.t4g.small'
92
+ | 'cache.t4g.medium'
93
+ | 'cache.m6g.large'
94
+ | 'cache.m6g.xlarge'
95
+ | 'cache.m6g.2xlarge'
96
+ | 'cache.m6g.4xlarge'
97
+ | 'cache.m6g.8xlarge'
98
+ | 'cache.m6g.12xlarge'
99
+ | 'cache.m6g.16xlarge'
100
+ | 'cache.m7g.large'
101
+ | 'cache.m7g.xlarge'
102
+ | 'cache.m7g.2xlarge'
103
+ | 'cache.m7g.4xlarge'
104
+ | 'cache.m7g.8xlarge'
105
+ | 'cache.m7g.12xlarge'
106
+ | 'cache.m7g.16xlarge'
107
+ | 'cache.m5.large'
108
+ | 'cache.m5.xlarge'
109
+ | 'cache.m5.2xlarge'
110
+ | 'cache.m5.4xlarge'
111
+ | 'cache.m5.12xlarge'
112
+ | 'cache.m5.24xlarge'
113
+ | 'cache.m4.large'
114
+ | 'cache.m4.xlarge'
115
+ | 'cache.m4.2xlarge'
116
+ | 'cache.m4.4xlarge'
117
+ | 'cache.m4.10xlarge'
118
+ | 'cache.t2.micro'
119
+ | 'cache.t2.small'
120
+ | 'cache.t2.medium'
121
+ | 'cache.r6g.large'
122
+ | 'cache.r6g.xlarge'
123
+ | 'cache.r6g.2xlarge'
124
+ | 'cache.r6g.4xlarge'
125
+ | 'cache.r6g.8xlarge'
126
+ | 'cache.r6g.12xlarge'
127
+ | 'cache.r6g.16xlarge'
128
+ | 'cache.r7g.large'
129
+ | 'cache.r7g.xlarge'
130
+ | 'cache.r7g.2xlarge'
131
+ | 'cache.r7g.4xlarge'
132
+ | 'cache.r7g.8xlarge'
133
+ | 'cache.r7g.12xlarge'
134
+ | 'cache.r7g.16xlarge'
135
+ | 'cache.r5.large'
136
+ | 'cache.r5.xlarge'
137
+ | 'cache.r5.2xlarge'
138
+ | 'cache.r5.4xlarge'
139
+ | 'cache.r5.12xlarge'
140
+ | 'cache.r5.24xlarge'
141
+ | 'cache.r4.large'
142
+ | 'cache.r4.xlarge'
143
+ | 'cache.r4.2xlarge'
144
+ | 'cache.r4.4xlarge'
145
+ | 'cache.r4.8xlarge'
146
+ | 'cache.r4.16xlarge';
147
+ /**
148
+ * #### Slow query logging. Sent to CloudWatch; view with `stacktape logs`.
149
+ */
150
+ logging?: RedisLogging;
151
+ /**
152
+ * #### Days to keep automated daily backups. Set to 0 to disable.
153
+ * @default 0
154
+ */
155
+ automatedBackupRetentionDays?: number;
156
+ /**
157
+ * #### Port the cluster listens on.
158
+ * @default 6379
159
+ */
160
+ port?: number;
161
+ /**
162
+ * #### Cluster password. 16-128 chars, printable ASCII only. Cannot contain `/`, `"`, or `@`.
163
+ *
164
+ * ---
165
+ *
166
+ * All traffic is encrypted in transit. Use `$Secret()` instead of hardcoding:
167
+ * ```yaml
168
+ * defaultUserPassword: $Secret('redis.password')
169
+ * ```
170
+ */
171
+ defaultUserPassword: string;
172
+ /**
173
+ * #### Network access control: `vpc` (default) or `scoping-workloads-in-vpc` (most restrictive).
174
+ */
175
+ accessibility?: RedisAccessibility;
176
+ /**
177
+ * #### Redis engine version.
178
+ * @default "6.2"
179
+ */
180
+ engineVersion?: '7.1' | '7.0' | '6.2' | '6.0';
181
+ /**
182
+ * #### Dev mode: runs locally in Docker by default. Set `remote: true` to use the deployed cluster.
183
+ */
184
+ dev?: DevModeConfig;
185
+ }
186
+
187
+ interface RedisLogging extends LogForwardingBase {
188
+ /**
189
+ * #### Disable slow query logging.
190
+ * @default false
191
+ */
192
+ disabled?: boolean;
193
+ /**
194
+ * #### Log format.
195
+ * @default json
196
+ */
197
+ format?: 'text' | 'json';
198
+ /**
199
+ * #### How many days to keep logs.
200
+ * @default 90
201
+ */
202
+ retentionDays?: 1 | 3 | 5 | 7 | 14 | 30 | 60 | 90 | 120 | 150 | 180 | 365 | 400 | 545 | 731 | 1827 | 3653;
203
+ }
204
+
205
+ interface RedisAccessibility {
206
+ /**
207
+ * #### Who can connect to this cluster.
208
+ *
209
+ * ---
210
+ *
211
+ * - **`vpc`** (default): Any resource in the same VPC (functions with `joinDefaultVpc: true`, containers, batch jobs).
212
+ * - **`scoping-workloads-in-vpc`**: Only resources that list this cluster in their `connectTo`.
213
+ *
214
+ * Redis clusters don't have public IPs — you can't connect from your local machine directly.
215
+ * Use a bastion host for local access.
216
+ *
217
+ * @default vpc
218
+ */
219
+ accessibilityMode: 'vpc' | 'scoping-workloads-in-vpc';
220
+ }
221
+
222
+ type RedisClusterReferencableParam = 'host' | 'readerHost' | 'port' | 'readerPort' | 'connectionString' | 'sharding';
223
+ ```