@sst-community/sst 4.19.0 → 5.0.0-alpha.1
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/README.md +92 -52
- package/package.json +35 -11
- package/platform/js/chunks/chunk-HIZZCEDS.js +328 -0
- package/platform/js/chunks/chunk-HIZZCEDS.js.map +6 -0
- package/platform/js/chunks/chunk-KOKHGKJ2.js +639 -0
- package/platform/js/chunks/chunk-KOKHGKJ2.js.map +6 -0
- package/platform/js/chunks/chunk-ONNI4XNK.js +367 -0
- package/platform/js/chunks/chunk-ONNI4XNK.js.map +6 -0
- package/platform/js/chunks/chunk-VIFHC73J.js +108 -0
- package/platform/js/chunks/chunk-VIFHC73J.js.map +6 -0
- package/platform/js/chunks/chunk-WJ6BVA46.js +10 -0
- package/platform/js/chunks/chunk-WJ6BVA46.js.map +6 -0
- package/platform/js/chunks/chunk-ZOXXXME5.js +472 -0
- package/platform/js/chunks/chunk-ZOXXXME5.js.map +6 -0
- package/platform/js/chunks/component-32FCLIRK.js +26 -0
- package/platform/js/chunks/component-32FCLIRK.js.map +6 -0
- package/platform/js/chunks/config-DMGMTLNB.js +10 -0
- package/platform/js/chunks/config-DMGMTLNB.js.map +6 -0
- package/platform/js/chunks/link-OJ3RNGQ3.js +9 -0
- package/platform/js/chunks/link-OJ3RNGQ3.js.map +6 -0
- package/platform/js/components/aws/index.js +35362 -0
- package/platform/js/components/aws/index.js.map +6 -0
- package/platform/js/components/cloudflare/index.js +3246 -0
- package/platform/js/components/cloudflare/index.js.map +6 -0
- package/platform/js/components/core.js +114 -0
- package/platform/js/components/core.js.map +6 -0
- package/platform/js/components/vercel/index.js +120 -0
- package/platform/js/components/vercel/index.js.map +6 -0
- package/platform/js/testing/index.js +569 -0
- package/platform/js/testing/index.js.map +6 -0
- package/platform/package.json +25 -0
- package/platform/src/ast/add.mjs +190 -0
- package/platform/src/auto/run.ts +109 -0
- package/platform/src/components/README.md +652 -0
- package/platform/src/components/args.ts +133 -0
- package/platform/src/components/aws/alb.ts +577 -0
- package/platform/src/components/aws/analog.ts +462 -0
- package/platform/src/components/aws/apigateway-websocket-route.ts +206 -0
- package/platform/src/components/aws/apigateway-websocket.ts +894 -0
- package/platform/src/components/aws/apigatewayv1-api-key.ts +90 -0
- package/platform/src/components/aws/apigatewayv1-authorizer.ts +178 -0
- package/platform/src/components/aws/apigatewayv1-base-route.ts +78 -0
- package/platform/src/components/aws/apigatewayv1-integration-route.ts +92 -0
- package/platform/src/components/aws/apigatewayv1-lambda-route.ts +152 -0
- package/platform/src/components/aws/apigatewayv1-usage-plan.ts +109 -0
- package/platform/src/components/aws/apigatewayv1.ts +1691 -0
- package/platform/src/components/aws/apigatewayv2-authorizer.ts +199 -0
- package/platform/src/components/aws/apigatewayv2-base-route.ts +69 -0
- package/platform/src/components/aws/apigatewayv2-lambda-route.ts +141 -0
- package/platform/src/components/aws/apigatewayv2-private-route.ts +101 -0
- package/platform/src/components/aws/apigatewayv2-url-route.ts +90 -0
- package/platform/src/components/aws/apigatewayv2.ts +1439 -0
- package/platform/src/components/aws/app-sync-data-source.ts +264 -0
- package/platform/src/components/aws/app-sync-function.ts +79 -0
- package/platform/src/components/aws/app-sync-resolver.ts +110 -0
- package/platform/src/components/aws/app-sync.ts +849 -0
- package/platform/src/components/aws/astro.ts +580 -0
- package/platform/src/components/aws/aurora.ts +1356 -0
- package/platform/src/components/aws/auth-v1.ts +69 -0
- package/platform/src/components/aws/auth.ts +417 -0
- package/platform/src/components/aws/bucket-lambda-subscriber.ts +162 -0
- package/platform/src/components/aws/bucket-notification.ts +254 -0
- package/platform/src/components/aws/bucket-queue-subscriber.ts +122 -0
- package/platform/src/components/aws/bucket-topic-subscriber.ts +144 -0
- package/platform/src/components/aws/bucket.ts +2046 -0
- package/platform/src/components/aws/bus-base-subscriber.ts +52 -0
- package/platform/src/components/aws/bus-lambda-subscriber.ts +125 -0
- package/platform/src/components/aws/bus-queue-subscriber.ts +88 -0
- package/platform/src/components/aws/bus.ts +630 -0
- package/platform/src/components/aws/cdn.ts +561 -0
- package/platform/src/components/aws/cluster-v1.ts +932 -0
- package/platform/src/components/aws/cluster.ts +584 -0
- package/platform/src/components/aws/cognito-identity-pool.ts +433 -0
- package/platform/src/components/aws/cognito-identity-provider.ts +96 -0
- package/platform/src/components/aws/cognito-user-pool-client.ts +114 -0
- package/platform/src/components/aws/cognito-user-pool.ts +1089 -0
- package/platform/src/components/aws/cron-v2.ts +555 -0
- package/platform/src/components/aws/cron.ts +435 -0
- package/platform/src/components/aws/dns-validated-certificate.ts +108 -0
- package/platform/src/components/aws/dns.ts +221 -0
- package/platform/src/components/aws/dsql.ts +741 -0
- package/platform/src/components/aws/dynamo-lambda-subscriber.ts +124 -0
- package/platform/src/components/aws/dynamo.ts +929 -0
- package/platform/src/components/aws/efs.ts +410 -0
- package/platform/src/components/aws/email.ts +673 -0
- package/platform/src/components/aws/fargate.ts +1279 -0
- package/platform/src/components/aws/function.ts +3227 -0
- package/platform/src/components/aws/helpers/apigateway-account.ts +78 -0
- package/platform/src/components/aws/helpers/apigatewayv2-domain.ts +144 -0
- package/platform/src/components/aws/helpers/arn.ts +182 -0
- package/platform/src/components/aws/helpers/bootstrap.ts +16 -0
- package/platform/src/components/aws/helpers/client.ts +76 -0
- package/platform/src/components/aws/helpers/container-builder.ts +33 -0
- package/platform/src/components/aws/helpers/custom-domain.ts +128 -0
- package/platform/src/components/aws/helpers/event-source.ts +41 -0
- package/platform/src/components/aws/helpers/fargate.ts +727 -0
- package/platform/src/components/aws/helpers/function-builder.ts +133 -0
- package/platform/src/components/aws/helpers/function-code.ts +224 -0
- package/platform/src/components/aws/helpers/function-part.ts +202 -0
- package/platform/src/components/aws/helpers/function-permission.ts +29 -0
- package/platform/src/components/aws/helpers/load-balancer-args.ts +88 -0
- package/platform/src/components/aws/helpers/load-balancer.ts +17 -0
- package/platform/src/components/aws/helpers/provider.ts +36 -0
- package/platform/src/components/aws/helpers/queue-policy.ts +33 -0
- package/platform/src/components/aws/helpers/rds.ts +212 -0
- package/platform/src/components/aws/helpers/site-builder.ts +41 -0
- package/platform/src/components/aws/helpers/subscriber.ts +23 -0
- package/platform/src/components/aws/helpers/vpc.ts +27 -0
- package/platform/src/components/aws/https-redirect.ts +216 -0
- package/platform/src/components/aws/iam-edit.ts +50 -0
- package/platform/src/components/aws/index.ts +61 -0
- package/platform/src/components/aws/kinesis-stream-lambda-subscriber.ts +122 -0
- package/platform/src/components/aws/kinesis-stream.ts +416 -0
- package/platform/src/components/aws/linkable.ts +32 -0
- package/platform/src/components/aws/logging.ts +25 -0
- package/platform/src/components/aws/microvm.ts +988 -0
- package/platform/src/components/aws/mysql.ts +1047 -0
- package/platform/src/components/aws/nextjs.ts +1052 -0
- package/platform/src/components/aws/nuxt.ts +527 -0
- package/platform/src/components/aws/open-search.ts +603 -0
- package/platform/src/components/aws/opencontrol.ts +235 -0
- package/platform/src/components/aws/permission.ts +80 -0
- package/platform/src/components/aws/postgres-v1.ts +537 -0
- package/platform/src/components/aws/postgres.ts +1074 -0
- package/platform/src/components/aws/providers/bucket-files.ts +32 -0
- package/platform/src/components/aws/providers/distribution-deployment-waiter.ts +27 -0
- package/platform/src/components/aws/providers/distribution-invalidation.ts +24 -0
- package/platform/src/components/aws/providers/function-environment-update.ts +46 -0
- package/platform/src/components/aws/providers/hosted-zone-lookup.ts +25 -0
- package/platform/src/components/aws/providers/kv-keys.ts +15 -0
- package/platform/src/components/aws/providers/kv-routes-update.ts +24 -0
- package/platform/src/components/aws/providers/microvm-image-prune.ts +48 -0
- package/platform/src/components/aws/providers/origin-access-control.ts +21 -0
- package/platform/src/components/aws/providers/rds-role-lookup.ts +21 -0
- package/platform/src/components/aws/providers/vector-table.ts +25 -0
- package/platform/src/components/aws/queue-lambda-subscriber.ts +135 -0
- package/platform/src/components/aws/queue.ts +712 -0
- package/platform/src/components/aws/react.ts +510 -0
- package/platform/src/components/aws/realtime-lambda-subscriber.ts +129 -0
- package/platform/src/components/aws/realtime.ts +345 -0
- package/platform/src/components/aws/redis-v1.ts +595 -0
- package/platform/src/components/aws/redis.ts +1078 -0
- package/platform/src/components/aws/remix.ts +576 -0
- package/platform/src/components/aws/router-base-route.ts +83 -0
- package/platform/src/components/aws/router-bucket-route.ts +63 -0
- package/platform/src/components/aws/router-url-route.ts +75 -0
- package/platform/src/components/aws/router.ts +3281 -0
- package/platform/src/components/aws/service-v1.ts +876 -0
- package/platform/src/components/aws/service.ts +2994 -0
- package/platform/src/components/aws/sns-topic-lambda-subscriber.ts +127 -0
- package/platform/src/components/aws/sns-topic-queue-subscriber.ts +105 -0
- package/platform/src/components/aws/sns-topic.ts +700 -0
- package/platform/src/components/aws/solid-start.ts +467 -0
- package/platform/src/components/aws/ssr-site.ts +2204 -0
- package/platform/src/components/aws/static-site.ts +1389 -0
- package/platform/src/components/aws/step-functions/choice.ts +123 -0
- package/platform/src/components/aws/step-functions/fail.ts +69 -0
- package/platform/src/components/aws/step-functions/map.ts +264 -0
- package/platform/src/components/aws/step-functions/parallel.ts +170 -0
- package/platform/src/components/aws/step-functions/pass.ts +48 -0
- package/platform/src/components/aws/step-functions/state.ts +376 -0
- package/platform/src/components/aws/step-functions/succeed.ts +31 -0
- package/platform/src/components/aws/step-functions/task.ts +538 -0
- package/platform/src/components/aws/step-functions/wait.ts +105 -0
- package/platform/src/components/aws/step-functions.ts +804 -0
- package/platform/src/components/aws/svelte-kit.ts +563 -0
- package/platform/src/components/aws/takeover/alb.ts +9 -0
- package/platform/src/components/aws/takeover/apigatewayv2.ts +43 -0
- package/platform/src/components/aws/takeover/app-sync.ts +45 -0
- package/platform/src/components/aws/takeover/aurora.ts +19 -0
- package/platform/src/components/aws/takeover/bucket.ts +94 -0
- package/platform/src/components/aws/takeover/bus.ts +43 -0
- package/platform/src/components/aws/takeover/cognito-user-pool.ts +21 -0
- package/platform/src/components/aws/takeover/cron-v2.ts +9 -0
- package/platform/src/components/aws/takeover/dsql.ts +12 -0
- package/platform/src/components/aws/takeover/dynamo.ts +31 -0
- package/platform/src/components/aws/takeover/efs.ts +9 -0
- package/platform/src/components/aws/takeover/function.ts +21 -0
- package/platform/src/components/aws/takeover/helpers.ts +26 -0
- package/platform/src/components/aws/takeover/index.ts +27 -0
- package/platform/src/components/aws/takeover/mysql.ts +17 -0
- package/platform/src/components/aws/takeover/postgres.ts +17 -0
- package/platform/src/components/aws/takeover/queue.ts +21 -0
- package/platform/src/components/aws/takeover/redis.ts +10 -0
- package/platform/src/components/aws/takeover/service.ts +22 -0
- package/platform/src/components/aws/takeover/sns-topic.ts +27 -0
- package/platform/src/components/aws/takeover/task.ts +13 -0
- package/platform/src/components/aws/tan-stack-start.ts +479 -0
- package/platform/src/components/aws/task.ts +571 -0
- package/platform/src/components/aws/v5/alb.ts +310 -0
- package/platform/src/components/aws/v5/apigatewayv2.ts +845 -0
- package/platform/src/components/aws/v5/app-sync.ts +673 -0
- package/platform/src/components/aws/v5/aurora.ts +855 -0
- package/platform/src/components/aws/v5/bucket.ts +1001 -0
- package/platform/src/components/aws/v5/bus.ts +321 -0
- package/platform/src/components/aws/v5/cluster.ts +230 -0
- package/platform/src/components/aws/v5/cognito-user-pool-client.ts +100 -0
- package/platform/src/components/aws/v5/cognito-user-pool.ts +693 -0
- package/platform/src/components/aws/v5/cron-v2.ts +316 -0
- package/platform/src/components/aws/v5/dsql.ts +665 -0
- package/platform/src/components/aws/v5/dynamo.ts +477 -0
- package/platform/src/components/aws/v5/efs.ts +311 -0
- package/platform/src/components/aws/v5/function.ts +1527 -0
- package/platform/src/components/aws/v5/index.ts +26 -0
- package/platform/src/components/aws/v5/mysql.ts +604 -0
- package/platform/src/components/aws/v5/postgres.ts +612 -0
- package/platform/src/components/aws/v5/queue.ts +271 -0
- package/platform/src/components/aws/v5/redis.ts +550 -0
- package/platform/src/components/aws/v5/service.ts +2209 -0
- package/platform/src/components/aws/v5/sns-topic.ts +284 -0
- package/platform/src/components/aws/v5/task.ts +549 -0
- package/platform/src/components/aws/vector.ts +316 -0
- package/platform/src/components/aws/vpc-v1.ts +580 -0
- package/platform/src/components/aws/vpc.ts +1641 -0
- package/platform/src/components/aws/workflow.ts +421 -0
- package/platform/src/components/base/base-site.ts +101 -0
- package/platform/src/components/base/base-ssr-site.ts +120 -0
- package/platform/src/components/base/base-static-site.ts +314 -0
- package/platform/src/components/cloudflare/account-id.ts +1 -0
- package/platform/src/components/cloudflare/ai.ts +77 -0
- package/platform/src/components/cloudflare/astro.ts +355 -0
- package/platform/src/components/cloudflare/auth.ts +69 -0
- package/platform/src/components/cloudflare/binding.ts +132 -0
- package/platform/src/components/cloudflare/bucket.ts +142 -0
- package/platform/src/components/cloudflare/cron.ts +207 -0
- package/platform/src/components/cloudflare/d1.ts +230 -0
- package/platform/src/components/cloudflare/dns.ts +253 -0
- package/platform/src/components/cloudflare/durable-object.ts +144 -0
- package/platform/src/components/cloudflare/experimental/index.ts +3 -0
- package/platform/src/components/cloudflare/experimental/solid-start.ts +288 -0
- package/platform/src/components/cloudflare/experimental/static-site.ts +4 -0
- package/platform/src/components/cloudflare/helpers/compatibility.ts +44 -0
- package/platform/src/components/cloudflare/helpers/fetch.ts +81 -0
- package/platform/src/components/cloudflare/helpers/validation.ts +74 -0
- package/platform/src/components/cloudflare/helpers/worker-builder.ts +57 -0
- package/platform/src/components/cloudflare/helpers/wrangler.ts +222 -0
- package/platform/src/components/cloudflare/hyperdrive.ts +402 -0
- package/platform/src/components/cloudflare/index.ts +25 -0
- package/platform/src/components/cloudflare/kv.ts +218 -0
- package/platform/src/components/cloudflare/providers/dns-record.ts +43 -0
- package/platform/src/components/cloudflare/providers/kv-data.ts +107 -0
- package/platform/src/components/cloudflare/providers/worker-assets.ts +41 -0
- package/platform/src/components/cloudflare/providers/worker-placement.ts +93 -0
- package/platform/src/components/cloudflare/providers/worker-script.ts +47 -0
- package/platform/src/components/cloudflare/providers/worker-url.ts +109 -0
- package/platform/src/components/cloudflare/providers/zone-lookup.ts +85 -0
- package/platform/src/components/cloudflare/queue-worker-subscriber.ts +192 -0
- package/platform/src/components/cloudflare/queue.ts +310 -0
- package/platform/src/components/cloudflare/rate-limit.ts +178 -0
- package/platform/src/components/cloudflare/react-router.ts +322 -0
- package/platform/src/components/cloudflare/ssr-site.ts +293 -0
- package/platform/src/components/cloudflare/static-site-v2.ts +428 -0
- package/platform/src/components/cloudflare/static-site.ts +470 -0
- package/platform/src/components/cloudflare/tan-stack-start.ts +408 -0
- package/platform/src/components/cloudflare/worker.ts +1080 -0
- package/platform/src/components/cloudflare/workflow.ts +319 -0
- package/platform/src/components/component.ts +242 -0
- package/platform/src/components/core.ts +43 -0
- package/platform/src/components/cpu.ts +10 -0
- package/platform/src/components/dns.ts +82 -0
- package/platform/src/components/duration.ts +67 -0
- package/platform/src/components/error.ts +5 -0
- package/platform/src/components/esbuild.ts +15 -0
- package/platform/src/components/experimental/dev-command.ts +127 -0
- package/platform/src/components/experimental/index.ts +1 -0
- package/platform/src/components/groups.ts +9 -0
- package/platform/src/components/index.ts +9 -0
- package/platform/src/components/input.ts +2 -0
- package/platform/src/components/link.ts +201 -0
- package/platform/src/components/linkable.ts +360 -0
- package/platform/src/components/naming-rules.ts +299 -0
- package/platform/src/components/naming.ts +189 -0
- package/platform/src/components/parts-component.ts +662 -0
- package/platform/src/components/parts.ts +299 -0
- package/platform/src/components/path.ts +5 -0
- package/platform/src/components/rpc/rpc.ts +110 -0
- package/platform/src/components/secret.ts +159 -0
- package/platform/src/components/size.ts +28 -0
- package/platform/src/components/takeover.ts +131 -0
- package/platform/src/components/transform.ts +107 -0
- package/platform/src/components/vercel/account-id.ts +1 -0
- package/platform/src/components/vercel/dns.ts +171 -0
- package/platform/src/components/vercel/index.ts +2 -0
- package/platform/src/components/vercel/providers/dns-record.ts +34 -0
- package/platform/src/config.ts +1460 -0
- package/platform/src/global-aliases.d.ts +37 -0
- package/platform/src/global.d.ts +374 -0
- package/platform/src/internal.d.ts +18 -0
- package/platform/src/runtime/worker/unenv.d.ts +14 -0
- package/platform/src/runtime/worker/unenv.mjs +26 -0
- package/platform/src/shim/run.js +25 -0
- package/platform/src/testing/global.ts +83 -0
- package/platform/src/testing/index.ts +103 -0
- package/platform/src/testing/mock.ts +646 -0
- package/platform/src/testing/vitest.ts +36 -0
- package/platform/src/util/compare-semver.ts +23 -0
- package/platform/src/util/fs.ts +49 -0
- package/platform/src/util/lazy.ts +12 -0
- package/platform/src/util/minify.ts +10 -0
- package/platform/src/util/package.ts +29 -0
- package/platform/src/util/semaphore.ts +29 -0
- package/platform/src/util/warn.ts +7 -0
- package/platform/types/auto/run.d.ts +9 -0
- package/platform/types/auto/run.d.ts.map +1 -0
- package/platform/types/components/args.d.ts +77 -0
- package/platform/types/components/args.d.ts.map +1 -0
- package/platform/types/components/aws/alb.d.ts +283 -0
- package/platform/types/components/aws/alb.d.ts.map +1 -0
- package/platform/types/components/aws/analog.d.ts +408 -0
- package/platform/types/components/aws/analog.d.ts.map +1 -0
- package/platform/types/components/aws/apigateway-websocket-route.d.ts +74 -0
- package/platform/types/components/aws/apigateway-websocket-route.d.ts.map +1 -0
- package/platform/types/components/aws/apigateway-websocket.d.ts +560 -0
- package/platform/types/components/aws/apigateway-websocket.d.ts.map +1 -0
- package/platform/types/components/aws/apigatewayv1-api-key.d.ts +48 -0
- package/platform/types/components/aws/apigatewayv1-api-key.d.ts.map +1 -0
- package/platform/types/components/aws/apigatewayv1-authorizer.d.ts +55 -0
- package/platform/types/components/aws/apigatewayv1-authorizer.d.ts.map +1 -0
- package/platform/types/components/aws/apigatewayv1-base-route.d.ts +36 -0
- package/platform/types/components/aws/apigatewayv1-base-route.d.ts.map +1 -0
- package/platform/types/components/aws/apigatewayv1-integration-route.d.ts +39 -0
- package/platform/types/components/aws/apigatewayv1-integration-route.d.ts.map +1 -0
- package/platform/types/components/aws/apigatewayv1-lambda-route.d.ts +53 -0
- package/platform/types/components/aws/apigatewayv1-lambda-route.d.ts.map +1 -0
- package/platform/types/components/aws/apigatewayv1-usage-plan.d.ts +53 -0
- package/platform/types/components/aws/apigatewayv1-usage-plan.d.ts.map +1 -0
- package/platform/types/components/aws/apigatewayv1.d.ts +1028 -0
- package/platform/types/components/aws/apigatewayv1.d.ts.map +1 -0
- package/platform/types/components/aws/apigatewayv2-authorizer.d.ts +54 -0
- package/platform/types/components/aws/apigatewayv2-authorizer.d.ts.map +1 -0
- package/platform/types/components/aws/apigatewayv2-base-route.d.ts +28 -0
- package/platform/types/components/aws/apigatewayv2-base-route.d.ts.map +1 -0
- package/platform/types/components/aws/apigatewayv2-lambda-route.d.ts +59 -0
- package/platform/types/components/aws/apigatewayv2-lambda-route.d.ts.map +1 -0
- package/platform/types/components/aws/apigatewayv2-private-route.d.ts +54 -0
- package/platform/types/components/aws/apigatewayv2-private-route.d.ts.map +1 -0
- package/platform/types/components/aws/apigatewayv2-url-route.d.ts +44 -0
- package/platform/types/components/aws/apigatewayv2-url-route.d.ts.map +1 -0
- package/platform/types/components/aws/apigatewayv2.d.ts +955 -0
- package/platform/types/components/aws/apigatewayv2.d.ts.map +1 -0
- package/platform/types/components/aws/app-sync-data-source.d.ts +52 -0
- package/platform/types/components/aws/app-sync-data-source.d.ts.map +1 -0
- package/platform/types/components/aws/app-sync-function.d.ts +33 -0
- package/platform/types/components/aws/app-sync-function.d.ts.map +1 -0
- package/platform/types/components/aws/app-sync-resolver.d.ts +41 -0
- package/platform/types/components/aws/app-sync-resolver.d.ts.map +1 -0
- package/platform/types/components/aws/app-sync.d.ts +638 -0
- package/platform/types/components/aws/app-sync.d.ts.map +1 -0
- package/platform/types/components/aws/astro.d.ts +409 -0
- package/platform/types/components/aws/astro.d.ts.map +1 -0
- package/platform/types/components/aws/aurora.d.ts +720 -0
- package/platform/types/components/aws/aurora.d.ts.map +1 -0
- package/platform/types/components/aws/auth-v1.d.ts +26 -0
- package/platform/types/components/aws/auth-v1.d.ts.map +1 -0
- package/platform/types/components/aws/auth.d.ts +295 -0
- package/platform/types/components/aws/auth.d.ts.map +1 -0
- package/platform/types/components/aws/bucket-lambda-subscriber.d.ts +61 -0
- package/platform/types/components/aws/bucket-lambda-subscriber.d.ts.map +1 -0
- package/platform/types/components/aws/bucket-notification.d.ts +47 -0
- package/platform/types/components/aws/bucket-notification.d.ts.map +1 -0
- package/platform/types/components/aws/bucket-queue-subscriber.d.ts +55 -0
- package/platform/types/components/aws/bucket-queue-subscriber.d.ts.map +1 -0
- package/platform/types/components/aws/bucket-topic-subscriber.d.ts +55 -0
- package/platform/types/components/aws/bucket-topic-subscriber.d.ts.map +1 -0
- package/platform/types/components/aws/bucket.d.ts +1356 -0
- package/platform/types/components/aws/bucket.d.ts.map +1 -0
- package/platform/types/components/aws/bus-base-subscriber.d.ts +20 -0
- package/platform/types/components/aws/bus-base-subscriber.d.ts.map +1 -0
- package/platform/types/components/aws/bus-lambda-subscriber.d.ts +50 -0
- package/platform/types/components/aws/bus-lambda-subscriber.d.ts.map +1 -0
- package/platform/types/components/aws/bus-queue-subscriber.d.ts +44 -0
- package/platform/types/components/aws/bus-queue-subscriber.d.ts.map +1 -0
- package/platform/types/components/aws/bus.d.ts +447 -0
- package/platform/types/components/aws/bus.d.ts.map +1 -0
- package/platform/types/components/aws/cdn.d.ts +310 -0
- package/platform/types/components/aws/cdn.d.ts.map +1 -0
- package/platform/types/components/aws/cluster-v1.d.ts +885 -0
- package/platform/types/components/aws/cluster-v1.d.ts.map +1 -0
- package/platform/types/components/aws/cluster.d.ts +364 -0
- package/platform/types/components/aws/cluster.d.ts.map +1 -0
- package/platform/types/components/aws/cognito-identity-pool.d.ts +199 -0
- package/platform/types/components/aws/cognito-identity-pool.d.ts.map +1 -0
- package/platform/types/components/aws/cognito-identity-provider.d.ts +38 -0
- package/platform/types/components/aws/cognito-identity-provider.d.ts.map +1 -0
- package/platform/types/components/aws/cognito-user-pool-client.d.ts +50 -0
- package/platform/types/components/aws/cognito-user-pool-client.d.ts.map +1 -0
- package/platform/types/components/aws/cognito-user-pool.d.ts +703 -0
- package/platform/types/components/aws/cognito-user-pool.d.ts.map +1 -0
- package/platform/types/components/aws/cron-v2.d.ts +325 -0
- package/platform/types/components/aws/cron-v2.d.ts.map +1 -0
- package/platform/types/components/aws/cron.d.ts +259 -0
- package/platform/types/components/aws/cron.d.ts.map +1 -0
- package/platform/types/components/aws/dns-validated-certificate.d.ts +27 -0
- package/platform/types/components/aws/dns-validated-certificate.d.ts.map +1 -0
- package/platform/types/components/aws/dns.d.ts +94 -0
- package/platform/types/components/aws/dns.d.ts.map +1 -0
- package/platform/types/components/aws/dsql.d.ts +369 -0
- package/platform/types/components/aws/dsql.d.ts.map +1 -0
- package/platform/types/components/aws/dynamo-lambda-subscriber.d.ts +55 -0
- package/platform/types/components/aws/dynamo-lambda-subscriber.d.ts.map +1 -0
- package/platform/types/components/aws/dynamo.d.ts +628 -0
- package/platform/types/components/aws/dynamo.d.ts.map +1 -0
- package/platform/types/components/aws/efs.d.ts +217 -0
- package/platform/types/components/aws/efs.d.ts.map +1 -0
- package/platform/types/components/aws/email.d.ts +370 -0
- package/platform/types/components/aws/email.d.ts.map +1 -0
- package/platform/types/components/aws/fargate.d.ts +894 -0
- package/platform/types/components/aws/fargate.d.ts.map +1 -0
- package/platform/types/components/aws/function.d.ts +1755 -0
- package/platform/types/components/aws/function.d.ts.map +1 -0
- package/platform/types/components/aws/helpers/apigateway-account.d.ts +3 -0
- package/platform/types/components/aws/helpers/apigateway-account.d.ts.map +1 -0
- package/platform/types/components/aws/helpers/apigatewayv2-domain.d.ts +144 -0
- package/platform/types/components/aws/helpers/apigatewayv2-domain.d.ts.map +1 -0
- package/platform/types/components/aws/helpers/arn.d.ts +51 -0
- package/platform/types/components/aws/helpers/arn.d.ts.map +1 -0
- package/platform/types/components/aws/helpers/bootstrap.d.ts +13 -0
- package/platform/types/components/aws/helpers/bootstrap.d.ts.map +1 -0
- package/platform/types/components/aws/helpers/client.d.ts +7 -0
- package/platform/types/components/aws/helpers/client.d.ts.map +1 -0
- package/platform/types/components/aws/helpers/container-builder.d.ts +4 -0
- package/platform/types/components/aws/helpers/container-builder.d.ts.map +1 -0
- package/platform/types/components/aws/helpers/custom-domain.d.ts +111 -0
- package/platform/types/components/aws/helpers/custom-domain.d.ts.map +1 -0
- package/platform/types/components/aws/helpers/event-source.d.ts +26 -0
- package/platform/types/components/aws/helpers/event-source.d.ts.map +1 -0
- package/platform/types/components/aws/helpers/fargate.d.ts +225 -0
- package/platform/types/components/aws/helpers/fargate.d.ts.map +1 -0
- package/platform/types/components/aws/helpers/function-builder.d.ts +14 -0
- package/platform/types/components/aws/helpers/function-builder.d.ts.map +1 -0
- package/platform/types/components/aws/helpers/function-code.d.ts +80 -0
- package/platform/types/components/aws/helpers/function-code.d.ts.map +1 -0
- package/platform/types/components/aws/helpers/function-part.d.ts +61 -0
- package/platform/types/components/aws/helpers/function-part.d.ts.map +1 -0
- package/platform/types/components/aws/helpers/function-permission.d.ts +17 -0
- package/platform/types/components/aws/helpers/function-permission.d.ts.map +1 -0
- package/platform/types/components/aws/helpers/load-balancer-args.d.ts +40 -0
- package/platform/types/components/aws/helpers/load-balancer-args.d.ts.map +1 -0
- package/platform/types/components/aws/helpers/load-balancer.d.ts +9 -0
- package/platform/types/components/aws/helpers/load-balancer.d.ts.map +1 -0
- package/platform/types/components/aws/helpers/provider.d.ts +3 -0
- package/platform/types/components/aws/helpers/provider.d.ts.map +1 -0
- package/platform/types/components/aws/helpers/queue-policy.d.ts +11 -0
- package/platform/types/components/aws/helpers/queue-policy.d.ts.map +1 -0
- package/platform/types/components/aws/helpers/rds.d.ts +98 -0
- package/platform/types/components/aws/helpers/rds.d.ts.map +1 -0
- package/platform/types/components/aws/helpers/site-builder.d.ts +4 -0
- package/platform/types/components/aws/helpers/site-builder.d.ts.map +1 -0
- package/platform/types/components/aws/helpers/subscriber.d.ts +6 -0
- package/platform/types/components/aws/helpers/subscriber.d.ts.map +1 -0
- package/platform/types/components/aws/helpers/vpc.d.ts +14 -0
- package/platform/types/components/aws/helpers/vpc.d.ts.map +1 -0
- package/platform/types/components/aws/https-redirect.d.ts +38 -0
- package/platform/types/components/aws/https-redirect.d.ts.map +1 -0
- package/platform/types/components/aws/iam-edit.d.ts +39 -0
- package/platform/types/components/aws/iam-edit.d.ts.map +1 -0
- package/platform/types/components/aws/index.d.ts +56 -0
- package/platform/types/components/aws/index.d.ts.map +1 -0
- package/platform/types/components/aws/kinesis-stream-lambda-subscriber.d.ts +49 -0
- package/platform/types/components/aws/kinesis-stream-lambda-subscriber.d.ts.map +1 -0
- package/platform/types/components/aws/kinesis-stream.d.ts +254 -0
- package/platform/types/components/aws/kinesis-stream.d.ts.map +1 -0
- package/platform/types/components/aws/linkable.d.ts +17 -0
- package/platform/types/components/aws/linkable.d.ts.map +1 -0
- package/platform/types/components/aws/logging.d.ts +26 -0
- package/platform/types/components/aws/logging.d.ts.map +1 -0
- package/platform/types/components/aws/microvm.d.ts +439 -0
- package/platform/types/components/aws/microvm.d.ts.map +1 -0
- package/platform/types/components/aws/mysql.d.ts +525 -0
- package/platform/types/components/aws/mysql.d.ts.map +1 -0
- package/platform/types/components/aws/nextjs.d.ts +534 -0
- package/platform/types/components/aws/nextjs.d.ts.map +1 -0
- package/platform/types/components/aws/nuxt.d.ts +480 -0
- package/platform/types/components/aws/nuxt.d.ts.map +1 -0
- package/platform/types/components/aws/open-search.d.ts +306 -0
- package/platform/types/components/aws/open-search.d.ts.map +1 -0
- package/platform/types/components/aws/opencontrol.d.ts +169 -0
- package/platform/types/components/aws/opencontrol.d.ts.map +1 -0
- package/platform/types/components/aws/permission.d.ts +80 -0
- package/platform/types/components/aws/permission.d.ts.map +1 -0
- package/platform/types/components/aws/postgres-v1.d.ts +328 -0
- package/platform/types/components/aws/postgres-v1.d.ts.map +1 -0
- package/platform/types/components/aws/postgres.d.ts +529 -0
- package/platform/types/components/aws/postgres.d.ts.map +1 -0
- package/platform/types/components/aws/providers/bucket-files.d.ts +18 -0
- package/platform/types/components/aws/providers/bucket-files.d.ts.map +1 -0
- package/platform/types/components/aws/providers/distribution-deployment-waiter.d.ts +13 -0
- package/platform/types/components/aws/providers/distribution-deployment-waiter.d.ts.map +1 -0
- package/platform/types/components/aws/providers/distribution-invalidation.d.ts +11 -0
- package/platform/types/components/aws/providers/distribution-invalidation.d.ts.map +1 -0
- package/platform/types/components/aws/providers/function-environment-update.d.ts +33 -0
- package/platform/types/components/aws/providers/function-environment-update.d.ts.map +1 -0
- package/platform/types/components/aws/providers/hosted-zone-lookup.d.ts +11 -0
- package/platform/types/components/aws/providers/hosted-zone-lookup.d.ts.map +1 -0
- package/platform/types/components/aws/providers/kv-keys.d.ts +11 -0
- package/platform/types/components/aws/providers/kv-keys.d.ts.map +1 -0
- package/platform/types/components/aws/providers/kv-routes-update.d.ts +11 -0
- package/platform/types/components/aws/providers/kv-routes-update.d.ts.map +1 -0
- package/platform/types/components/aws/providers/microvm-image-prune.d.ts +35 -0
- package/platform/types/components/aws/providers/microvm-image-prune.d.ts.map +1 -0
- package/platform/types/components/aws/providers/origin-access-control.d.ts +8 -0
- package/platform/types/components/aws/providers/origin-access-control.d.ts.map +1 -0
- package/platform/types/components/aws/providers/rds-role-lookup.d.ts +8 -0
- package/platform/types/components/aws/providers/rds-role-lookup.d.ts.map +1 -0
- package/platform/types/components/aws/providers/vector-table.d.ts +12 -0
- package/platform/types/components/aws/providers/vector-table.d.ts.map +1 -0
- package/platform/types/components/aws/queue-lambda-subscriber.d.ts +53 -0
- package/platform/types/components/aws/queue-lambda-subscriber.d.ts.map +1 -0
- package/platform/types/components/aws/queue.d.ts +494 -0
- package/platform/types/components/aws/queue.d.ts.map +1 -0
- package/platform/types/components/aws/react.d.ts +407 -0
- package/platform/types/components/aws/react.d.ts.map +1 -0
- package/platform/types/components/aws/realtime-lambda-subscriber.d.ts +53 -0
- package/platform/types/components/aws/realtime-lambda-subscriber.d.ts.map +1 -0
- package/platform/types/components/aws/realtime.d.ts +237 -0
- package/platform/types/components/aws/realtime.d.ts.map +1 -0
- package/platform/types/components/aws/redis-v1.d.ts +348 -0
- package/platform/types/components/aws/redis-v1.d.ts.map +1 -0
- package/platform/types/components/aws/redis.d.ts +545 -0
- package/platform/types/components/aws/redis.d.ts.map +1 -0
- package/platform/types/components/aws/remix.d.ts +408 -0
- package/platform/types/components/aws/remix.d.ts.map +1 -0
- package/platform/types/components/aws/router-base-route.d.ts +28 -0
- package/platform/types/components/aws/router-base-route.d.ts.map +1 -0
- package/platform/types/components/aws/router-bucket-route.d.ts +29 -0
- package/platform/types/components/aws/router-bucket-route.d.ts.map +1 -0
- package/platform/types/components/aws/router-url-route.d.ts +28 -0
- package/platform/types/components/aws/router-url-route.d.ts.map +1 -0
- package/platform/types/components/aws/router.d.ts +1754 -0
- package/platform/types/components/aws/router.d.ts.map +1 -0
- package/platform/types/components/aws/service-v1.d.ts +78 -0
- package/platform/types/components/aws/service-v1.d.ts.map +1 -0
- package/platform/types/components/aws/service.d.ts +1756 -0
- package/platform/types/components/aws/service.d.ts.map +1 -0
- package/platform/types/components/aws/sns-topic-lambda-subscriber.d.ts +53 -0
- package/platform/types/components/aws/sns-topic-lambda-subscriber.d.ts.map +1 -0
- package/platform/types/components/aws/sns-topic-queue-subscriber.d.ts +55 -0
- package/platform/types/components/aws/sns-topic-queue-subscriber.d.ts.map +1 -0
- package/platform/types/components/aws/sns-topic.d.ts +394 -0
- package/platform/types/components/aws/sns-topic.d.ts.map +1 -0
- package/platform/types/components/aws/solid-start.d.ts +399 -0
- package/platform/types/components/aws/solid-start.d.ts.map +1 -0
- package/platform/types/components/aws/ssr-site.d.ts +895 -0
- package/platform/types/components/aws/ssr-site.d.ts.map +1 -0
- package/platform/types/components/aws/static-site.d.ts +744 -0
- package/platform/types/components/aws/static-site.d.ts.map +1 -0
- package/platform/types/components/aws/step-functions/choice.d.ts +73 -0
- package/platform/types/components/aws/step-functions/choice.d.ts.map +1 -0
- package/platform/types/components/aws/step-functions/fail.d.ts +63 -0
- package/platform/types/components/aws/step-functions/fail.d.ts.map +1 -0
- package/platform/types/components/aws/step-functions/map.d.ts +236 -0
- package/platform/types/components/aws/step-functions/map.d.ts.map +1 -0
- package/platform/types/components/aws/step-functions/parallel.d.ts +127 -0
- package/platform/types/components/aws/step-functions/parallel.d.ts.map +1 -0
- package/platform/types/components/aws/step-functions/pass.d.ts +39 -0
- package/platform/types/components/aws/step-functions/pass.d.ts.map +1 -0
- package/platform/types/components/aws/step-functions/state.d.ts +231 -0
- package/platform/types/components/aws/step-functions/state.d.ts.map +1 -0
- package/platform/types/components/aws/step-functions/succeed.d.ts +26 -0
- package/platform/types/components/aws/step-functions/succeed.d.ts.map +1 -0
- package/platform/types/components/aws/step-functions/task.d.ts +485 -0
- package/platform/types/components/aws/step-functions/task.d.ts.map +1 -0
- package/platform/types/components/aws/step-functions/wait.d.ts +91 -0
- package/platform/types/components/aws/step-functions/wait.d.ts.map +1 -0
- package/platform/types/components/aws/step-functions.d.ts +478 -0
- package/platform/types/components/aws/step-functions.d.ts.map +1 -0
- package/platform/types/components/aws/svelte-kit.d.ts +456 -0
- package/platform/types/components/aws/svelte-kit.d.ts.map +1 -0
- package/platform/types/components/aws/takeover/alb.d.ts +2 -0
- package/platform/types/components/aws/takeover/alb.d.ts.map +1 -0
- package/platform/types/components/aws/takeover/apigatewayv2.d.ts +2 -0
- package/platform/types/components/aws/takeover/apigatewayv2.d.ts.map +1 -0
- package/platform/types/components/aws/takeover/app-sync.d.ts +2 -0
- package/platform/types/components/aws/takeover/app-sync.d.ts.map +1 -0
- package/platform/types/components/aws/takeover/aurora.d.ts +2 -0
- package/platform/types/components/aws/takeover/aurora.d.ts.map +1 -0
- package/platform/types/components/aws/takeover/bucket.d.ts +2 -0
- package/platform/types/components/aws/takeover/bucket.d.ts.map +1 -0
- package/platform/types/components/aws/takeover/bus.d.ts +2 -0
- package/platform/types/components/aws/takeover/bus.d.ts.map +1 -0
- package/platform/types/components/aws/takeover/cognito-user-pool.d.ts +2 -0
- package/platform/types/components/aws/takeover/cognito-user-pool.d.ts.map +1 -0
- package/platform/types/components/aws/takeover/cron-v2.d.ts +2 -0
- package/platform/types/components/aws/takeover/cron-v2.d.ts.map +1 -0
- package/platform/types/components/aws/takeover/dsql.d.ts +2 -0
- package/platform/types/components/aws/takeover/dsql.d.ts.map +1 -0
- package/platform/types/components/aws/takeover/dynamo.d.ts +2 -0
- package/platform/types/components/aws/takeover/dynamo.d.ts.map +1 -0
- package/platform/types/components/aws/takeover/efs.d.ts +2 -0
- package/platform/types/components/aws/takeover/efs.d.ts.map +1 -0
- package/platform/types/components/aws/takeover/function.d.ts +2 -0
- package/platform/types/components/aws/takeover/function.d.ts.map +1 -0
- package/platform/types/components/aws/takeover/helpers.d.ts +16 -0
- package/platform/types/components/aws/takeover/helpers.d.ts.map +1 -0
- package/platform/types/components/aws/takeover/index.d.ts +28 -0
- package/platform/types/components/aws/takeover/index.d.ts.map +1 -0
- package/platform/types/components/aws/takeover/mysql.d.ts +2 -0
- package/platform/types/components/aws/takeover/mysql.d.ts.map +1 -0
- package/platform/types/components/aws/takeover/postgres.d.ts +2 -0
- package/platform/types/components/aws/takeover/postgres.d.ts.map +1 -0
- package/platform/types/components/aws/takeover/queue.d.ts +2 -0
- package/platform/types/components/aws/takeover/queue.d.ts.map +1 -0
- package/platform/types/components/aws/takeover/redis.d.ts +2 -0
- package/platform/types/components/aws/takeover/redis.d.ts.map +1 -0
- package/platform/types/components/aws/takeover/service.d.ts +2 -0
- package/platform/types/components/aws/takeover/service.d.ts.map +1 -0
- package/platform/types/components/aws/takeover/sns-topic.d.ts +2 -0
- package/platform/types/components/aws/takeover/sns-topic.d.ts.map +1 -0
- package/platform/types/components/aws/takeover/task.d.ts +2 -0
- package/platform/types/components/aws/takeover/task.d.ts.map +1 -0
- package/platform/types/components/aws/tan-stack-start.d.ts +359 -0
- package/platform/types/components/aws/tan-stack-start.d.ts.map +1 -0
- package/platform/types/components/aws/task.d.ts +342 -0
- package/platform/types/components/aws/task.d.ts.map +1 -0
- package/platform/types/components/aws/v5/alb.d.ts +177 -0
- package/platform/types/components/aws/v5/alb.d.ts.map +1 -0
- package/platform/types/components/aws/v5/apigatewayv2.d.ts +482 -0
- package/platform/types/components/aws/v5/apigatewayv2.d.ts.map +1 -0
- package/platform/types/components/aws/v5/app-sync.d.ts +424 -0
- package/platform/types/components/aws/v5/app-sync.d.ts.map +1 -0
- package/platform/types/components/aws/v5/aurora.d.ts +459 -0
- package/platform/types/components/aws/v5/aurora.d.ts.map +1 -0
- package/platform/types/components/aws/v5/bucket.d.ts +578 -0
- package/platform/types/components/aws/v5/bucket.d.ts.map +1 -0
- package/platform/types/components/aws/v5/bus.d.ts +255 -0
- package/platform/types/components/aws/v5/bus.d.ts.map +1 -0
- package/platform/types/components/aws/v5/cluster.d.ts +167 -0
- package/platform/types/components/aws/v5/cluster.d.ts.map +1 -0
- package/platform/types/components/aws/v5/cognito-user-pool-client.d.ts +69 -0
- package/platform/types/components/aws/v5/cognito-user-pool-client.d.ts.map +1 -0
- package/platform/types/components/aws/v5/cognito-user-pool.d.ts +396 -0
- package/platform/types/components/aws/v5/cognito-user-pool.d.ts.map +1 -0
- package/platform/types/components/aws/v5/cron-v2.d.ts +206 -0
- package/platform/types/components/aws/v5/cron-v2.d.ts.map +1 -0
- package/platform/types/components/aws/v5/dsql.d.ts +453 -0
- package/platform/types/components/aws/v5/dsql.d.ts.map +1 -0
- package/platform/types/components/aws/v5/dynamo.d.ts +328 -0
- package/platform/types/components/aws/v5/dynamo.d.ts.map +1 -0
- package/platform/types/components/aws/v5/efs.d.ts +178 -0
- package/platform/types/components/aws/v5/efs.d.ts.map +1 -0
- package/platform/types/components/aws/v5/function.d.ts +582 -0
- package/platform/types/components/aws/v5/function.d.ts.map +1 -0
- package/platform/types/components/aws/v5/index.d.ts +27 -0
- package/platform/types/components/aws/v5/index.d.ts.map +1 -0
- package/platform/types/components/aws/v5/mysql.d.ts +347 -0
- package/platform/types/components/aws/v5/mysql.d.ts.map +1 -0
- package/platform/types/components/aws/v5/postgres.d.ts +348 -0
- package/platform/types/components/aws/v5/postgres.d.ts.map +1 -0
- package/platform/types/components/aws/v5/queue.d.ts +190 -0
- package/platform/types/components/aws/v5/queue.d.ts.map +1 -0
- package/platform/types/components/aws/v5/redis.d.ts +214 -0
- package/platform/types/components/aws/v5/redis.d.ts.map +1 -0
- package/platform/types/components/aws/v5/service.d.ts +1347 -0
- package/platform/types/components/aws/v5/service.d.ts.map +1 -0
- package/platform/types/components/aws/v5/sns-topic.d.ts +226 -0
- package/platform/types/components/aws/v5/sns-topic.d.ts.map +1 -0
- package/platform/types/components/aws/v5/task.d.ts +346 -0
- package/platform/types/components/aws/v5/task.d.ts.map +1 -0
- package/platform/types/components/aws/vector.d.ts +163 -0
- package/platform/types/components/aws/vector.d.ts.map +1 -0
- package/platform/types/components/aws/vpc-v1.d.ts +208 -0
- package/platform/types/components/aws/vpc-v1.d.ts.map +1 -0
- package/platform/types/components/aws/vpc.d.ts +491 -0
- package/platform/types/components/aws/vpc.d.ts.map +1 -0
- package/platform/types/components/aws/workflow.d.ts +331 -0
- package/platform/types/components/aws/workflow.d.ts.map +1 -0
- package/platform/types/components/base/base-site.d.ts +53 -0
- package/platform/types/components/base/base-site.d.ts.map +1 -0
- package/platform/types/components/base/base-ssr-site.d.ts +13 -0
- package/platform/types/components/base/base-ssr-site.d.ts.map +1 -0
- package/platform/types/components/base/base-static-site.d.ts +199 -0
- package/platform/types/components/base/base-static-site.d.ts.map +1 -0
- package/platform/types/components/cloudflare/account-id.d.ts +2 -0
- package/platform/types/components/cloudflare/account-id.d.ts.map +1 -0
- package/platform/types/components/cloudflare/ai.d.ts +68 -0
- package/platform/types/components/cloudflare/ai.d.ts.map +1 -0
- package/platform/types/components/cloudflare/astro.d.ts +249 -0
- package/platform/types/components/cloudflare/astro.d.ts.map +1 -0
- package/platform/types/components/cloudflare/auth.d.ts +22 -0
- package/platform/types/components/cloudflare/auth.d.ts.map +1 -0
- package/platform/types/components/cloudflare/binding.d.ts +109 -0
- package/platform/types/components/cloudflare/binding.d.ts.map +1 -0
- package/platform/types/components/cloudflare/bucket.d.ts +98 -0
- package/platform/types/components/cloudflare/bucket.d.ts.map +1 -0
- package/platform/types/components/cloudflare/cron.d.ts +151 -0
- package/platform/types/components/cloudflare/cron.d.ts.map +1 -0
- package/platform/types/components/cloudflare/d1.d.ts +142 -0
- package/platform/types/components/cloudflare/d1.d.ts.map +1 -0
- package/platform/types/components/cloudflare/dns.d.ts +100 -0
- package/platform/types/components/cloudflare/dns.d.ts.map +1 -0
- package/platform/types/components/cloudflare/durable-object.d.ts +125 -0
- package/platform/types/components/cloudflare/durable-object.d.ts.map +1 -0
- package/platform/types/components/cloudflare/experimental/index.d.ts +4 -0
- package/platform/types/components/cloudflare/experimental/index.d.ts.map +1 -0
- package/platform/types/components/cloudflare/experimental/solid-start.d.ts +219 -0
- package/platform/types/components/cloudflare/experimental/solid-start.d.ts.map +1 -0
- package/platform/types/components/cloudflare/experimental/static-site.d.ts +3 -0
- package/platform/types/components/cloudflare/experimental/static-site.d.ts.map +1 -0
- package/platform/types/components/cloudflare/helpers/compatibility.d.ts +21 -0
- package/platform/types/components/cloudflare/helpers/compatibility.d.ts.map +1 -0
- package/platform/types/components/cloudflare/helpers/fetch.d.ts +19 -0
- package/platform/types/components/cloudflare/helpers/fetch.d.ts.map +1 -0
- package/platform/types/components/cloudflare/helpers/validation.d.ts +15 -0
- package/platform/types/components/cloudflare/helpers/validation.d.ts.map +1 -0
- package/platform/types/components/cloudflare/helpers/worker-builder.d.ts +10 -0
- package/platform/types/components/cloudflare/helpers/worker-builder.d.ts.map +1 -0
- package/platform/types/components/cloudflare/helpers/wrangler.d.ts +31 -0
- package/platform/types/components/cloudflare/helpers/wrangler.d.ts.map +1 -0
- package/platform/types/components/cloudflare/hyperdrive.d.ts +302 -0
- package/platform/types/components/cloudflare/hyperdrive.d.ts.map +1 -0
- package/platform/types/components/cloudflare/index.d.ts +25 -0
- package/platform/types/components/cloudflare/index.d.ts.map +1 -0
- package/platform/types/components/cloudflare/kv.d.ts +140 -0
- package/platform/types/components/cloudflare/kv.d.ts.map +1 -0
- package/platform/types/components/cloudflare/providers/dns-record.d.ts +21 -0
- package/platform/types/components/cloudflare/providers/dns-record.d.ts.map +1 -0
- package/platform/types/components/cloudflare/providers/kv-data.d.ts +23 -0
- package/platform/types/components/cloudflare/providers/kv-data.d.ts.map +1 -0
- package/platform/types/components/cloudflare/providers/worker-assets.d.ts +19 -0
- package/platform/types/components/cloudflare/providers/worker-assets.d.ts.map +1 -0
- package/platform/types/components/cloudflare/providers/worker-placement.d.ts +27 -0
- package/platform/types/components/cloudflare/providers/worker-placement.d.ts.map +1 -0
- package/platform/types/components/cloudflare/providers/worker-script.d.ts +23 -0
- package/platform/types/components/cloudflare/providers/worker-script.d.ts.map +1 -0
- package/platform/types/components/cloudflare/providers/worker-url.d.ts +24 -0
- package/platform/types/components/cloudflare/providers/worker-url.d.ts.map +1 -0
- package/platform/types/components/cloudflare/providers/zone-lookup.d.ts +22 -0
- package/platform/types/components/cloudflare/providers/zone-lookup.d.ts.map +1 -0
- package/platform/types/components/cloudflare/queue-worker-subscriber.d.ts +122 -0
- package/platform/types/components/cloudflare/queue-worker-subscriber.d.ts.map +1 -0
- package/platform/types/components/cloudflare/queue.d.ts +235 -0
- package/platform/types/components/cloudflare/queue.d.ts.map +1 -0
- package/platform/types/components/cloudflare/rate-limit.d.ts +117 -0
- package/platform/types/components/cloudflare/rate-limit.d.ts.map +1 -0
- package/platform/types/components/cloudflare/react-router.d.ts +262 -0
- package/platform/types/components/cloudflare/react-router.d.ts.map +1 -0
- package/platform/types/components/cloudflare/ssr-site.d.ts +60 -0
- package/platform/types/components/cloudflare/ssr-site.d.ts.map +1 -0
- package/platform/types/components/cloudflare/static-site-v2.d.ts +302 -0
- package/platform/types/components/cloudflare/static-site-v2.d.ts.map +1 -0
- package/platform/types/components/cloudflare/static-site.d.ts +270 -0
- package/platform/types/components/cloudflare/static-site.d.ts.map +1 -0
- package/platform/types/components/cloudflare/tan-stack-start.d.ts +259 -0
- package/platform/types/components/cloudflare/tan-stack-start.d.ts.map +1 -0
- package/platform/types/components/cloudflare/worker.d.ts +483 -0
- package/platform/types/components/cloudflare/worker.d.ts.map +1 -0
- package/platform/types/components/cloudflare/workflow.d.ts +248 -0
- package/platform/types/components/cloudflare/workflow.d.ts.map +1 -0
- package/platform/types/components/component.d.ts +67 -0
- package/platform/types/components/component.d.ts.map +1 -0
- package/platform/types/components/core.d.ts +16 -0
- package/platform/types/components/core.d.ts.map +1 -0
- package/platform/types/components/cpu.d.ts +3 -0
- package/platform/types/components/cpu.d.ts.map +1 -0
- package/platform/types/components/dns.d.ts +63 -0
- package/platform/types/components/dns.d.ts.map +1 -0
- package/platform/types/components/duration.d.ts +9 -0
- package/platform/types/components/duration.d.ts.map +1 -0
- package/platform/types/components/error.d.ts +4 -0
- package/platform/types/components/error.d.ts.map +1 -0
- package/platform/types/components/esbuild.d.ts +3 -0
- package/platform/types/components/esbuild.d.ts.map +1 -0
- package/platform/types/components/experimental/dev-command.d.ts +99 -0
- package/platform/types/components/experimental/dev-command.d.ts.map +1 -0
- package/platform/types/components/experimental/index.d.ts +2 -0
- package/platform/types/components/experimental/index.d.ts.map +1 -0
- package/platform/types/components/groups.d.ts +6 -0
- package/platform/types/components/groups.d.ts.map +1 -0
- package/platform/types/components/index.d.ts +5 -0
- package/platform/types/components/index.d.ts.map +1 -0
- package/platform/types/components/input.d.ts +3 -0
- package/platform/types/components/input.d.ts.map +1 -0
- package/platform/types/components/link.d.ts +41 -0
- package/platform/types/components/link.d.ts.map +1 -0
- package/platform/types/components/linkable.d.ts +301 -0
- package/platform/types/components/linkable.d.ts.map +1 -0
- package/platform/types/components/naming-rules.d.ts +32 -0
- package/platform/types/components/naming-rules.d.ts.map +1 -0
- package/platform/types/components/naming.d.ts +21 -0
- package/platform/types/components/naming.d.ts.map +1 -0
- package/platform/types/components/parts-component.d.ts +241 -0
- package/platform/types/components/parts-component.d.ts.map +1 -0
- package/platform/types/components/parts.d.ts +194 -0
- package/platform/types/components/parts.d.ts.map +1 -0
- package/platform/types/components/path.d.ts +2 -0
- package/platform/types/components/path.d.ts.map +1 -0
- package/platform/types/components/rpc/rpc.d.ts +19 -0
- package/platform/types/components/rpc/rpc.d.ts.map +1 -0
- package/platform/types/components/secret.d.ts +123 -0
- package/platform/types/components/secret.d.ts.map +1 -0
- package/platform/types/components/size.d.ts +5 -0
- package/platform/types/components/size.d.ts.map +1 -0
- package/platform/types/components/takeover.d.ts +88 -0
- package/platform/types/components/takeover.d.ts.map +1 -0
- package/platform/types/components/transform.d.ts +34 -0
- package/platform/types/components/transform.d.ts.map +1 -0
- package/platform/types/components/vercel/account-id.d.ts +2 -0
- package/platform/types/components/vercel/account-id.d.ts.map +1 -0
- package/platform/types/components/vercel/dns.d.ts +73 -0
- package/platform/types/components/vercel/dns.d.ts.map +1 -0
- package/platform/types/components/vercel/index.d.ts +3 -0
- package/platform/types/components/vercel/index.d.ts.map +1 -0
- package/platform/types/components/vercel/providers/dns-record.d.ts +15 -0
- package/platform/types/components/vercel/providers/dns-record.d.ts.map +1 -0
- package/platform/types/config.d.ts +1437 -0
- package/platform/types/config.d.ts.map +1 -0
- package/platform/types/global-aliases.d.ts +37 -0
- package/platform/types/global.d.ts +374 -0
- package/platform/types/internal.d.ts +18 -0
- package/platform/types/runtime/worker/unenv.d.ts +14 -0
- package/platform/types/testing/global.d.ts +11 -0
- package/platform/types/testing/global.d.ts.map +1 -0
- package/platform/types/testing/index.d.ts +80 -0
- package/platform/types/testing/index.d.ts.map +1 -0
- package/platform/types/testing/mock.d.ts +136 -0
- package/platform/types/testing/mock.d.ts.map +1 -0
- package/platform/types/testing/vitest.d.ts +19 -0
- package/platform/types/testing/vitest.d.ts.map +1 -0
- package/platform/types/util/compare-semver.d.ts +4 -0
- package/platform/types/util/compare-semver.d.ts.map +1 -0
- package/platform/types/util/fs.d.ts +5 -0
- package/platform/types/util/fs.d.ts.map +1 -0
- package/platform/types/util/lazy.d.ts +2 -0
- package/platform/types/util/lazy.d.ts.map +1 -0
- package/platform/types/util/minify.d.ts +2 -0
- package/platform/types/util/minify.d.ts.map +1 -0
- package/platform/types/util/package.d.ts +10 -0
- package/platform/types/util/package.d.ts.map +1 -0
- package/platform/types/util/semaphore.d.ts +9 -0
- package/platform/types/util/semaphore.d.ts.map +1 -0
- package/platform/types/util/warn.d.ts +2 -0
- package/platform/types/util/warn.d.ts.map +1 -0
|
@@ -0,0 +1,876 @@
|
|
|
1
|
+
import fs from "fs";
|
|
2
|
+
import path from "path";
|
|
3
|
+
import {
|
|
4
|
+
ComponentResourceOptions,
|
|
5
|
+
Input,
|
|
6
|
+
Output,
|
|
7
|
+
all,
|
|
8
|
+
interpolate,
|
|
9
|
+
output,
|
|
10
|
+
secret,
|
|
11
|
+
} from "@pulumi/pulumi";
|
|
12
|
+
import { Image, Platform } from "@pulumi/docker-build";
|
|
13
|
+
import { Component, transform } from "../component.js";
|
|
14
|
+
import { toGBs, toMBs } from "../size.js";
|
|
15
|
+
import { toNumber } from "../cpu.js";
|
|
16
|
+
import { dns as awsDns } from "./dns.js";
|
|
17
|
+
import { VisibleError } from "../error.js";
|
|
18
|
+
import { DnsValidatedCertificate } from "./dns-validated-certificate.js";
|
|
19
|
+
import { Link } from "../link.js";
|
|
20
|
+
import { bootstrap } from "./helpers/bootstrap.js";
|
|
21
|
+
import {
|
|
22
|
+
ClusterArgs,
|
|
23
|
+
ClusterServiceArgs,
|
|
24
|
+
supportedCpus,
|
|
25
|
+
supportedMemories,
|
|
26
|
+
} from "./cluster-v1.js";
|
|
27
|
+
import { RETENTION } from "./logging.js";
|
|
28
|
+
import { URL_UNAVAILABLE } from "./linkable.js";
|
|
29
|
+
import {
|
|
30
|
+
appautoscaling,
|
|
31
|
+
cloudwatch,
|
|
32
|
+
ec2,
|
|
33
|
+
ecr,
|
|
34
|
+
ecs,
|
|
35
|
+
getCallerIdentityOutput,
|
|
36
|
+
getRegionOutput,
|
|
37
|
+
iam,
|
|
38
|
+
lb,
|
|
39
|
+
} from "@pulumi/aws";
|
|
40
|
+
import { Permission } from "./permission.js";
|
|
41
|
+
import { Vpc } from "./vpc.js";
|
|
42
|
+
|
|
43
|
+
export interface ServiceArgs extends ClusterServiceArgs {
|
|
44
|
+
/**
|
|
45
|
+
* The cluster to use for the service.
|
|
46
|
+
*/
|
|
47
|
+
cluster: Input<{
|
|
48
|
+
/**
|
|
49
|
+
* The name of the cluster.
|
|
50
|
+
*/
|
|
51
|
+
name: Input<string>;
|
|
52
|
+
/**
|
|
53
|
+
* The ARN of the cluster.
|
|
54
|
+
*/
|
|
55
|
+
arn: Input<string>;
|
|
56
|
+
}>;
|
|
57
|
+
/**
|
|
58
|
+
* The VPC to use for the cluster.
|
|
59
|
+
*/
|
|
60
|
+
vpc: ClusterArgs["vpc"];
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* The `Service` component is internally used by the `Cluster` component to deploy services to
|
|
65
|
+
* [Amazon ECS](https://aws.amazon.com/ecs/). It uses [AWS Fargate](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/AWS_Fargate.html).
|
|
66
|
+
*
|
|
67
|
+
* :::note
|
|
68
|
+
* This component is not meant to be created directly.
|
|
69
|
+
* :::
|
|
70
|
+
*
|
|
71
|
+
* This component is returned by the `addService` method of the `Cluster` component.
|
|
72
|
+
*/
|
|
73
|
+
export class Service extends Component implements Link.Linkable {
|
|
74
|
+
private readonly service?: ecs.Service;
|
|
75
|
+
private readonly taskRole: iam.Role;
|
|
76
|
+
private readonly taskDefinition?: ecs.TaskDefinition;
|
|
77
|
+
private readonly loadBalancer?: lb.LoadBalancer;
|
|
78
|
+
private readonly domain?: Output<string | undefined>;
|
|
79
|
+
private readonly _url?: Output<string>;
|
|
80
|
+
private readonly devUrl?: Output<string>;
|
|
81
|
+
|
|
82
|
+
constructor(
|
|
83
|
+
name: string,
|
|
84
|
+
args: ServiceArgs,
|
|
85
|
+
opts?: ComponentResourceOptions,
|
|
86
|
+
) {
|
|
87
|
+
super(__pulumiType, name, args, opts);
|
|
88
|
+
|
|
89
|
+
const self = this;
|
|
90
|
+
|
|
91
|
+
const cluster = output(args.cluster);
|
|
92
|
+
const vpc = normalizeVpc();
|
|
93
|
+
const region = normalizeRegion();
|
|
94
|
+
const architecture = normalizeArchitecture();
|
|
95
|
+
const imageArgs = normalizeImage();
|
|
96
|
+
const cpu = normalizeCpu();
|
|
97
|
+
const memory = normalizeMemory();
|
|
98
|
+
const storage = normalizeStorage();
|
|
99
|
+
const scaling = normalizeScaling();
|
|
100
|
+
const logging = normalizeLogging();
|
|
101
|
+
const pub = normalizePublic();
|
|
102
|
+
|
|
103
|
+
const linkData = buildLinkData();
|
|
104
|
+
const linkPermissions = buildLinkPermissions();
|
|
105
|
+
|
|
106
|
+
const taskRole = createTaskRole();
|
|
107
|
+
this.taskRole = taskRole;
|
|
108
|
+
|
|
109
|
+
if ($dev) {
|
|
110
|
+
this.devUrl = !pub ? undefined : output(args.dev?.url ?? URL_UNAVAILABLE);
|
|
111
|
+
registerReceiver();
|
|
112
|
+
return;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
const bootstrapData = region.apply((region) => bootstrap.forRegion(region));
|
|
116
|
+
const executionRole = createExecutionRole();
|
|
117
|
+
const image = createImage();
|
|
118
|
+
const logGroup = createLogGroup();
|
|
119
|
+
const taskDefinition = createTaskDefinition();
|
|
120
|
+
const { cert, arn: certificateArn } = createSsl();
|
|
121
|
+
const { loadBalancer, targets } = createLoadBalancer();
|
|
122
|
+
const service = createService();
|
|
123
|
+
createAutoScaling();
|
|
124
|
+
createDnsRecords();
|
|
125
|
+
|
|
126
|
+
this.service = service;
|
|
127
|
+
this.taskDefinition = taskDefinition;
|
|
128
|
+
this.loadBalancer = loadBalancer;
|
|
129
|
+
this.domain = pub?.domain
|
|
130
|
+
? pub.domain.apply((domain) => domain?.name)
|
|
131
|
+
: output(undefined);
|
|
132
|
+
this._url = !self.loadBalancer
|
|
133
|
+
? undefined
|
|
134
|
+
: all([self.domain, self.loadBalancer?.dnsName]).apply(
|
|
135
|
+
([domain, loadBalancer]) =>
|
|
136
|
+
domain ? `https://${domain}/` : `http://${loadBalancer}`,
|
|
137
|
+
);
|
|
138
|
+
|
|
139
|
+
registerHint();
|
|
140
|
+
registerReceiver();
|
|
141
|
+
|
|
142
|
+
function normalizeVpc() {
|
|
143
|
+
// "vpc" is a Vpc component
|
|
144
|
+
if (args.vpc instanceof Vpc) {
|
|
145
|
+
const result = {
|
|
146
|
+
id: args.vpc.id,
|
|
147
|
+
publicSubnets: args.vpc.publicSubnets,
|
|
148
|
+
privateSubnets: args.vpc.privateSubnets,
|
|
149
|
+
securityGroups: args.vpc.securityGroups,
|
|
150
|
+
};
|
|
151
|
+
return args.vpc.nodes.natGateways.apply((natGateways) => {
|
|
152
|
+
if (natGateways.length === 0)
|
|
153
|
+
throw new VisibleError(
|
|
154
|
+
`The VPC configured for the service does not have NAT enabled. Enable NAT by configuring "nat" on the "sst.aws.Vpc" component.`,
|
|
155
|
+
);
|
|
156
|
+
return result;
|
|
157
|
+
});
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
// "vpc" is object
|
|
161
|
+
return output(args.vpc);
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
function normalizeRegion() {
|
|
165
|
+
return getRegionOutput(undefined, { parent: self }).region;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
function normalizeArchitecture() {
|
|
169
|
+
return output(args.architecture ?? "x86_64").apply((v) => v);
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
function normalizeImage() {
|
|
173
|
+
return all([args.image ?? {}, architecture]).apply(
|
|
174
|
+
([image, architecture]) => ({
|
|
175
|
+
...image,
|
|
176
|
+
context: image.context ?? ".",
|
|
177
|
+
platform:
|
|
178
|
+
architecture === "arm64"
|
|
179
|
+
? Platform.Linux_arm64
|
|
180
|
+
: Platform.Linux_amd64,
|
|
181
|
+
}),
|
|
182
|
+
);
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
function normalizeCpu() {
|
|
186
|
+
return output(args.cpu ?? "0.25 vCPU").apply((v) => {
|
|
187
|
+
if (!supportedCpus[v]) {
|
|
188
|
+
throw new Error(
|
|
189
|
+
`Unsupported CPU: ${v}. The supported values for CPU are ${Object.keys(
|
|
190
|
+
supportedCpus,
|
|
191
|
+
).join(", ")}`,
|
|
192
|
+
);
|
|
193
|
+
}
|
|
194
|
+
return v;
|
|
195
|
+
});
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
function normalizeMemory() {
|
|
199
|
+
return all([cpu, args.memory ?? "0.5 GB"]).apply(([cpu, v]) => {
|
|
200
|
+
if (!(v in supportedMemories[cpu])) {
|
|
201
|
+
throw new Error(
|
|
202
|
+
`Unsupported memory: ${v}. The supported values for memory for a ${cpu} CPU are ${Object.keys(
|
|
203
|
+
supportedMemories[cpu],
|
|
204
|
+
).join(", ")}`,
|
|
205
|
+
);
|
|
206
|
+
}
|
|
207
|
+
return v;
|
|
208
|
+
});
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
function normalizeStorage() {
|
|
212
|
+
return output(args.storage ?? "21 GB").apply((v) => {
|
|
213
|
+
const storage = toGBs(v);
|
|
214
|
+
if (storage < 21 || storage > 200)
|
|
215
|
+
throw new Error(
|
|
216
|
+
`Unsupported storage: ${v}. The supported value for storage is between "21 GB" and "200 GB"`,
|
|
217
|
+
);
|
|
218
|
+
return v;
|
|
219
|
+
});
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
function normalizeScaling() {
|
|
223
|
+
return output(args.scaling).apply((v) => ({
|
|
224
|
+
min: v?.min ?? 1,
|
|
225
|
+
max: v?.max ?? 1,
|
|
226
|
+
cpuUtilization: v?.cpuUtilization ?? 70,
|
|
227
|
+
memoryUtilization: v?.memoryUtilization ?? 70,
|
|
228
|
+
}));
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
function normalizeLogging() {
|
|
232
|
+
return output(args.logging).apply((logging) => ({
|
|
233
|
+
...logging,
|
|
234
|
+
retention: logging?.retention ?? "1 month",
|
|
235
|
+
}));
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
function normalizePublic() {
|
|
239
|
+
if (!args.public) return;
|
|
240
|
+
|
|
241
|
+
const ports = output(args.public).apply((pub) => {
|
|
242
|
+
// validate ports
|
|
243
|
+
if (!pub.ports || pub.ports.length === 0)
|
|
244
|
+
throw new VisibleError(
|
|
245
|
+
`You must provide the ports to expose via "public.ports".`,
|
|
246
|
+
);
|
|
247
|
+
|
|
248
|
+
// parse protocols and ports
|
|
249
|
+
const ports = pub.ports.map((v) => {
|
|
250
|
+
const listenParts = v.listen.split("/");
|
|
251
|
+
const forwardParts = v.forward ? v.forward.split("/") : listenParts;
|
|
252
|
+
return {
|
|
253
|
+
listenPort: parseInt(listenParts[0]),
|
|
254
|
+
listenProtocol: listenParts[1],
|
|
255
|
+
forwardPort: parseInt(forwardParts[0]),
|
|
256
|
+
forwardProtocol: forwardParts[1],
|
|
257
|
+
};
|
|
258
|
+
});
|
|
259
|
+
|
|
260
|
+
// validate protocols are consistent
|
|
261
|
+
const appProtocols = ports.filter(
|
|
262
|
+
(port) =>
|
|
263
|
+
["http", "https"].includes(port.listenProtocol) &&
|
|
264
|
+
["http", "https"].includes(port.forwardProtocol),
|
|
265
|
+
);
|
|
266
|
+
if (appProtocols.length > 0 && appProtocols.length < ports.length)
|
|
267
|
+
throw new VisibleError(
|
|
268
|
+
`Protocols must be either all http/https, or all tcp/udp/tcp_udp/tls.`,
|
|
269
|
+
);
|
|
270
|
+
|
|
271
|
+
// validate certificate exists for https/tls protocol
|
|
272
|
+
ports.forEach((port) => {
|
|
273
|
+
if (["https", "tls"].includes(port.listenProtocol) && !pub.domain) {
|
|
274
|
+
throw new VisibleError(
|
|
275
|
+
`You must provide a custom domain for ${port.listenProtocol.toUpperCase()} protocol.`,
|
|
276
|
+
);
|
|
277
|
+
}
|
|
278
|
+
});
|
|
279
|
+
|
|
280
|
+
return ports;
|
|
281
|
+
});
|
|
282
|
+
|
|
283
|
+
const domain = output(args.public).apply((pub) => {
|
|
284
|
+
if (!pub.domain) return undefined;
|
|
285
|
+
|
|
286
|
+
// normalize domain
|
|
287
|
+
const domain =
|
|
288
|
+
typeof pub.domain === "string" ? { name: pub.domain } : pub.domain;
|
|
289
|
+
return {
|
|
290
|
+
name: domain.name,
|
|
291
|
+
dns: domain.dns === false ? undefined : domain.dns ?? awsDns(),
|
|
292
|
+
cert: domain.cert,
|
|
293
|
+
};
|
|
294
|
+
});
|
|
295
|
+
|
|
296
|
+
return { ports, domain };
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
function buildLinkData() {
|
|
300
|
+
return output(args.link || []).apply((links) => Link.build(links));
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
function buildLinkPermissions() {
|
|
304
|
+
return Link.getInclude<Permission>("aws.permission", args.link);
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
function createImage() {
|
|
308
|
+
// Edit .dockerignore file
|
|
309
|
+
const imageArgsNew = imageArgs.apply((imageArgs) => {
|
|
310
|
+
const context = path.join($cli.paths.root, imageArgs.context);
|
|
311
|
+
const dockerfile = imageArgs.dockerfile ?? "Dockerfile";
|
|
312
|
+
|
|
313
|
+
// get .dockerignore file
|
|
314
|
+
const file = (() => {
|
|
315
|
+
let filePath = path.join(context, `${dockerfile}.dockerignore`);
|
|
316
|
+
if (fs.existsSync(filePath)) return filePath;
|
|
317
|
+
filePath = path.join(context, ".dockerignore");
|
|
318
|
+
if (fs.existsSync(filePath)) return filePath;
|
|
319
|
+
})();
|
|
320
|
+
|
|
321
|
+
// add .sst to .dockerignore if not exist
|
|
322
|
+
const content = file ? fs.readFileSync(file).toString() : "";
|
|
323
|
+
const lines = content.split("\n");
|
|
324
|
+
if (!lines.find((line) => line === ".sst")) {
|
|
325
|
+
fs.writeFileSync(
|
|
326
|
+
file ?? path.join(context, ".dockerignore"),
|
|
327
|
+
[...lines, "", "# sst", ".sst"].join("\n"),
|
|
328
|
+
);
|
|
329
|
+
}
|
|
330
|
+
return imageArgs;
|
|
331
|
+
});
|
|
332
|
+
|
|
333
|
+
// Build image
|
|
334
|
+
return new Image(
|
|
335
|
+
...transform(
|
|
336
|
+
args.transform?.image,
|
|
337
|
+
`${name}Image`,
|
|
338
|
+
{
|
|
339
|
+
context: {
|
|
340
|
+
location: imageArgsNew.apply((v) =>
|
|
341
|
+
path.join($cli.paths.root, v.context),
|
|
342
|
+
),
|
|
343
|
+
},
|
|
344
|
+
dockerfile: {
|
|
345
|
+
location: imageArgsNew.apply((v) =>
|
|
346
|
+
v.dockerfile
|
|
347
|
+
? path.join($cli.paths.root, v.dockerfile)
|
|
348
|
+
: path.join($cli.paths.root, v.context, "Dockerfile"),
|
|
349
|
+
),
|
|
350
|
+
},
|
|
351
|
+
buildArgs: imageArgsNew.apply((v) => v.args ?? {}),
|
|
352
|
+
platforms: [imageArgs.platform],
|
|
353
|
+
tags: [interpolate`${bootstrapData.assetEcrUrl}:${name}`],
|
|
354
|
+
registries: [
|
|
355
|
+
ecr
|
|
356
|
+
.getAuthorizationTokenOutput({
|
|
357
|
+
registryId: bootstrapData.assetEcrRegistryId,
|
|
358
|
+
})
|
|
359
|
+
.apply((authToken) => ({
|
|
360
|
+
address: authToken.proxyEndpoint,
|
|
361
|
+
password: secret(authToken.password),
|
|
362
|
+
username: authToken.userName,
|
|
363
|
+
})),
|
|
364
|
+
],
|
|
365
|
+
push: true,
|
|
366
|
+
},
|
|
367
|
+
{ parent: self },
|
|
368
|
+
),
|
|
369
|
+
);
|
|
370
|
+
}
|
|
371
|
+
|
|
372
|
+
function createLoadBalancer() {
|
|
373
|
+
if (!pub) return {};
|
|
374
|
+
|
|
375
|
+
const securityGroup = new ec2.SecurityGroup(
|
|
376
|
+
...transform(
|
|
377
|
+
args?.transform?.loadBalancerSecurityGroup,
|
|
378
|
+
`${name}LoadBalancerSecurityGroup`,
|
|
379
|
+
{
|
|
380
|
+
vpcId: vpc.id,
|
|
381
|
+
egress: [
|
|
382
|
+
{
|
|
383
|
+
fromPort: 0,
|
|
384
|
+
toPort: 0,
|
|
385
|
+
protocol: "-1",
|
|
386
|
+
cidrBlocks: ["0.0.0.0/0"],
|
|
387
|
+
},
|
|
388
|
+
],
|
|
389
|
+
ingress: [
|
|
390
|
+
{
|
|
391
|
+
fromPort: 0,
|
|
392
|
+
toPort: 0,
|
|
393
|
+
protocol: "-1",
|
|
394
|
+
cidrBlocks: ["0.0.0.0/0"],
|
|
395
|
+
},
|
|
396
|
+
],
|
|
397
|
+
},
|
|
398
|
+
{ parent: self },
|
|
399
|
+
),
|
|
400
|
+
);
|
|
401
|
+
|
|
402
|
+
const loadBalancer = new lb.LoadBalancer(
|
|
403
|
+
...transform(
|
|
404
|
+
args.transform?.loadBalancer,
|
|
405
|
+
`${name}LoadBalancer`,
|
|
406
|
+
{
|
|
407
|
+
internal: false,
|
|
408
|
+
loadBalancerType: pub.ports.apply((ports) =>
|
|
409
|
+
ports[0].listenProtocol.startsWith("http")
|
|
410
|
+
? "application"
|
|
411
|
+
: "network",
|
|
412
|
+
),
|
|
413
|
+
subnets: vpc.publicSubnets,
|
|
414
|
+
securityGroups: [securityGroup.id],
|
|
415
|
+
enableCrossZoneLoadBalancing: true,
|
|
416
|
+
},
|
|
417
|
+
{
|
|
418
|
+
parent: self,
|
|
419
|
+
// Depend on the certificate, so on remove the load balancer is
|
|
420
|
+
// deleted before it. A plain array, so a `transform` can add to
|
|
421
|
+
// it; an undefined certificate adds no dependency.
|
|
422
|
+
dependsOn: [cert as Output<DnsValidatedCertificate>],
|
|
423
|
+
},
|
|
424
|
+
),
|
|
425
|
+
);
|
|
426
|
+
|
|
427
|
+
const ret = all([pub.ports, certificateArn]).apply(([ports, cert]) => {
|
|
428
|
+
const listeners: Record<string, lb.Listener> = {};
|
|
429
|
+
const targets: Record<string, lb.TargetGroup> = {};
|
|
430
|
+
|
|
431
|
+
ports.forEach((port) => {
|
|
432
|
+
const forwardProtocol = port.forwardProtocol.toUpperCase();
|
|
433
|
+
const forwardPort = port.forwardPort;
|
|
434
|
+
const targetId = `${forwardProtocol}${forwardPort}`;
|
|
435
|
+
const target =
|
|
436
|
+
targets[targetId] ??
|
|
437
|
+
new lb.TargetGroup(
|
|
438
|
+
...transform(
|
|
439
|
+
args.transform?.target,
|
|
440
|
+
`${name}Target${targetId}`,
|
|
441
|
+
{
|
|
442
|
+
// TargetGroup names allow for 32 chars, but an 8 letter suffix
|
|
443
|
+
// ie. "-1234567" is automatically added.
|
|
444
|
+
// - If we don't specify "name" or "namePrefix", we need to ensure
|
|
445
|
+
// the component name is less than 24 chars. Hard to guarantee.
|
|
446
|
+
// - If we specify "name", we need to ensure the $app-$stage-$name
|
|
447
|
+
// if less than 32 chars. Hard to guarantee.
|
|
448
|
+
// - Hence we will use "namePrefix".
|
|
449
|
+
namePrefix: forwardProtocol,
|
|
450
|
+
port: forwardPort,
|
|
451
|
+
protocol: forwardProtocol,
|
|
452
|
+
targetType: "ip",
|
|
453
|
+
vpcId: vpc.id,
|
|
454
|
+
},
|
|
455
|
+
{ parent: self },
|
|
456
|
+
),
|
|
457
|
+
);
|
|
458
|
+
targets[targetId] = target;
|
|
459
|
+
|
|
460
|
+
const listenProtocol = port.listenProtocol.toUpperCase();
|
|
461
|
+
const listenPort = port.listenPort;
|
|
462
|
+
const listenerId = `${listenProtocol}${listenPort}`;
|
|
463
|
+
const listener =
|
|
464
|
+
listeners[listenerId] ??
|
|
465
|
+
new lb.Listener(
|
|
466
|
+
...transform(
|
|
467
|
+
args.transform?.listener,
|
|
468
|
+
`${name}Listener${listenerId}`,
|
|
469
|
+
{
|
|
470
|
+
loadBalancerArn: loadBalancer.arn,
|
|
471
|
+
port: listenPort,
|
|
472
|
+
protocol: listenProtocol,
|
|
473
|
+
certificateArn: ["HTTPS", "TLS"].includes(listenProtocol)
|
|
474
|
+
? cert
|
|
475
|
+
: undefined,
|
|
476
|
+
defaultActions: [
|
|
477
|
+
{
|
|
478
|
+
type: "forward",
|
|
479
|
+
targetGroupArn: target.arn,
|
|
480
|
+
},
|
|
481
|
+
],
|
|
482
|
+
},
|
|
483
|
+
{ parent: self },
|
|
484
|
+
),
|
|
485
|
+
);
|
|
486
|
+
listeners[listenerId] = listener;
|
|
487
|
+
});
|
|
488
|
+
|
|
489
|
+
return { listeners, targets };
|
|
490
|
+
});
|
|
491
|
+
|
|
492
|
+
return { loadBalancer, targets: ret.targets };
|
|
493
|
+
}
|
|
494
|
+
|
|
495
|
+
function createSsl() {
|
|
496
|
+
if (!pub) {
|
|
497
|
+
return {
|
|
498
|
+
cert: output<DnsValidatedCertificate | undefined>(undefined),
|
|
499
|
+
arn: output<string | undefined>(undefined),
|
|
500
|
+
};
|
|
501
|
+
}
|
|
502
|
+
|
|
503
|
+
const cert = pub.domain.apply((domain) => {
|
|
504
|
+
if (!domain || domain.cert) return undefined;
|
|
505
|
+
|
|
506
|
+
return new DnsValidatedCertificate(
|
|
507
|
+
`${name}Ssl`,
|
|
508
|
+
{
|
|
509
|
+
domainName: domain.name,
|
|
510
|
+
dns: domain.dns!,
|
|
511
|
+
},
|
|
512
|
+
{ parent: self },
|
|
513
|
+
);
|
|
514
|
+
});
|
|
515
|
+
return {
|
|
516
|
+
cert,
|
|
517
|
+
arn: all([pub.domain, cert]).apply(([domain, cert]) => {
|
|
518
|
+
if (!domain) return undefined;
|
|
519
|
+
if (domain.cert) return domain.cert;
|
|
520
|
+
// `cert` is set whenever there's a domain without `cert`, since
|
|
521
|
+
// both come from the same `domain` value.
|
|
522
|
+
return cert!.arn;
|
|
523
|
+
}),
|
|
524
|
+
};
|
|
525
|
+
}
|
|
526
|
+
|
|
527
|
+
function createLogGroup() {
|
|
528
|
+
return new cloudwatch.LogGroup(
|
|
529
|
+
...transform(
|
|
530
|
+
args.transform?.logGroup,
|
|
531
|
+
`${name}LogGroup`,
|
|
532
|
+
{
|
|
533
|
+
name: interpolate`/sst/cluster/${cluster.name}/${name}`,
|
|
534
|
+
retentionInDays: logging.apply(
|
|
535
|
+
(logging) => RETENTION[logging.retention],
|
|
536
|
+
),
|
|
537
|
+
},
|
|
538
|
+
{ parent: self },
|
|
539
|
+
),
|
|
540
|
+
);
|
|
541
|
+
}
|
|
542
|
+
|
|
543
|
+
function createTaskRole() {
|
|
544
|
+
const policy = all([args.permissions || [], linkPermissions]).apply(
|
|
545
|
+
([argsPermissions, linkPermissions]) =>
|
|
546
|
+
iam.getPolicyDocumentOutput({
|
|
547
|
+
statements: [...argsPermissions, ...linkPermissions].map(
|
|
548
|
+
(item) => ({
|
|
549
|
+
effect: (() => {
|
|
550
|
+
const effect = item.effect ?? "allow";
|
|
551
|
+
return effect.charAt(0).toUpperCase() + effect.slice(1);
|
|
552
|
+
})(),
|
|
553
|
+
actions: item.actions,
|
|
554
|
+
resources: item.resources,
|
|
555
|
+
conditions: "conditions" in item ? item.conditions : undefined,
|
|
556
|
+
}),
|
|
557
|
+
),
|
|
558
|
+
}),
|
|
559
|
+
);
|
|
560
|
+
|
|
561
|
+
return new iam.Role(
|
|
562
|
+
...transform(
|
|
563
|
+
args.transform?.taskRole,
|
|
564
|
+
`${name}TaskRole`,
|
|
565
|
+
{
|
|
566
|
+
assumeRolePolicy: !$dev
|
|
567
|
+
? iam.assumeRolePolicyForPrincipal({
|
|
568
|
+
Service: "ecs-tasks.amazonaws.com",
|
|
569
|
+
})
|
|
570
|
+
: iam.assumeRolePolicyForPrincipal({
|
|
571
|
+
AWS: interpolate`arn:aws:iam::${
|
|
572
|
+
getCallerIdentityOutput().accountId
|
|
573
|
+
}:root`,
|
|
574
|
+
}),
|
|
575
|
+
inlinePolicies: policy.apply(({ statements }) =>
|
|
576
|
+
statements ? [{ name: "inline", policy: policy.json }] : [],
|
|
577
|
+
),
|
|
578
|
+
},
|
|
579
|
+
{ parent: self },
|
|
580
|
+
),
|
|
581
|
+
);
|
|
582
|
+
}
|
|
583
|
+
|
|
584
|
+
function createExecutionRole() {
|
|
585
|
+
return new iam.Role(
|
|
586
|
+
`${name}ExecutionRole`,
|
|
587
|
+
{
|
|
588
|
+
assumeRolePolicy: iam.assumeRolePolicyForPrincipal({
|
|
589
|
+
Service: "ecs-tasks.amazonaws.com",
|
|
590
|
+
}),
|
|
591
|
+
managedPolicyArns: [
|
|
592
|
+
"arn:aws:iam::aws:policy/service-role/AmazonECSTaskExecutionRolePolicy",
|
|
593
|
+
],
|
|
594
|
+
},
|
|
595
|
+
{ parent: self },
|
|
596
|
+
);
|
|
597
|
+
}
|
|
598
|
+
|
|
599
|
+
function createTaskDefinition() {
|
|
600
|
+
return new ecs.TaskDefinition(
|
|
601
|
+
...transform(
|
|
602
|
+
args.transform?.taskDefinition,
|
|
603
|
+
`${name}Task`,
|
|
604
|
+
{
|
|
605
|
+
family: interpolate`${cluster.name}-${name}`,
|
|
606
|
+
trackLatest: true,
|
|
607
|
+
cpu: cpu.apply((v) => toNumber(v).toString()),
|
|
608
|
+
memory: memory.apply((v) => toMBs(v).toString()),
|
|
609
|
+
networkMode: "awsvpc",
|
|
610
|
+
ephemeralStorage: {
|
|
611
|
+
sizeInGib: storage.apply((v) => toGBs(v)),
|
|
612
|
+
},
|
|
613
|
+
requiresCompatibilities: ["FARGATE"],
|
|
614
|
+
runtimePlatform: {
|
|
615
|
+
cpuArchitecture: architecture.apply((v) => v.toUpperCase()),
|
|
616
|
+
operatingSystemFamily: "LINUX",
|
|
617
|
+
},
|
|
618
|
+
executionRoleArn: executionRole.arn,
|
|
619
|
+
taskRoleArn: taskRole.arn,
|
|
620
|
+
containerDefinitions: $jsonStringify([
|
|
621
|
+
{
|
|
622
|
+
name,
|
|
623
|
+
image: interpolate`${bootstrapData.assetEcrUrl}@${image.digest}`,
|
|
624
|
+
pseudoTerminal: true,
|
|
625
|
+
portMappings: pub?.ports.apply((ports) =>
|
|
626
|
+
ports
|
|
627
|
+
.map((port) => port.forwardPort)
|
|
628
|
+
// ensure unique ports
|
|
629
|
+
.filter(
|
|
630
|
+
(value, index, self) => self.indexOf(value) === index,
|
|
631
|
+
)
|
|
632
|
+
.map((value) => ({ containerPort: value })),
|
|
633
|
+
),
|
|
634
|
+
logConfiguration: {
|
|
635
|
+
logDriver: "awslogs",
|
|
636
|
+
options: {
|
|
637
|
+
"awslogs-group": logGroup.name,
|
|
638
|
+
"awslogs-region": region,
|
|
639
|
+
"awslogs-stream-prefix": "/service",
|
|
640
|
+
},
|
|
641
|
+
},
|
|
642
|
+
environment: all([args.environment ?? [], linkData]).apply(
|
|
643
|
+
([env, linkData]) => [
|
|
644
|
+
...Object.entries(env).map(([name, value]) => ({
|
|
645
|
+
name,
|
|
646
|
+
value,
|
|
647
|
+
})),
|
|
648
|
+
...linkData.map((d) => ({
|
|
649
|
+
name: `SST_RESOURCE_${d.name}`,
|
|
650
|
+
value: JSON.stringify(d.properties),
|
|
651
|
+
})),
|
|
652
|
+
{
|
|
653
|
+
name: "SST_RESOURCE_App",
|
|
654
|
+
value: JSON.stringify({
|
|
655
|
+
name: $app.name,
|
|
656
|
+
stage: $app.stage,
|
|
657
|
+
}),
|
|
658
|
+
},
|
|
659
|
+
],
|
|
660
|
+
),
|
|
661
|
+
},
|
|
662
|
+
]),
|
|
663
|
+
},
|
|
664
|
+
{ parent: self },
|
|
665
|
+
),
|
|
666
|
+
);
|
|
667
|
+
}
|
|
668
|
+
|
|
669
|
+
function createService() {
|
|
670
|
+
return new ecs.Service(
|
|
671
|
+
...transform(
|
|
672
|
+
args.transform?.service,
|
|
673
|
+
`${name}Service`,
|
|
674
|
+
{
|
|
675
|
+
name,
|
|
676
|
+
cluster: cluster.arn,
|
|
677
|
+
taskDefinition: taskDefinition.arn,
|
|
678
|
+
desiredCount: scaling.min,
|
|
679
|
+
launchType: "FARGATE",
|
|
680
|
+
networkConfiguration: {
|
|
681
|
+
assignPublicIp: false,
|
|
682
|
+
subnets: vpc.privateSubnets,
|
|
683
|
+
securityGroups: vpc.securityGroups,
|
|
684
|
+
},
|
|
685
|
+
deploymentCircuitBreaker: {
|
|
686
|
+
enable: true,
|
|
687
|
+
rollback: true,
|
|
688
|
+
},
|
|
689
|
+
loadBalancers:
|
|
690
|
+
targets &&
|
|
691
|
+
targets.apply((targets) =>
|
|
692
|
+
Object.values(targets).map((target) => ({
|
|
693
|
+
targetGroupArn: target.arn,
|
|
694
|
+
containerName: name,
|
|
695
|
+
containerPort: target.port.apply((port) => port!),
|
|
696
|
+
})),
|
|
697
|
+
),
|
|
698
|
+
},
|
|
699
|
+
{ parent: self },
|
|
700
|
+
),
|
|
701
|
+
);
|
|
702
|
+
}
|
|
703
|
+
|
|
704
|
+
function createAutoScaling() {
|
|
705
|
+
const target = new appautoscaling.Target(
|
|
706
|
+
`${name}AutoScalingTarget`,
|
|
707
|
+
{
|
|
708
|
+
serviceNamespace: "ecs",
|
|
709
|
+
scalableDimension: "ecs:service:DesiredCount",
|
|
710
|
+
resourceId: interpolate`service/${cluster.name}/${service.name}`,
|
|
711
|
+
maxCapacity: scaling.max,
|
|
712
|
+
minCapacity: scaling.min,
|
|
713
|
+
},
|
|
714
|
+
{ parent: self },
|
|
715
|
+
);
|
|
716
|
+
|
|
717
|
+
new appautoscaling.Policy(
|
|
718
|
+
`${name}AutoScalingCpuPolicy`,
|
|
719
|
+
{
|
|
720
|
+
serviceNamespace: target.serviceNamespace,
|
|
721
|
+
scalableDimension: target.scalableDimension,
|
|
722
|
+
resourceId: target.resourceId,
|
|
723
|
+
policyType: "TargetTrackingScaling",
|
|
724
|
+
targetTrackingScalingPolicyConfiguration: {
|
|
725
|
+
predefinedMetricSpecification: {
|
|
726
|
+
predefinedMetricType: "ECSServiceAverageCPUUtilization",
|
|
727
|
+
},
|
|
728
|
+
targetValue: scaling.cpuUtilization,
|
|
729
|
+
},
|
|
730
|
+
},
|
|
731
|
+
{ parent: self },
|
|
732
|
+
);
|
|
733
|
+
|
|
734
|
+
new appautoscaling.Policy(
|
|
735
|
+
`${name}AutoScalingMemoryPolicy`,
|
|
736
|
+
{
|
|
737
|
+
serviceNamespace: target.serviceNamespace,
|
|
738
|
+
scalableDimension: target.scalableDimension,
|
|
739
|
+
resourceId: target.resourceId,
|
|
740
|
+
policyType: "TargetTrackingScaling",
|
|
741
|
+
targetTrackingScalingPolicyConfiguration: {
|
|
742
|
+
predefinedMetricSpecification: {
|
|
743
|
+
predefinedMetricType: "ECSServiceAverageMemoryUtilization",
|
|
744
|
+
},
|
|
745
|
+
targetValue: scaling.memoryUtilization,
|
|
746
|
+
},
|
|
747
|
+
},
|
|
748
|
+
{ parent: self },
|
|
749
|
+
);
|
|
750
|
+
}
|
|
751
|
+
|
|
752
|
+
function createDnsRecords() {
|
|
753
|
+
if (!pub) return;
|
|
754
|
+
|
|
755
|
+
pub.domain.apply((domain) => {
|
|
756
|
+
if (!domain?.dns) return;
|
|
757
|
+
|
|
758
|
+
domain.dns.createAlias(
|
|
759
|
+
name,
|
|
760
|
+
{
|
|
761
|
+
name: domain.name,
|
|
762
|
+
aliasName: loadBalancer!.dnsName,
|
|
763
|
+
aliasZone: loadBalancer!.zoneId,
|
|
764
|
+
},
|
|
765
|
+
{ parent: self },
|
|
766
|
+
);
|
|
767
|
+
});
|
|
768
|
+
}
|
|
769
|
+
|
|
770
|
+
function registerHint() {
|
|
771
|
+
self.registerOutputs({ _hint: self._url });
|
|
772
|
+
}
|
|
773
|
+
|
|
774
|
+
function registerReceiver() {
|
|
775
|
+
self.registerOutputs({
|
|
776
|
+
_dev: imageArgs.apply((imageArgs) => ({
|
|
777
|
+
links: linkData.apply((input) => input.map((item) => item.name)),
|
|
778
|
+
environment: {
|
|
779
|
+
...args.environment,
|
|
780
|
+
AWS_REGION: region,
|
|
781
|
+
},
|
|
782
|
+
aws: {
|
|
783
|
+
role: taskRole.arn,
|
|
784
|
+
},
|
|
785
|
+
autostart: output(args.dev?.autostart).apply((val) => val ?? true),
|
|
786
|
+
directory: output(args.dev?.directory).apply(
|
|
787
|
+
(dir) =>
|
|
788
|
+
dir ||
|
|
789
|
+
path.join(
|
|
790
|
+
imageArgs.dockerfile
|
|
791
|
+
? path.dirname(imageArgs.dockerfile)
|
|
792
|
+
: imageArgs.context,
|
|
793
|
+
),
|
|
794
|
+
),
|
|
795
|
+
command: args.dev?.command,
|
|
796
|
+
})),
|
|
797
|
+
});
|
|
798
|
+
}
|
|
799
|
+
}
|
|
800
|
+
|
|
801
|
+
/**
|
|
802
|
+
* The URL of the service.
|
|
803
|
+
*
|
|
804
|
+
* If `public.domain` is set, this is the URL with the custom domain.
|
|
805
|
+
* Otherwise, it's the auto-generated load balancer URL.
|
|
806
|
+
*/
|
|
807
|
+
public get url() {
|
|
808
|
+
const errorMessage =
|
|
809
|
+
"Cannot access the URL because no public ports are exposed.";
|
|
810
|
+
if ($dev) {
|
|
811
|
+
if (!this.devUrl) throw new VisibleError(errorMessage);
|
|
812
|
+
return this.devUrl;
|
|
813
|
+
}
|
|
814
|
+
|
|
815
|
+
if (!this._url) throw new VisibleError(errorMessage);
|
|
816
|
+
return this._url;
|
|
817
|
+
}
|
|
818
|
+
|
|
819
|
+
/**
|
|
820
|
+
* The underlying [resources](/docs/components/#nodes) this component creates.
|
|
821
|
+
*/
|
|
822
|
+
public get nodes() {
|
|
823
|
+
const self = this;
|
|
824
|
+
return {
|
|
825
|
+
/**
|
|
826
|
+
* The Amazon ECS Service.
|
|
827
|
+
*/
|
|
828
|
+
get service() {
|
|
829
|
+
if ($dev)
|
|
830
|
+
throw new VisibleError("Cannot access `nodes.service` in dev mode.");
|
|
831
|
+
return self.service!;
|
|
832
|
+
},
|
|
833
|
+
/**
|
|
834
|
+
* The Amazon ECS Task Role.
|
|
835
|
+
*/
|
|
836
|
+
get taskRole() {
|
|
837
|
+
return self.taskRole;
|
|
838
|
+
},
|
|
839
|
+
/**
|
|
840
|
+
* The Amazon ECS Task Definition.
|
|
841
|
+
*/
|
|
842
|
+
get taskDefinition() {
|
|
843
|
+
if ($dev)
|
|
844
|
+
throw new VisibleError(
|
|
845
|
+
"Cannot access `nodes.taskDefinition` in dev mode.",
|
|
846
|
+
);
|
|
847
|
+
return self.taskDefinition!;
|
|
848
|
+
},
|
|
849
|
+
/**
|
|
850
|
+
* The Amazon Elastic Load Balancer.
|
|
851
|
+
*/
|
|
852
|
+
get loadBalancer() {
|
|
853
|
+
if ($dev)
|
|
854
|
+
throw new VisibleError(
|
|
855
|
+
"Cannot access `nodes.loadBalancer` in dev mode.",
|
|
856
|
+
);
|
|
857
|
+
if (!self.loadBalancer)
|
|
858
|
+
throw new VisibleError(
|
|
859
|
+
"Cannot access `nodes.loadBalancer` when no public ports are exposed.",
|
|
860
|
+
);
|
|
861
|
+
return self.loadBalancer;
|
|
862
|
+
},
|
|
863
|
+
};
|
|
864
|
+
}
|
|
865
|
+
|
|
866
|
+
/** @internal */
|
|
867
|
+
public getSSTLink() {
|
|
868
|
+
return {
|
|
869
|
+
properties: { url: $dev ? this.devUrl : this._url },
|
|
870
|
+
};
|
|
871
|
+
}
|
|
872
|
+
}
|
|
873
|
+
|
|
874
|
+
const __pulumiType = "sst:aws:Service";
|
|
875
|
+
// @ts-expect-error
|
|
876
|
+
Service.__pulumiType = __pulumiType;
|