@takumi-stack/core 1.0.0 → 1.0.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/.dist/common/coordinator.d.ts +18 -0
- package/.dist/common/index.d.ts +6 -0
- package/.dist/common/modifier.d.ts +4 -0
- package/.dist/common/naming/get-deploy-config.d.ts +5 -0
- package/.dist/common/naming/get-domain.d.ts +8 -0
- package/.dist/common/naming/get-function-entry.d.ts +3 -0
- package/.dist/common/naming/get-logical-name.d.ts +2 -0
- package/.dist/common/naming/get-resource-name.d.ts +26 -0
- package/.dist/common/naming/get-service-name.d.ts +9 -0
- package/.dist/common/naming/index.d.ts +8 -0
- package/.dist/common/naming/string-parser.d.ts +4 -0
- package/.dist/common/service.d.ts +21 -0
- package/.dist/common/synth/account-mapping.d.ts +2 -0
- package/.dist/common/synth/assume-role.d.ts +17 -0
- package/.dist/common/synth/get-global-props.d.ts +4 -0
- package/.dist/common/synth/get-service-props.d.ts +3 -0
- package/.dist/common/synth/index.d.ts +8 -0
- package/.dist/common/synth/pre-script.d.ts +21 -0
- package/.dist/common/synth/props-types.d.ts +41 -0
- package/.dist/common/synth/synth-error.d.ts +7 -0
- package/.dist/index.d.ts +4 -0
- package/.dist/package.json +43 -0
- package/.dist/prefab/analytics/events/handlers/ingestion-transform/handler.d.ts +3 -0
- package/.dist/prefab/analytics/events/index.d.ts +28 -0
- package/.dist/prefab/analytics/events/index.d.ts.map +1 -0
- package/.dist/prefab/analytics/events/index.js +163 -0
- package/.dist/prefab/analytics/events/index.js.map +1 -0
- package/.dist/prefab/analytics/index.d.ts +2 -0
- package/.dist/prefab/auth/cognito-pool/index.d.ts +57 -0
- package/.dist/prefab/auth/cognito-pool/index.d.ts.map +1 -0
- package/.dist/prefab/auth/cognito-pool/index.js.map +1 -0
- package/.dist/prefab/auth/index.d.ts +2 -0
- package/.dist/prefab/cdn/cdn-api/index.d.ts +34 -0
- package/.dist/prefab/cdn/cdn-api/index.d.ts.map +1 -0
- package/.dist/prefab/cdn/cdn-api/index.js +153 -0
- package/.dist/prefab/cdn/cdn-api/index.js.map +1 -0
- package/.dist/prefab/cdn/cdn-asset/index.d.ts +24 -0
- package/.dist/prefab/cdn/cdn-asset/index.d.ts.map +1 -0
- package/.dist/prefab/cdn/cdn-asset/index.js +96 -0
- package/.dist/prefab/cdn/cdn-asset/index.js.map +1 -0
- package/.dist/prefab/cdn/cdn-spa/index.d.ts +24 -0
- package/.dist/prefab/cdn/cdn-spa/index.d.ts.map +1 -0
- package/.dist/prefab/cdn/cdn-spa/index.js +138 -0
- package/.dist/prefab/cdn/cdn-spa/index.js.map +1 -0
- package/.dist/prefab/cdn/cdn-ssr/index.d.ts +33 -0
- package/.dist/prefab/cdn/cdn-ssr/index.d.ts.map +1 -0
- package/.dist/prefab/cdn/cdn-ssr/index.js +271 -0
- package/.dist/prefab/cdn/cdn-ssr/index.js.map +1 -0
- package/.dist/prefab/cdn/index.d.ts +5 -0
- package/.dist/prefab/compute/fargate/cluster.d.ts +13 -0
- package/.dist/prefab/compute/fargate/cluster.d.ts.map +1 -0
- package/.dist/prefab/compute/fargate/cluster.js.map +1 -0
- package/.dist/prefab/compute/fargate/index.d.ts +3 -0
- package/.dist/prefab/compute/fargate/service.d.ts +45 -0
- package/.dist/prefab/compute/fargate/service.d.ts.map +1 -0
- package/.dist/prefab/compute/fargate/service.js.map +1 -0
- package/.dist/prefab/compute/function/api-function/api-aggregate.d.ts +31 -0
- package/.dist/prefab/compute/function/api-function/api-aggregate.d.ts.map +1 -0
- package/.dist/prefab/compute/function/api-function/api-aggregate.js +53 -0
- package/.dist/prefab/compute/function/api-function/api-aggregate.js.map +1 -0
- package/.dist/prefab/compute/function/api-function/api-function.d.ts +22 -0
- package/.dist/prefab/compute/function/api-function/api-function.d.ts.map +1 -0
- package/.dist/prefab/compute/function/api-function/api-function.js +44 -0
- package/.dist/prefab/compute/function/api-function/api-function.js.map +1 -0
- package/.dist/prefab/compute/function/api-function/index.d.ts +3 -0
- package/.dist/prefab/compute/function/base-function/index.d.ts +33 -0
- package/.dist/prefab/compute/function/base-function/index.d.ts.map +1 -0
- package/.dist/prefab/compute/function/base-function/index.js +70 -0
- package/.dist/prefab/compute/function/base-function/index.js.map +1 -0
- package/.dist/prefab/compute/function/cognito-function/cognito-aggregate.d.ts +15 -0
- package/.dist/prefab/compute/function/cognito-function/cognito-aggregate.d.ts.map +1 -0
- package/.dist/prefab/compute/function/cognito-function/cognito-aggregate.js.map +1 -0
- package/.dist/prefab/compute/function/cognito-function/cognito-function.d.ts +17 -0
- package/.dist/prefab/compute/function/cognito-function/cognito-function.d.ts.map +1 -0
- package/.dist/prefab/compute/function/cognito-function/cognito-function.js.map +1 -0
- package/.dist/prefab/compute/function/cognito-function/index.d.ts +3 -0
- package/.dist/prefab/compute/function/cron-function/cron-aggregate.d.ts +14 -0
- package/.dist/prefab/compute/function/cron-function/cron-aggregate.d.ts.map +1 -0
- package/.dist/prefab/compute/function/cron-function/cron-aggregate.js.map +1 -0
- package/.dist/prefab/compute/function/cron-function/cron-function.d.ts +15 -0
- package/.dist/prefab/compute/function/cron-function/cron-function.d.ts.map +1 -0
- package/.dist/prefab/compute/function/cron-function/cron-function.js +24 -0
- package/.dist/prefab/compute/function/cron-function/cron-function.js.map +1 -0
- package/.dist/prefab/compute/function/cron-function/index.d.ts +3 -0
- package/.dist/prefab/compute/function/event-function/EventAggregateParams.d.ts +9 -0
- package/.dist/prefab/compute/function/event-function/EventAggregateParams.d.ts.map +1 -0
- package/.dist/prefab/compute/function/event-function/EventAggregateParams.js +3 -0
- package/.dist/prefab/compute/function/event-function/EventAggregateParams.js.map +1 -0
- package/.dist/prefab/compute/function/event-function/event-aggregate.d.ts +16 -0
- package/.dist/prefab/compute/function/event-function/event-aggregate.d.ts.map +1 -0
- package/.dist/prefab/compute/function/event-function/event-aggregate.js.map +1 -0
- package/.dist/prefab/compute/function/event-function/event-function.d.ts +14 -0
- package/.dist/prefab/compute/function/event-function/event-function.d.ts.map +1 -0
- package/.dist/prefab/compute/function/event-function/event-function.js.map +1 -0
- package/.dist/prefab/compute/function/event-function/index.d.ts +3 -0
- package/.dist/prefab/compute/function/index.d.ts +8 -0
- package/.dist/prefab/compute/function/queue-function/index.d.ts +22 -0
- package/.dist/prefab/compute/function/queue-function/index.d.ts.map +1 -0
- package/.dist/prefab/compute/function/queue-function/index.js +46 -0
- package/.dist/prefab/compute/function/queue-function/index.js.map +1 -0
- package/.dist/prefab/compute/function/topic-function/index.d.ts +20 -0
- package/.dist/prefab/compute/function/topic-function/index.d.ts.map +1 -0
- package/.dist/prefab/compute/function/topic-function/index.js +23 -0
- package/.dist/prefab/compute/function/topic-function/index.js.map +1 -0
- package/.dist/prefab/compute/index.d.ts +3 -0
- package/.dist/prefab/database/dynamo/index.d.ts +13 -0
- package/.dist/prefab/database/dynamo/index.d.ts.map +1 -0
- package/.dist/prefab/database/dynamo/index.js.map +1 -0
- package/.dist/prefab/database/index.d.ts +4 -0
- package/.dist/prefab/database/rds/handlers/start-cluster/handler.d.ts +2 -0
- package/.dist/prefab/database/rds/handlers/stop-cluster/handler.d.ts +2 -0
- package/.dist/prefab/database/rds/index.d.ts +51 -0
- package/.dist/prefab/database/rds/index.d.ts.map +1 -0
- package/.dist/prefab/database/rds/index.js +223 -0
- package/.dist/prefab/database/rds/index.js.map +1 -0
- package/.dist/prefab/database/timestream/index.d.ts +3 -0
- package/.dist/prefab/database/timestream/timestream-database.d.ts +11 -0
- package/.dist/prefab/database/timestream/timestream-database.d.ts.map +1 -0
- package/.dist/prefab/database/timestream/timestream-database.js.map +1 -0
- package/.dist/prefab/database/timestream/timestream-table.d.ts +21 -0
- package/.dist/prefab/database/timestream/timestream-table.d.ts.map +1 -0
- package/.dist/prefab/database/timestream/timestream-table.js.map +1 -0
- package/.dist/prefab/gateway/alb-public/index.d.ts +41 -0
- package/.dist/prefab/gateway/alb-public/index.d.ts.map +1 -0
- package/.dist/prefab/gateway/alb-public/index.js.map +1 -0
- package/.dist/prefab/gateway/api-gateway/api-http.d.ts +27 -0
- package/.dist/prefab/gateway/api-gateway/api-http.d.ts.map +1 -0
- package/.dist/prefab/gateway/api-gateway/api-http.js.map +1 -0
- package/.dist/prefab/gateway/api-gateway/api-rest.d.ts +23 -0
- package/.dist/prefab/gateway/api-gateway/api-rest.d.ts.map +1 -0
- package/.dist/prefab/gateway/api-gateway/api-rest.js.map +1 -0
- package/.dist/prefab/gateway/api-gateway/index.d.ts +3 -0
- package/.dist/prefab/gateway/app-sync/index.d.ts +31 -0
- package/.dist/prefab/gateway/app-sync/index.d.ts.map +1 -0
- package/.dist/prefab/gateway/app-sync/index.js.map +1 -0
- package/.dist/prefab/gateway/app-sync/resolver-aggregate.d.ts +33 -0
- package/.dist/prefab/gateway/app-sync/resolver-aggregate.d.ts.map +1 -0
- package/.dist/prefab/gateway/app-sync/resolver-aggregate.js.map +1 -0
- package/.dist/prefab/gateway/app-sync/types.d.ts +29 -0
- package/.dist/prefab/gateway/app-sync/types.d.ts.map +1 -0
- package/.dist/prefab/gateway/index.d.ts +4 -0
- package/.dist/prefab/index.d.ts +11 -0
- package/.dist/prefab/integration/event-bus/index.d.ts +18 -0
- package/.dist/prefab/integration/event-bus/index.d.ts.map +1 -0
- package/.dist/prefab/integration/event-bus/index.js.map +1 -0
- package/.dist/prefab/integration/index.d.ts +4 -0
- package/.dist/prefab/integration/queue/index.d.ts +29 -0
- package/.dist/prefab/integration/queue/index.d.ts.map +1 -0
- package/.dist/prefab/integration/queue/index.js.map +1 -0
- package/.dist/prefab/integration/topic/index.d.ts +19 -0
- package/.dist/prefab/integration/topic/index.d.ts.map +1 -0
- package/.dist/prefab/integration/topic/index.js.map +1 -0
- package/.dist/prefab/networking/dns-domain-ref/index.d.ts +14 -0
- package/.dist/prefab/networking/dns-domain-ref/index.d.ts.map +1 -0
- package/.dist/prefab/networking/dns-domain-ref/index.js.map +1 -0
- package/.dist/prefab/networking/dns-subdomain-certificate/index.d.ts +11 -0
- package/.dist/prefab/networking/dns-subdomain-certificate/index.d.ts.map +1 -0
- package/.dist/prefab/networking/dns-subdomain-certificate/index.js.map +1 -0
- package/.dist/prefab/networking/dns-subdomain-hosted-zone/index.d.ts +10 -0
- package/.dist/prefab/networking/dns-subdomain-hosted-zone/index.d.ts.map +1 -0
- package/.dist/prefab/networking/dns-subdomain-hosted-zone/index.js.map +1 -0
- package/.dist/prefab/networking/index.d.ts +6 -0
- package/.dist/prefab/networking/vpc/index.d.ts +18 -0
- package/.dist/prefab/networking/vpc/index.d.ts.map +1 -0
- package/.dist/prefab/networking/vpc/index.js.map +1 -0
- package/.dist/prefab/networking/waf/index.d.ts +12 -0
- package/.dist/prefab/networking/waf/index.d.ts.map +1 -0
- package/.dist/prefab/networking/waf/index.js.map +1 -0
- package/.dist/prefab/storage/bucket/asset-bucket.d.ts +10 -0
- package/.dist/prefab/storage/bucket/asset-bucket.d.ts.map +1 -0
- package/.dist/prefab/storage/bucket/index.d.ts +3 -0
- package/.dist/prefab/storage/bucket/private-bucket.d.ts +32 -0
- package/.dist/prefab/storage/bucket/private-bucket.d.ts.map +1 -0
- package/.dist/prefab/storage/bucket/private-bucket.js.map +1 -0
- package/.dist/prefab/storage/index.d.ts +2 -0
- package/.dist/prefab/utils/config/frontend-env-builder.d.ts +12 -0
- package/.dist/prefab/utils/config/frontend-env-builder.d.ts.map +1 -0
- package/.dist/prefab/utils/config/frontend-env-builder.js.map +1 -0
- package/.dist/prefab/utils/config/index.d.ts +4 -0
- package/.dist/prefab/utils/config/parameter-secret.d.ts +19 -0
- package/.dist/prefab/utils/config/parameter-secret.d.ts.map +1 -0
- package/.dist/prefab/utils/config/parameter-secret.js.map +1 -0
- package/.dist/prefab/utils/config/runtime-secret.d.ts.map +1 -0
- package/.dist/prefab/utils/config/runtime-secret.js.map +1 -0
- package/.dist/prefab/utils/deploy-pipeline/catalog/integrations/index.d.ts +2 -0
- package/.dist/prefab/utils/deploy-pipeline/entities/index.d.ts +29 -0
- package/.dist/prefab/utils/deploy-pipeline/index.d.ts +13 -0
- package/.dist/prefab/utils/deploy-pipeline/index.d.ts.map +1 -0
- package/.dist/prefab/utils/deploy-pipeline/index.js.map +1 -0
- package/.dist/prefab/utils/deploy-pipeline/platform/get-pipeline-detail.d.ts +6 -0
- package/.dist/prefab/utils/deploy-pipeline/platform/get-slack-payload.d.ts +3 -0
- package/.dist/prefab/utils/duration.d.ts +2 -0
- package/.dist/prefab/utils/index.d.ts +5 -0
- package/.dist/prefab/utils/ses/index.d.ts +20 -0
- package/.dist/prefab/utils/ses/index.d.ts.map +1 -0
- package/.dist/prefab/utils/ses/index.js.map +1 -0
- package/.dist/script/config-command/bootstrap.d.ts +3 -0
- package/.dist/script/config-command/bootstrap.js +65 -0
- package/.dist/script/config-command/bootstrap.js.map +1 -0
- package/.dist/script/config-command/deploy-spa.d.ts +3 -0
- package/.dist/script/config-command/deploy-spa.d.ts.map +1 -0
- package/.dist/script/config-command/deploy-spa.js +82 -0
- package/.dist/script/config-command/deploy-spa.js.map +1 -0
- package/.dist/script/config-command/deploy.d.ts +3 -0
- package/.dist/script/config-command/deploy.js +26 -0
- package/.dist/script/config-command/deploy.js.map +1 -0
- package/.dist/script/config-command/destroy.d.ts +3 -0
- package/.dist/script/config-command/destroy.js +26 -0
- package/.dist/script/config-command/destroy.js.map +1 -0
- package/.dist/script/config-command/env-ssr.d.ts +3 -0
- package/.dist/script/config-command/env-ssr.js +49 -0
- package/.dist/script/config-command/env-ssr.js.map +1 -0
- package/.dist/script/config-command/invalidation-ssr.d.ts +3 -0
- package/.dist/script/config-command/invalidation-ssr.js +53 -0
- package/.dist/script/config-command/invalidation-ssr.js.map +1 -0
- package/.dist/script/config-command/rds-migration.d.ts +5 -0
- package/.dist/script/config-command/rds-migration.js.map +1 -0
- package/.dist/script/config-command/rds-sync.d.ts +3 -0
- package/.dist/script/config-command/rds-sync.js.map +1 -0
- package/.dist/script/config-command/ssm-connect.d.ts +3 -0
- package/.dist/script/config-command/ssm-connect.js.map +1 -0
- package/.dist/script/config-command/start-spa.d.ts +3 -0
- package/.dist/script/config-command/start-spa.js +53 -0
- package/.dist/script/config-command/start-spa.js.map +1 -0
- package/.dist/script/config-command/start-ssr.d.ts +3 -0
- package/.dist/script/config-command/start-ssr.js +53 -0
- package/.dist/script/config-command/start-ssr.js.map +1 -0
- package/.dist/script/config-command/synth.d.ts +3 -0
- package/.dist/script/config-command/synth.js +26 -0
- package/.dist/script/config-command/synth.js.map +1 -0
- package/.dist/script/index.d.ts +7 -0
- package/.dist/script/index.d.ts.map +1 -0
- package/.dist/script/output-command/create-user.d.ts +9 -0
- package/.dist/script/output-command/create-user.d.ts.map +1 -0
- package/.dist/script/output-command/create-user.js.map +1 -0
- package/.dist/script/output-command/gen-postman-env.d.ts +9 -0
- package/.dist/script/output-command/gen-postman-env.d.ts.map +1 -0
- package/.dist/script/output-command/gen-postman-env.js +55 -0
- package/.dist/script/output-command/gen-postman-env.js.map +1 -0
- package/.dist/tsconfig.tsbuildinfo +1 -0
- package/.prettierignore +10 -0
- package/.prettierrc.json +12 -0
- package/.turbo/turbo-build.log +5 -0
- package/.turbo/turbo-release.log +7 -0
- package/CHANGELOG.md +8 -0
- package/common/coordinator.ts +103 -0
- package/common/index.ts +5 -0
- package/common/modifier.ts +11 -0
- package/common/naming/get-deploy-config.ts +5 -0
- package/common/naming/get-domain.ts +14 -0
- package/common/naming/get-function-entry.ts +11 -0
- package/common/naming/get-logical-name.ts +3 -0
- package/common/naming/get-resource-name.ts +77 -0
- package/common/naming/get-service-name.ts +13 -0
- package/common/naming/index.ts +7 -0
- package/common/naming/string-parser.ts +17 -0
- package/common/service.ts +48 -0
- package/common/synth/account-mapping.ts +16 -0
- package/common/synth/assume-role.ts +39 -0
- package/common/synth/get-global-props.ts +46 -0
- package/common/synth/get-service-props.ts +16 -0
- package/common/synth/index.ts +7 -0
- package/common/synth/pre-script.ts +103 -0
- package/common/synth/props-types.ts +79 -0
- package/common/synth/synth-error.ts +13 -0
- package/index.ts +3 -0
- package/package.json +4 -5
- package/prefab/analytics/events/handlers/ingestion-transform/handler.ts +35 -0
- package/prefab/analytics/events/index.ts +192 -0
- package/prefab/analytics/index.ts +1 -0
- package/prefab/auth/cognito-pool/index.ts +263 -0
- package/prefab/auth/index.ts +1 -0
- package/prefab/cdn/cdn-api/index.ts +169 -0
- package/prefab/cdn/cdn-asset/index.ts +89 -0
- package/prefab/cdn/cdn-spa/index.ts +136 -0
- package/prefab/cdn/cdn-ssr/index.ts +288 -0
- package/prefab/cdn/index.ts +4 -0
- package/prefab/compute/fargate/cluster.ts +24 -0
- package/prefab/compute/fargate/index.ts +2 -0
- package/prefab/compute/fargate/service.ts +130 -0
- package/prefab/compute/function/api-function/api-aggregate.ts +73 -0
- package/prefab/compute/function/api-function/api-function.ts +63 -0
- package/prefab/compute/function/api-function/index.ts +2 -0
- package/prefab/compute/function/base-function/index.ts +102 -0
- package/prefab/compute/function/cognito-function/cognito-aggregate.ts +29 -0
- package/prefab/compute/function/cognito-function/cognito-function.ts +36 -0
- package/prefab/compute/function/cognito-function/index.ts +2 -0
- package/prefab/compute/function/cron-function/cron-aggregate.ts +28 -0
- package/prefab/compute/function/cron-function/cron-function.ts +32 -0
- package/prefab/compute/function/cron-function/index.ts +2 -0
- package/prefab/compute/function/event-function/EventAggregateParams.ts +9 -0
- package/prefab/compute/function/event-function/event-aggregate.ts +33 -0
- package/prefab/compute/function/event-function/event-function.ts +42 -0
- package/prefab/compute/function/event-function/index.ts +2 -0
- package/prefab/compute/function/index.ts +7 -0
- package/prefab/compute/function/queue-function/index.ts +67 -0
- package/prefab/compute/function/topic-function/index.ts +36 -0
- package/prefab/compute/index.ts +2 -0
- package/prefab/database/dynamo/index.ts +113 -0
- package/prefab/database/index.ts +3 -0
- package/prefab/database/rds/handlers/start-cluster/handler.ts +7 -0
- package/prefab/database/rds/handlers/stop-cluster/handler.ts +7 -0
- package/prefab/database/rds/index.ts +248 -0
- package/prefab/database/timestream/index.ts +2 -0
- package/prefab/database/timestream/timestream-database.ts +24 -0
- package/prefab/database/timestream/timestream-table.ts +76 -0
- package/prefab/gateway/alb-public/index.ts +124 -0
- package/prefab/gateway/api-gateway/api-http.ts +71 -0
- package/prefab/gateway/api-gateway/api-rest.ts +93 -0
- package/prefab/gateway/api-gateway/index.ts +2 -0
- package/prefab/gateway/app-sync/index.ts +117 -0
- package/prefab/gateway/app-sync/resolver-aggregate.ts +138 -0
- package/prefab/gateway/app-sync/types.ts +29 -0
- package/prefab/gateway/index.ts +3 -0
- package/prefab/index.ts +10 -0
- package/prefab/integration/event-bus/index.ts +52 -0
- package/prefab/integration/index.ts +3 -0
- package/prefab/integration/queue/index.ts +94 -0
- package/prefab/integration/topic/index.ts +57 -0
- package/prefab/networking/dns-domain-ref/index.ts +32 -0
- package/prefab/networking/dns-subdomain-certificate/index.ts +30 -0
- package/prefab/networking/dns-subdomain-hosted-zone/index.ts +30 -0
- package/prefab/networking/index.ts +5 -0
- package/prefab/networking/vpc/index.ts +39 -0
- package/prefab/networking/waf/index.ts +49 -0
- package/prefab/storage/bucket/asset-bucket.ts +24 -0
- package/prefab/storage/bucket/index.ts +2 -0
- package/prefab/storage/bucket/private-bucket.ts +74 -0
- package/prefab/storage/index.ts +1 -0
- package/prefab/utils/config/frontend-env-builder.ts +30 -0
- package/prefab/utils/config/index.ts +3 -0
- package/prefab/utils/config/parameter-secret.ts +52 -0
- package/prefab/utils/config/runtime-secret.ts +48 -0
- package/prefab/utils/deploy-pipeline/catalog/integrations/index.ts +1 -0
- package/prefab/utils/deploy-pipeline/catalog/integrations/slack.ts +23 -0
- package/prefab/utils/deploy-pipeline/entities/index.ts +23 -0
- package/prefab/utils/deploy-pipeline/handlers/send-to-slack/handler.ts +32 -0
- package/prefab/utils/deploy-pipeline/index.ts +172 -0
- package/prefab/utils/deploy-pipeline/platform/get-pipeline-detail.ts +31 -0
- package/prefab/utils/deploy-pipeline/platform/get-slack-payload.ts +38 -0
- package/prefab/utils/deploy-pipeline/platform/send-to-slack.ts +16 -0
- package/prefab/utils/duration.ts +1 -0
- package/prefab/utils/index.ts +4 -0
- package/prefab/utils/ses/index.ts +134 -0
- package/readme.md +78 -0
- package/script/config-command/bootstrap.ts +108 -0
- package/script/config-command/deploy-spa.ts +126 -0
- package/script/config-command/deploy.ts +50 -0
- package/script/config-command/destroy.ts +49 -0
- package/script/config-command/env-ssr.ts +85 -0
- package/script/config-command/invalidation-ssr.ts +88 -0
- package/script/config-command/rds-migration.ts +177 -0
- package/script/config-command/rds-sync.ts +108 -0
- package/script/config-command/ssm-connect.ts +129 -0
- package/script/config-command/start-spa.ts +93 -0
- package/script/config-command/start-ssr.ts +91 -0
- package/script/config-command/synth.ts +50 -0
- package/script/index.ts +86 -0
- package/script/output-command/create-user.ts +89 -0
- package/script/output-command/gen-postman-env.ts +75 -0
- package/tsconfig.json +26 -0
- package/common/coordinator.d.ts +0 -28
- package/common/index.d.ts +0 -6
- package/common/modifier.d.ts +0 -5
- package/common/naming/get-deploy-config.d.ts +0 -9
- package/common/naming/get-domain.d.ts +0 -9
- package/common/naming/get-function-entry.d.ts +0 -4
- package/common/naming/get-logical-name.d.ts +0 -2
- package/common/naming/get-resource-name.d.ts +0 -47
- package/common/naming/get-service-name.d.ts +0 -10
- package/common/naming/index.d.ts +0 -8
- package/common/naming/string-parser.d.ts +0 -4
- package/common/service.d.ts +0 -29
- package/common/synth/account-mapping.d.ts +0 -2
- package/common/synth/assume-role.d.ts +0 -18
- package/common/synth/get-global-props.d.ts +0 -16
- package/common/synth/get-service-props.d.ts +0 -11
- package/common/synth/index.d.ts +0 -8
- package/common/synth/pre-script.d.ts +0 -32
- package/common/synth/props-types.d.ts +0 -60
- package/common/synth/synth-error.d.ts +0 -8
- package/index.d.ts +0 -4
- package/prefab/analytics/events/handlers/ingestion-transform/handler.d.ts +0 -4
- package/prefab/analytics/events/index.d.ts +0 -31
- package/prefab/analytics/events/index.d.ts.map +0 -1
- package/prefab/analytics/events/index.js +0 -163
- package/prefab/analytics/events/index.js.map +0 -1
- package/prefab/analytics/index.d.ts +0 -2
- package/prefab/auth/cognito-pool/index.d.ts +0 -65
- package/prefab/auth/cognito-pool/index.d.ts.map +0 -1
- package/prefab/auth/cognito-pool/index.js.map +0 -1
- package/prefab/auth/index.d.ts +0 -2
- package/prefab/cdn/cdn-api/index.d.ts +0 -38
- package/prefab/cdn/cdn-api/index.d.ts.map +0 -1
- package/prefab/cdn/cdn-api/index.js +0 -153
- package/prefab/cdn/cdn-api/index.js.map +0 -1
- package/prefab/cdn/cdn-asset/index.d.ts +0 -27
- package/prefab/cdn/cdn-asset/index.d.ts.map +0 -1
- package/prefab/cdn/cdn-asset/index.js +0 -96
- package/prefab/cdn/cdn-asset/index.js.map +0 -1
- package/prefab/cdn/cdn-spa/index.d.ts +0 -27
- package/prefab/cdn/cdn-spa/index.d.ts.map +0 -1
- package/prefab/cdn/cdn-spa/index.js +0 -138
- package/prefab/cdn/cdn-spa/index.js.map +0 -1
- package/prefab/cdn/cdn-ssr/index.d.ts +0 -36
- package/prefab/cdn/cdn-ssr/index.d.ts.map +0 -1
- package/prefab/cdn/cdn-ssr/index.js +0 -271
- package/prefab/cdn/cdn-ssr/index.js.map +0 -1
- package/prefab/cdn/index.d.ts +0 -5
- package/prefab/compute/fargate/cluster.d.ts +0 -16
- package/prefab/compute/fargate/cluster.d.ts.map +0 -1
- package/prefab/compute/fargate/cluster.js.map +0 -1
- package/prefab/compute/fargate/index.d.ts +0 -3
- package/prefab/compute/fargate/service.d.ts +0 -49
- package/prefab/compute/fargate/service.d.ts.map +0 -1
- package/prefab/compute/fargate/service.js.map +0 -1
- package/prefab/compute/function/api-function/api-aggregate.d.ts +0 -32
- package/prefab/compute/function/api-function/api-aggregate.d.ts.map +0 -1
- package/prefab/compute/function/api-function/api-aggregate.js +0 -54
- package/prefab/compute/function/api-function/api-aggregate.js.map +0 -1
- package/prefab/compute/function/api-function/api-function.d.ts +0 -22
- package/prefab/compute/function/api-function/api-function.d.ts.map +0 -1
- package/prefab/compute/function/api-function/api-function.js +0 -45
- package/prefab/compute/function/api-function/api-function.js.map +0 -1
- package/prefab/compute/function/api-function/index.d.ts +0 -3
- package/prefab/compute/function/base-function/index.d.ts +0 -33
- package/prefab/compute/function/base-function/index.d.ts.map +0 -1
- package/prefab/compute/function/base-function/index.js +0 -70
- package/prefab/compute/function/base-function/index.js.map +0 -1
- package/prefab/compute/function/cognito-function/cognito-aggregate.d.ts +0 -18
- package/prefab/compute/function/cognito-function/cognito-aggregate.d.ts.map +0 -1
- package/prefab/compute/function/cognito-function/cognito-aggregate.js.map +0 -1
- package/prefab/compute/function/cognito-function/cognito-function.d.ts +0 -19
- package/prefab/compute/function/cognito-function/cognito-function.d.ts.map +0 -1
- package/prefab/compute/function/cognito-function/cognito-function.js.map +0 -1
- package/prefab/compute/function/cognito-function/index.d.ts +0 -3
- package/prefab/compute/function/cron-function/cron-aggregate.d.ts +0 -17
- package/prefab/compute/function/cron-function/cron-aggregate.d.ts.map +0 -1
- package/prefab/compute/function/cron-function/cron-aggregate.js.map +0 -1
- package/prefab/compute/function/cron-function/cron-function.d.ts +0 -17
- package/prefab/compute/function/cron-function/cron-function.d.ts.map +0 -1
- package/prefab/compute/function/cron-function/cron-function.js +0 -24
- package/prefab/compute/function/cron-function/cron-function.js.map +0 -1
- package/prefab/compute/function/cron-function/index.d.ts +0 -3
- package/prefab/compute/function/event-function/event-aggregate.d.ts +0 -20
- package/prefab/compute/function/event-function/event-aggregate.d.ts.map +0 -1
- package/prefab/compute/function/event-function/event-aggregate.js.map +0 -1
- package/prefab/compute/function/event-function/event-function.d.ts +0 -14
- package/prefab/compute/function/event-function/event-function.d.ts.map +0 -1
- package/prefab/compute/function/event-function/event-function.js.map +0 -1
- package/prefab/compute/function/event-function/index.d.ts +0 -3
- package/prefab/compute/function/index.d.ts +0 -8
- package/prefab/compute/function/queue-function/index.d.ts +0 -25
- package/prefab/compute/function/queue-function/index.d.ts.map +0 -1
- package/prefab/compute/function/queue-function/index.js +0 -46
- package/prefab/compute/function/queue-function/index.js.map +0 -1
- package/prefab/compute/function/topic-function/index.d.ts +0 -23
- package/prefab/compute/function/topic-function/index.d.ts.map +0 -1
- package/prefab/compute/function/topic-function/index.js +0 -23
- package/prefab/compute/function/topic-function/index.js.map +0 -1
- package/prefab/compute/index.d.ts +0 -3
- package/prefab/database/dynamo/index.d.ts +0 -14
- package/prefab/database/dynamo/index.d.ts.map +0 -1
- package/prefab/database/dynamo/index.js.map +0 -1
- package/prefab/database/index.d.ts +0 -4
- package/prefab/database/rds/handlers/start-cluster/handler.d.ts +0 -2
- package/prefab/database/rds/handlers/stop-cluster/handler.d.ts +0 -2
- package/prefab/database/rds/index.d.ts +0 -54
- package/prefab/database/rds/index.d.ts.map +0 -1
- package/prefab/database/rds/index.js +0 -223
- package/prefab/database/rds/index.js.map +0 -1
- package/prefab/database/timestream/index.d.ts +0 -3
- package/prefab/database/timestream/timestream-database.d.ts +0 -13
- package/prefab/database/timestream/timestream-database.d.ts.map +0 -1
- package/prefab/database/timestream/timestream-database.js.map +0 -1
- package/prefab/database/timestream/timestream-table.d.ts +0 -23
- package/prefab/database/timestream/timestream-table.d.ts.map +0 -1
- package/prefab/database/timestream/timestream-table.js.map +0 -1
- package/prefab/gateway/alb-public/index.d.ts +0 -44
- package/prefab/gateway/alb-public/index.d.ts.map +0 -1
- package/prefab/gateway/alb-public/index.js.map +0 -1
- package/prefab/gateway/api-gateway/api-http.d.ts +0 -27
- package/prefab/gateway/api-gateway/api-http.d.ts.map +0 -1
- package/prefab/gateway/api-gateway/api-http.js.map +0 -1
- package/prefab/gateway/api-gateway/api-rest.d.ts +0 -26
- package/prefab/gateway/api-gateway/api-rest.d.ts.map +0 -1
- package/prefab/gateway/api-gateway/api-rest.js.map +0 -1
- package/prefab/gateway/api-gateway/index.d.ts +0 -3
- package/prefab/gateway/app-sync/index.d.ts +0 -36
- package/prefab/gateway/app-sync/index.d.ts.map +0 -1
- package/prefab/gateway/app-sync/index.js.map +0 -1
- package/prefab/gateway/app-sync/resolver-aggregate.d.ts +0 -33
- package/prefab/gateway/app-sync/resolver-aggregate.d.ts.map +0 -1
- package/prefab/gateway/app-sync/resolver-aggregate.js.map +0 -1
- package/prefab/gateway/app-sync/types.d.ts +0 -29
- package/prefab/gateway/app-sync/types.d.ts.map +0 -1
- package/prefab/gateway/index.d.ts +0 -4
- package/prefab/index.d.ts +0 -11
- package/prefab/integration/event-bus/index.d.ts +0 -20
- package/prefab/integration/event-bus/index.d.ts.map +0 -1
- package/prefab/integration/event-bus/index.js.map +0 -1
- package/prefab/integration/index.d.ts +0 -4
- package/prefab/integration/queue/index.d.ts +0 -29
- package/prefab/integration/queue/index.d.ts.map +0 -1
- package/prefab/integration/queue/index.js.map +0 -1
- package/prefab/integration/topic/index.d.ts +0 -21
- package/prefab/integration/topic/index.d.ts.map +0 -1
- package/prefab/integration/topic/index.js.map +0 -1
- package/prefab/networking/dns-domain-ref/index.d.ts +0 -16
- package/prefab/networking/dns-domain-ref/index.d.ts.map +0 -1
- package/prefab/networking/dns-domain-ref/index.js.map +0 -1
- package/prefab/networking/dns-subdomain-certificate/index.d.ts +0 -13
- package/prefab/networking/dns-subdomain-certificate/index.d.ts.map +0 -1
- package/prefab/networking/dns-subdomain-certificate/index.js.map +0 -1
- package/prefab/networking/dns-subdomain-hosted-zone/index.d.ts +0 -12
- package/prefab/networking/dns-subdomain-hosted-zone/index.d.ts.map +0 -1
- package/prefab/networking/dns-subdomain-hosted-zone/index.js.map +0 -1
- package/prefab/networking/index.d.ts +0 -6
- package/prefab/networking/vpc/index.d.ts +0 -20
- package/prefab/networking/vpc/index.d.ts.map +0 -1
- package/prefab/networking/vpc/index.js.map +0 -1
- package/prefab/networking/waf/index.d.ts +0 -14
- package/prefab/networking/waf/index.d.ts.map +0 -1
- package/prefab/networking/waf/index.js.map +0 -1
- package/prefab/storage/bucket/asset-bucket.d.ts +0 -12
- package/prefab/storage/bucket/asset-bucket.d.ts.map +0 -1
- package/prefab/storage/bucket/index.d.ts +0 -3
- package/prefab/storage/bucket/private-bucket.d.ts +0 -26
- package/prefab/storage/bucket/private-bucket.d.ts.map +0 -1
- package/prefab/storage/bucket/private-bucket.js.map +0 -1
- package/prefab/storage/index.d.ts +0 -2
- package/prefab/utils/config/frontend-env-builder.d.ts +0 -14
- package/prefab/utils/config/frontend-env-builder.d.ts.map +0 -1
- package/prefab/utils/config/frontend-env-builder.js.map +0 -1
- package/prefab/utils/config/index.d.ts +0 -4
- package/prefab/utils/config/parameter-secret.d.ts +0 -21
- package/prefab/utils/config/parameter-secret.d.ts.map +0 -1
- package/prefab/utils/config/parameter-secret.js.map +0 -1
- package/prefab/utils/config/runtime-secret.d.ts.map +0 -1
- package/prefab/utils/config/runtime-secret.js.map +0 -1
- package/prefab/utils/deploy-pipeline/catalog/integrations/index.d.ts +0 -2
- package/prefab/utils/deploy-pipeline/entities/index.d.ts +0 -29
- package/prefab/utils/deploy-pipeline/index.d.ts +0 -15
- package/prefab/utils/deploy-pipeline/index.d.ts.map +0 -1
- package/prefab/utils/deploy-pipeline/index.js.map +0 -1
- package/prefab/utils/deploy-pipeline/platform/get-pipeline-detail.d.ts +0 -6
- package/prefab/utils/deploy-pipeline/platform/get-slack-payload.d.ts +0 -4
- package/prefab/utils/duration.d.ts +0 -2
- package/prefab/utils/index.d.ts +0 -5
- package/prefab/utils/ses/index.d.ts +0 -22
- package/prefab/utils/ses/index.d.ts.map +0 -1
- package/prefab/utils/ses/index.js.map +0 -1
- package/script/config-command/bootstrap.d.ts +0 -4
- package/script/config-command/bootstrap.js +0 -66
- package/script/config-command/bootstrap.js.map +0 -1
- package/script/config-command/deploy-spa.d.ts +0 -4
- package/script/config-command/deploy-spa.d.ts.map +0 -1
- package/script/config-command/deploy-spa.js +0 -84
- package/script/config-command/deploy-spa.js.map +0 -1
- package/script/config-command/deploy.d.ts +0 -4
- package/script/config-command/deploy.js +0 -26
- package/script/config-command/deploy.js.map +0 -1
- package/script/config-command/destroy.d.ts +0 -4
- package/script/config-command/destroy.js +0 -26
- package/script/config-command/destroy.js.map +0 -1
- package/script/config-command/env-ssr.d.ts +0 -4
- package/script/config-command/env-ssr.js +0 -51
- package/script/config-command/env-ssr.js.map +0 -1
- package/script/config-command/invalidation-ssr.d.ts +0 -4
- package/script/config-command/invalidation-ssr.js +0 -55
- package/script/config-command/invalidation-ssr.js.map +0 -1
- package/script/config-command/rds-migration.d.ts +0 -7
- package/script/config-command/rds-migration.js.map +0 -1
- package/script/config-command/rds-sync.d.ts +0 -4
- package/script/config-command/rds-sync.js.map +0 -1
- package/script/config-command/ssm-connect.d.ts +0 -4
- package/script/config-command/ssm-connect.js.map +0 -1
- package/script/config-command/start-spa.d.ts +0 -4
- package/script/config-command/start-spa.js +0 -55
- package/script/config-command/start-spa.js.map +0 -1
- package/script/config-command/start-ssr.d.ts +0 -4
- package/script/config-command/start-ssr.js +0 -55
- package/script/config-command/start-ssr.js.map +0 -1
- package/script/config-command/synth.d.ts +0 -4
- package/script/config-command/synth.js +0 -26
- package/script/config-command/synth.js.map +0 -1
- package/script/index.d.ts +0 -25
- package/script/index.d.ts.map +0 -1
- package/script/output-command/create-user.d.ts +0 -9
- package/script/output-command/create-user.d.ts.map +0 -1
- package/script/output-command/create-user.js.map +0 -1
- package/script/output-command/gen-postman-env.d.ts +0 -28
- package/script/output-command/gen-postman-env.d.ts.map +0 -1
- package/script/output-command/gen-postman-env.js +0 -56
- package/script/output-command/gen-postman-env.js.map +0 -1
- package/tsconfig.tsbuildinfo +0 -1
- /package/{common → .dist/common}/coordinator.d.ts.map +0 -0
- /package/{common → .dist/common}/coordinator.js +0 -0
- /package/{common → .dist/common}/coordinator.js.map +0 -0
- /package/{common → .dist/common}/index.d.ts.map +0 -0
- /package/{common → .dist/common}/index.js +0 -0
- /package/{common → .dist/common}/index.js.map +0 -0
- /package/{common → .dist/common}/modifier.d.ts.map +0 -0
- /package/{common → .dist/common}/modifier.js +0 -0
- /package/{common → .dist/common}/modifier.js.map +0 -0
- /package/{common → .dist/common}/naming/get-deploy-config.d.ts.map +0 -0
- /package/{common → .dist/common}/naming/get-deploy-config.js +0 -0
- /package/{common → .dist/common}/naming/get-deploy-config.js.map +0 -0
- /package/{common → .dist/common}/naming/get-domain.d.ts.map +0 -0
- /package/{common → .dist/common}/naming/get-domain.js +0 -0
- /package/{common → .dist/common}/naming/get-domain.js.map +0 -0
- /package/{common → .dist/common}/naming/get-function-entry.d.ts.map +0 -0
- /package/{common → .dist/common}/naming/get-function-entry.js +0 -0
- /package/{common → .dist/common}/naming/get-function-entry.js.map +0 -0
- /package/{common → .dist/common}/naming/get-logical-name.d.ts.map +0 -0
- /package/{common → .dist/common}/naming/get-logical-name.js +0 -0
- /package/{common → .dist/common}/naming/get-logical-name.js.map +0 -0
- /package/{common → .dist/common}/naming/get-resource-name.d.ts.map +0 -0
- /package/{common → .dist/common}/naming/get-resource-name.js +0 -0
- /package/{common → .dist/common}/naming/get-resource-name.js.map +0 -0
- /package/{common → .dist/common}/naming/get-service-name.d.ts.map +0 -0
- /package/{common → .dist/common}/naming/get-service-name.js +0 -0
- /package/{common → .dist/common}/naming/get-service-name.js.map +0 -0
- /package/{common → .dist/common}/naming/index.d.ts.map +0 -0
- /package/{common → .dist/common}/naming/index.js +0 -0
- /package/{common → .dist/common}/naming/index.js.map +0 -0
- /package/{common → .dist/common}/naming/string-parser.d.ts.map +0 -0
- /package/{common → .dist/common}/naming/string-parser.js +0 -0
- /package/{common → .dist/common}/naming/string-parser.js.map +0 -0
- /package/{common → .dist/common}/service.d.ts.map +0 -0
- /package/{common → .dist/common}/service.js +0 -0
- /package/{common → .dist/common}/service.js.map +0 -0
- /package/{common → .dist/common}/synth/account-mapping.d.ts.map +0 -0
- /package/{common → .dist/common}/synth/account-mapping.js +0 -0
- /package/{common → .dist/common}/synth/account-mapping.js.map +0 -0
- /package/{common → .dist/common}/synth/assume-role.d.ts.map +0 -0
- /package/{common → .dist/common}/synth/assume-role.js +0 -0
- /package/{common → .dist/common}/synth/assume-role.js.map +0 -0
- /package/{common → .dist/common}/synth/get-global-props.d.ts.map +0 -0
- /package/{common → .dist/common}/synth/get-global-props.js +0 -0
- /package/{common → .dist/common}/synth/get-global-props.js.map +0 -0
- /package/{common → .dist/common}/synth/get-service-props.d.ts.map +0 -0
- /package/{common → .dist/common}/synth/get-service-props.js +0 -0
- /package/{common → .dist/common}/synth/get-service-props.js.map +0 -0
- /package/{common → .dist/common}/synth/index.d.ts.map +0 -0
- /package/{common → .dist/common}/synth/index.js +0 -0
- /package/{common → .dist/common}/synth/index.js.map +0 -0
- /package/{common → .dist/common}/synth/pre-script.d.ts.map +0 -0
- /package/{common → .dist/common}/synth/pre-script.js +0 -0
- /package/{common → .dist/common}/synth/pre-script.js.map +0 -0
- /package/{common → .dist/common}/synth/props-types.d.ts.map +0 -0
- /package/{common → .dist/common}/synth/props-types.js +0 -0
- /package/{common → .dist/common}/synth/props-types.js.map +0 -0
- /package/{common → .dist/common}/synth/synth-error.d.ts.map +0 -0
- /package/{common → .dist/common}/synth/synth-error.js +0 -0
- /package/{common → .dist/common}/synth/synth-error.js.map +0 -0
- /package/{index.d.ts.map → .dist/index.d.ts.map} +0 -0
- /package/{index.js → .dist/index.js} +0 -0
- /package/{index.js.map → .dist/index.js.map} +0 -0
- /package/{prefab → .dist/prefab}/analytics/events/handlers/ingestion-transform/handler.d.ts.map +0 -0
- /package/{prefab → .dist/prefab}/analytics/events/handlers/ingestion-transform/handler.js +0 -0
- /package/{prefab → .dist/prefab}/analytics/events/handlers/ingestion-transform/handler.js.map +0 -0
- /package/{prefab → .dist/prefab}/analytics/index.d.ts.map +0 -0
- /package/{prefab → .dist/prefab}/analytics/index.js +0 -0
- /package/{prefab → .dist/prefab}/analytics/index.js.map +0 -0
- /package/{prefab → .dist/prefab}/auth/cognito-pool/index.js +0 -0
- /package/{prefab → .dist/prefab}/auth/index.d.ts.map +0 -0
- /package/{prefab → .dist/prefab}/auth/index.js +0 -0
- /package/{prefab → .dist/prefab}/auth/index.js.map +0 -0
- /package/{prefab → .dist/prefab}/cdn/index.d.ts.map +0 -0
- /package/{prefab → .dist/prefab}/cdn/index.js +0 -0
- /package/{prefab → .dist/prefab}/cdn/index.js.map +0 -0
- /package/{prefab → .dist/prefab}/compute/fargate/cluster.js +0 -0
- /package/{prefab → .dist/prefab}/compute/fargate/index.d.ts.map +0 -0
- /package/{prefab → .dist/prefab}/compute/fargate/index.js +0 -0
- /package/{prefab → .dist/prefab}/compute/fargate/index.js.map +0 -0
- /package/{prefab → .dist/prefab}/compute/fargate/service.js +0 -0
- /package/{prefab → .dist/prefab}/compute/function/api-function/index.d.ts.map +0 -0
- /package/{prefab → .dist/prefab}/compute/function/api-function/index.js +0 -0
- /package/{prefab → .dist/prefab}/compute/function/api-function/index.js.map +0 -0
- /package/{prefab → .dist/prefab}/compute/function/cognito-function/cognito-aggregate.js +0 -0
- /package/{prefab → .dist/prefab}/compute/function/cognito-function/cognito-function.js +0 -0
- /package/{prefab → .dist/prefab}/compute/function/cognito-function/index.d.ts.map +0 -0
- /package/{prefab → .dist/prefab}/compute/function/cognito-function/index.js +0 -0
- /package/{prefab → .dist/prefab}/compute/function/cognito-function/index.js.map +0 -0
- /package/{prefab → .dist/prefab}/compute/function/cron-function/cron-aggregate.js +0 -0
- /package/{prefab → .dist/prefab}/compute/function/cron-function/index.d.ts.map +0 -0
- /package/{prefab → .dist/prefab}/compute/function/cron-function/index.js +0 -0
- /package/{prefab → .dist/prefab}/compute/function/cron-function/index.js.map +0 -0
- /package/{prefab → .dist/prefab}/compute/function/event-function/event-aggregate.js +0 -0
- /package/{prefab → .dist/prefab}/compute/function/event-function/event-function.js +0 -0
- /package/{prefab → .dist/prefab}/compute/function/event-function/index.d.ts.map +0 -0
- /package/{prefab → .dist/prefab}/compute/function/event-function/index.js +0 -0
- /package/{prefab → .dist/prefab}/compute/function/event-function/index.js.map +0 -0
- /package/{prefab → .dist/prefab}/compute/function/index.d.ts.map +0 -0
- /package/{prefab → .dist/prefab}/compute/function/index.js +0 -0
- /package/{prefab → .dist/prefab}/compute/function/index.js.map +0 -0
- /package/{prefab → .dist/prefab}/compute/index.d.ts.map +0 -0
- /package/{prefab → .dist/prefab}/compute/index.js +0 -0
- /package/{prefab → .dist/prefab}/compute/index.js.map +0 -0
- /package/{prefab → .dist/prefab}/database/dynamo/index.js +0 -0
- /package/{prefab → .dist/prefab}/database/index.d.ts.map +0 -0
- /package/{prefab → .dist/prefab}/database/index.js +0 -0
- /package/{prefab → .dist/prefab}/database/index.js.map +0 -0
- /package/{prefab → .dist/prefab}/database/rds/handlers/start-cluster/handler.d.ts.map +0 -0
- /package/{prefab → .dist/prefab}/database/rds/handlers/start-cluster/handler.js +0 -0
- /package/{prefab → .dist/prefab}/database/rds/handlers/start-cluster/handler.js.map +0 -0
- /package/{prefab → .dist/prefab}/database/rds/handlers/stop-cluster/handler.d.ts.map +0 -0
- /package/{prefab → .dist/prefab}/database/rds/handlers/stop-cluster/handler.js +0 -0
- /package/{prefab → .dist/prefab}/database/rds/handlers/stop-cluster/handler.js.map +0 -0
- /package/{prefab → .dist/prefab}/database/timestream/index.d.ts.map +0 -0
- /package/{prefab → .dist/prefab}/database/timestream/index.js +0 -0
- /package/{prefab → .dist/prefab}/database/timestream/index.js.map +0 -0
- /package/{prefab → .dist/prefab}/database/timestream/timestream-database.js +0 -0
- /package/{prefab → .dist/prefab}/database/timestream/timestream-table.js +0 -0
- /package/{prefab → .dist/prefab}/gateway/alb-public/index.js +0 -0
- /package/{prefab → .dist/prefab}/gateway/api-gateway/api-http.js +0 -0
- /package/{prefab → .dist/prefab}/gateway/api-gateway/api-rest.js +0 -0
- /package/{prefab → .dist/prefab}/gateway/api-gateway/index.d.ts.map +0 -0
- /package/{prefab → .dist/prefab}/gateway/api-gateway/index.js +0 -0
- /package/{prefab → .dist/prefab}/gateway/api-gateway/index.js.map +0 -0
- /package/{prefab → .dist/prefab}/gateway/app-sync/index.js +0 -0
- /package/{prefab → .dist/prefab}/gateway/app-sync/resolver-aggregate.js +0 -0
- /package/{prefab → .dist/prefab}/gateway/app-sync/types.js +0 -0
- /package/{prefab → .dist/prefab}/gateway/app-sync/types.js.map +0 -0
- /package/{prefab → .dist/prefab}/gateway/index.d.ts.map +0 -0
- /package/{prefab → .dist/prefab}/gateway/index.js +0 -0
- /package/{prefab → .dist/prefab}/gateway/index.js.map +0 -0
- /package/{prefab → .dist/prefab}/index.d.ts.map +0 -0
- /package/{prefab → .dist/prefab}/index.js +0 -0
- /package/{prefab → .dist/prefab}/index.js.map +0 -0
- /package/{prefab → .dist/prefab}/integration/event-bus/index.js +0 -0
- /package/{prefab → .dist/prefab}/integration/index.d.ts.map +0 -0
- /package/{prefab → .dist/prefab}/integration/index.js +0 -0
- /package/{prefab → .dist/prefab}/integration/index.js.map +0 -0
- /package/{prefab → .dist/prefab}/integration/queue/index.js +0 -0
- /package/{prefab → .dist/prefab}/integration/topic/index.js +0 -0
- /package/{prefab → .dist/prefab}/networking/dns-domain-ref/index.js +0 -0
- /package/{prefab → .dist/prefab}/networking/dns-subdomain-certificate/index.js +0 -0
- /package/{prefab → .dist/prefab}/networking/dns-subdomain-hosted-zone/index.js +0 -0
- /package/{prefab → .dist/prefab}/networking/index.d.ts.map +0 -0
- /package/{prefab → .dist/prefab}/networking/index.js +0 -0
- /package/{prefab → .dist/prefab}/networking/index.js.map +0 -0
- /package/{prefab → .dist/prefab}/networking/vpc/index.js +0 -0
- /package/{prefab → .dist/prefab}/networking/waf/index.js +0 -0
- /package/{prefab → .dist/prefab}/storage/bucket/asset-bucket.js +0 -0
- /package/{prefab → .dist/prefab}/storage/bucket/asset-bucket.js.map +0 -0
- /package/{prefab → .dist/prefab}/storage/bucket/index.d.ts.map +0 -0
- /package/{prefab → .dist/prefab}/storage/bucket/index.js +0 -0
- /package/{prefab → .dist/prefab}/storage/bucket/index.js.map +0 -0
- /package/{prefab → .dist/prefab}/storage/bucket/private-bucket.js +0 -0
- /package/{prefab → .dist/prefab}/storage/index.d.ts.map +0 -0
- /package/{prefab → .dist/prefab}/storage/index.js +0 -0
- /package/{prefab → .dist/prefab}/storage/index.js.map +0 -0
- /package/{prefab → .dist/prefab}/utils/config/frontend-env-builder.js +0 -0
- /package/{prefab → .dist/prefab}/utils/config/index.d.ts.map +0 -0
- /package/{prefab → .dist/prefab}/utils/config/index.js +0 -0
- /package/{prefab → .dist/prefab}/utils/config/index.js.map +0 -0
- /package/{prefab → .dist/prefab}/utils/config/parameter-secret.js +0 -0
- /package/{prefab → .dist/prefab}/utils/config/runtime-secret.d.ts +0 -0
- /package/{prefab → .dist/prefab}/utils/config/runtime-secret.js +0 -0
- /package/{prefab → .dist/prefab}/utils/deploy-pipeline/catalog/integrations/index.d.ts.map +0 -0
- /package/{prefab → .dist/prefab}/utils/deploy-pipeline/catalog/integrations/index.js +0 -0
- /package/{prefab → .dist/prefab}/utils/deploy-pipeline/catalog/integrations/index.js.map +0 -0
- /package/{prefab → .dist/prefab}/utils/deploy-pipeline/catalog/integrations/slack.d.ts +0 -0
- /package/{prefab → .dist/prefab}/utils/deploy-pipeline/catalog/integrations/slack.d.ts.map +0 -0
- /package/{prefab → .dist/prefab}/utils/deploy-pipeline/catalog/integrations/slack.js +0 -0
- /package/{prefab → .dist/prefab}/utils/deploy-pipeline/catalog/integrations/slack.js.map +0 -0
- /package/{prefab → .dist/prefab}/utils/deploy-pipeline/entities/index.d.ts.map +0 -0
- /package/{prefab → .dist/prefab}/utils/deploy-pipeline/entities/index.js +0 -0
- /package/{prefab → .dist/prefab}/utils/deploy-pipeline/entities/index.js.map +0 -0
- /package/{prefab → .dist/prefab}/utils/deploy-pipeline/handlers/send-to-slack/handler.d.ts +0 -0
- /package/{prefab → .dist/prefab}/utils/deploy-pipeline/handlers/send-to-slack/handler.d.ts.map +0 -0
- /package/{prefab → .dist/prefab}/utils/deploy-pipeline/handlers/send-to-slack/handler.js +0 -0
- /package/{prefab → .dist/prefab}/utils/deploy-pipeline/handlers/send-to-slack/handler.js.map +0 -0
- /package/{prefab → .dist/prefab}/utils/deploy-pipeline/index.js +0 -0
- /package/{prefab → .dist/prefab}/utils/deploy-pipeline/platform/get-pipeline-detail.d.ts.map +0 -0
- /package/{prefab → .dist/prefab}/utils/deploy-pipeline/platform/get-pipeline-detail.js +0 -0
- /package/{prefab → .dist/prefab}/utils/deploy-pipeline/platform/get-pipeline-detail.js.map +0 -0
- /package/{prefab → .dist/prefab}/utils/deploy-pipeline/platform/get-slack-payload.d.ts.map +0 -0
- /package/{prefab → .dist/prefab}/utils/deploy-pipeline/platform/get-slack-payload.js +0 -0
- /package/{prefab → .dist/prefab}/utils/deploy-pipeline/platform/get-slack-payload.js.map +0 -0
- /package/{prefab → .dist/prefab}/utils/deploy-pipeline/platform/send-to-slack.d.ts +0 -0
- /package/{prefab → .dist/prefab}/utils/deploy-pipeline/platform/send-to-slack.d.ts.map +0 -0
- /package/{prefab → .dist/prefab}/utils/deploy-pipeline/platform/send-to-slack.js +0 -0
- /package/{prefab → .dist/prefab}/utils/deploy-pipeline/platform/send-to-slack.js.map +0 -0
- /package/{prefab → .dist/prefab}/utils/duration.d.ts.map +0 -0
- /package/{prefab → .dist/prefab}/utils/duration.js +0 -0
- /package/{prefab → .dist/prefab}/utils/duration.js.map +0 -0
- /package/{prefab → .dist/prefab}/utils/index.d.ts.map +0 -0
- /package/{prefab → .dist/prefab}/utils/index.js +0 -0
- /package/{prefab → .dist/prefab}/utils/index.js.map +0 -0
- /package/{prefab → .dist/prefab}/utils/ses/index.js +0 -0
- /package/{script → .dist/script}/config-command/bootstrap.d.ts.map +0 -0
- /package/{script → .dist/script}/config-command/deploy.d.ts.map +0 -0
- /package/{script → .dist/script}/config-command/destroy.d.ts.map +0 -0
- /package/{script → .dist/script}/config-command/env-ssr.d.ts.map +0 -0
- /package/{script → .dist/script}/config-command/invalidation-ssr.d.ts.map +0 -0
- /package/{script → .dist/script}/config-command/rds-migration.d.ts.map +0 -0
- /package/{script → .dist/script}/config-command/rds-migration.js +0 -0
- /package/{script → .dist/script}/config-command/rds-sync.d.ts.map +0 -0
- /package/{script → .dist/script}/config-command/rds-sync.js +0 -0
- /package/{script → .dist/script}/config-command/ssm-connect.d.ts.map +0 -0
- /package/{script → .dist/script}/config-command/ssm-connect.js +0 -0
- /package/{script → .dist/script}/config-command/start-spa.d.ts.map +0 -0
- /package/{script → .dist/script}/config-command/start-ssr.d.ts.map +0 -0
- /package/{script → .dist/script}/config-command/synth.d.ts.map +0 -0
- /package/{script → .dist/script}/index.js +0 -0
- /package/{script → .dist/script}/index.js.map +0 -0
- /package/{script → .dist/script}/output-command/create-user.js +0 -0
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
import * as awsCodebuild from 'aws-cdk-lib/aws-codebuild';
|
|
2
|
+
import { RemovalPolicy } from 'aws-cdk-lib';
|
|
3
|
+
import { Artifact, Pipeline } from 'aws-cdk-lib/aws-codepipeline';
|
|
4
|
+
import { CodeBuildAction, CodeStarConnectionsSourceAction } from 'aws-cdk-lib/aws-codepipeline-actions';
|
|
5
|
+
import { DetailType, NotificationRule } from 'aws-cdk-lib/aws-codestarnotifications';
|
|
6
|
+
import { IManagedPolicy, ManagedPolicy, PolicyStatement, Role, ServicePrincipal } from 'aws-cdk-lib/aws-iam';
|
|
7
|
+
import { NodejsFunction } from 'aws-cdk-lib/aws-lambda-nodejs';
|
|
8
|
+
import { Bucket } from 'aws-cdk-lib/aws-s3';
|
|
9
|
+
import { StringParameter } from 'aws-cdk-lib/aws-ssm';
|
|
10
|
+
import { Construct } from 'constructs';
|
|
11
|
+
|
|
12
|
+
import { ServiceStack, getBucketName, getLogicalName } from '../../../common';
|
|
13
|
+
|
|
14
|
+
import { TopicFunction } from '../../compute/function/topic-function';
|
|
15
|
+
import { ParameterSecret } from '../config/parameter-secret';
|
|
16
|
+
|
|
17
|
+
export type DeployPipelineProps = {
|
|
18
|
+
preDeployCommands?: string[];
|
|
19
|
+
postDeployCommands?: string[];
|
|
20
|
+
codeBuildProjectParams?: Partial<awsCodebuild.ProjectProps>;
|
|
21
|
+
useExtraSlackNotification?: boolean;
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
export class DeployPipelinePrefab extends Construct {
|
|
25
|
+
constructor(service: ServiceStack, params: DeployPipelineProps) {
|
|
26
|
+
super(service, getLogicalName(DeployPipelinePrefab.name));
|
|
27
|
+
|
|
28
|
+
const overriddenService: ServiceStack = Object.assign({ props: { ...service.props } }, service);
|
|
29
|
+
overriddenService.props.isSingleProjectAccount = false;
|
|
30
|
+
|
|
31
|
+
if (overriddenService.props.ephemeralEnvName) return;
|
|
32
|
+
|
|
33
|
+
const repositoryOwner = StringParameter.valueFromLookup(this, 'pipeline-default-repository-owner');
|
|
34
|
+
const repositoryConnection = StringParameter.valueFromLookup(this, 'pipeline-default-repository-connection');
|
|
35
|
+
|
|
36
|
+
const sourceCodeArtifact = new Artifact('sourceCode');
|
|
37
|
+
const sourceCodeAction = new CodeStarConnectionsSourceAction({
|
|
38
|
+
actionName: 'FetchRepo',
|
|
39
|
+
branch: overriddenService.props.deployBranch,
|
|
40
|
+
repo: overriddenService.props.repositoryName,
|
|
41
|
+
output: sourceCodeArtifact,
|
|
42
|
+
owner: repositoryOwner,
|
|
43
|
+
connectionArn: repositoryConnection,
|
|
44
|
+
});
|
|
45
|
+
|
|
46
|
+
const deploymentRole = new Role(this, 'DeployRole', { assumedBy: new ServicePrincipal('codebuild.amazonaws.com') });
|
|
47
|
+
const policy: IManagedPolicy = ManagedPolicy.fromAwsManagedPolicyName('AdministratorAccess');
|
|
48
|
+
deploymentRole.addManagedPolicy(policy);
|
|
49
|
+
|
|
50
|
+
const workerCommands =
|
|
51
|
+
StringParameter.valueFromLookup(this, 'pipeline-deploy-worker-role') !== 'null'
|
|
52
|
+
? [
|
|
53
|
+
'output=$(aws sts assume-role --role-arn "$DEPLOY_WORKER_ROLE" --role-session-name "CDK" --query "Credentials.[AccessKeyId,SecretAccessKey,SessionToken]" --output text)',
|
|
54
|
+
"var1=$(echo \"$output\" | awk -F'\t' '{print $1}')",
|
|
55
|
+
"var2=$(echo \"$output\" | awk -F'\t' '{print $2}')",
|
|
56
|
+
"var3=$(echo \"$output\" | awk -F'\t' '{print $3}')",
|
|
57
|
+
'export AWS_ACCESS_KEY_ID=$var1',
|
|
58
|
+
'export AWS_SECRET_ACCESS_KEY=$var2',
|
|
59
|
+
'export AWS_SESSION_TOKEN=$var3',
|
|
60
|
+
]
|
|
61
|
+
: [];
|
|
62
|
+
|
|
63
|
+
const codebuildProject = new awsCodebuild.Project(this, 'CodebuildProject', {
|
|
64
|
+
projectName: `${overriddenService.props.projectName}-${overriddenService.props.envName}`,
|
|
65
|
+
role: deploymentRole,
|
|
66
|
+
environment: {
|
|
67
|
+
computeType: awsCodebuild.ComputeType.LARGE,
|
|
68
|
+
buildImage: awsCodebuild.LinuxBuildImage.STANDARD_7_0,
|
|
69
|
+
},
|
|
70
|
+
buildSpec: awsCodebuild.BuildSpec.fromObject({
|
|
71
|
+
version: '0.2',
|
|
72
|
+
phases: {
|
|
73
|
+
install: {
|
|
74
|
+
'runtime-versions': { nodejs: 18 },
|
|
75
|
+
},
|
|
76
|
+
pre_build: {
|
|
77
|
+
commands: [
|
|
78
|
+
...workerCommands,
|
|
79
|
+
'npm install --global yarn',
|
|
80
|
+
'npm set //npm.pkg.github.com/:_authToken $GITHUB_TOKEN',
|
|
81
|
+
'yarn --prod',
|
|
82
|
+
...(params.preDeployCommands || []),
|
|
83
|
+
],
|
|
84
|
+
},
|
|
85
|
+
build: {
|
|
86
|
+
commands: [`yarn deploy ${overriddenService.props.envName}`],
|
|
87
|
+
},
|
|
88
|
+
post_build: {
|
|
89
|
+
commands: params.postDeployCommands || [],
|
|
90
|
+
},
|
|
91
|
+
},
|
|
92
|
+
}),
|
|
93
|
+
...params.codeBuildProjectParams,
|
|
94
|
+
// I put this at the end because we need to prevent to override the environment variables
|
|
95
|
+
environmentVariables: {
|
|
96
|
+
GITHUB_TOKEN: {
|
|
97
|
+
type: awsCodebuild.BuildEnvironmentVariableType.PARAMETER_STORE,
|
|
98
|
+
value: 'pipeline-default-repository-token',
|
|
99
|
+
},
|
|
100
|
+
DEPLOY_WORKER_ROLE: {
|
|
101
|
+
type: awsCodebuild.BuildEnvironmentVariableType.PARAMETER_STORE,
|
|
102
|
+
value: 'pipeline-deploy-worker-role',
|
|
103
|
+
},
|
|
104
|
+
...params.codeBuildProjectParams?.environmentVariables,
|
|
105
|
+
},
|
|
106
|
+
});
|
|
107
|
+
|
|
108
|
+
const deployAction = new CodeBuildAction({
|
|
109
|
+
actionName: 'Deploy',
|
|
110
|
+
input: sourceCodeArtifact,
|
|
111
|
+
project: codebuildProject,
|
|
112
|
+
});
|
|
113
|
+
|
|
114
|
+
const pipeline = new Pipeline(this, 'Pipeline', {
|
|
115
|
+
crossAccountKeys: false,
|
|
116
|
+
pipelineName: `${overriddenService.props.projectName}-${overriddenService.props.envName}`,
|
|
117
|
+
artifactBucket: new Bucket(this, 'bucket', {
|
|
118
|
+
bucketName: getBucketName('bucket', overriddenService.props),
|
|
119
|
+
autoDeleteObjects: true,
|
|
120
|
+
removalPolicy: RemovalPolicy.DESTROY,
|
|
121
|
+
}),
|
|
122
|
+
stages: [
|
|
123
|
+
{ stageName: 'Source', actions: [sourceCodeAction] },
|
|
124
|
+
{ stageName: 'Deploy', actions: [deployAction] },
|
|
125
|
+
],
|
|
126
|
+
});
|
|
127
|
+
|
|
128
|
+
if (overriddenService.props.pipelineNotificationSlackChannel) {
|
|
129
|
+
const extraSlackNotification = 'extra-slack-notification';
|
|
130
|
+
const defaultSlackToken = new ParameterSecret(service, { existingName: 'pipeline-default-slack-token' });
|
|
131
|
+
const modifiers = [getPipelineExecution(), defaultSlackToken.useModReader('DEFAULT_SLACK_TOKEN_PARAMETER')];
|
|
132
|
+
|
|
133
|
+
if (params.useExtraSlackNotification) {
|
|
134
|
+
const extraSlackNotificationParam = new ParameterSecret(service, { name: extraSlackNotification });
|
|
135
|
+
modifiers.push(extraSlackNotificationParam.useModReader('SLACK_EXTRA_CONFIG_NAME'));
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
const topicFunction = new TopicFunction(service, {
|
|
139
|
+
customTopicParams: { name: 'notifications' },
|
|
140
|
+
name: 'send-to-slack',
|
|
141
|
+
baseFunctionFolder: __dirname,
|
|
142
|
+
modifiers,
|
|
143
|
+
...(overriddenService.props.isDemoProject ? {} : { compiled: true }),
|
|
144
|
+
environment: {
|
|
145
|
+
REPOSITORY_OWNER: repositoryOwner,
|
|
146
|
+
REPOSITORY_NAME: overriddenService.props.repositoryName,
|
|
147
|
+
DEFAULT_SLACK_CHANNEL: overriddenService.props.pipelineNotificationSlackChannel,
|
|
148
|
+
},
|
|
149
|
+
});
|
|
150
|
+
|
|
151
|
+
new NotificationRule(this, 'Notification', {
|
|
152
|
+
notificationRuleName: `${overriddenService.props.projectName}-${overriddenService.props.envName}`,
|
|
153
|
+
detailType: DetailType.FULL,
|
|
154
|
+
source: pipeline,
|
|
155
|
+
targets: [topicFunction.customTopic.topic],
|
|
156
|
+
events: ['codepipeline-pipeline-pipeline-execution-failed', 'codepipeline-pipeline-pipeline-execution-succeeded'],
|
|
157
|
+
});
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
// }
|
|
162
|
+
|
|
163
|
+
const getPipelineExecution = (): ((lambda: NodejsFunction) => void) => {
|
|
164
|
+
return (lambda: NodejsFunction): void => {
|
|
165
|
+
lambda.role?.addToPrincipalPolicy(
|
|
166
|
+
new PolicyStatement({
|
|
167
|
+
actions: ['codepipeline:GetPipelineExecution'],
|
|
168
|
+
resources: ['*'],
|
|
169
|
+
})
|
|
170
|
+
);
|
|
171
|
+
};
|
|
172
|
+
};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { CodePipelineClient, GetPipelineExecutionCommand } from '@aws-sdk/client-codepipeline';
|
|
2
|
+
|
|
3
|
+
const codepipeline = new CodePipelineClient({});
|
|
4
|
+
|
|
5
|
+
export type PipelineDetail = {
|
|
6
|
+
commitId: string;
|
|
7
|
+
commitMessage: string;
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
export const getPipelineDetail = async (pipelineName: string, executionId: string): Promise<PipelineDetail> => {
|
|
11
|
+
const { pipelineExecution } = await codepipeline.send(
|
|
12
|
+
new GetPipelineExecutionCommand({
|
|
13
|
+
pipelineName: pipelineName,
|
|
14
|
+
pipelineExecutionId: executionId,
|
|
15
|
+
})
|
|
16
|
+
);
|
|
17
|
+
|
|
18
|
+
if (!pipelineExecution) throw new Error('Missing pipelineExecution');
|
|
19
|
+
|
|
20
|
+
const detail = pipelineExecution.artifactRevisions
|
|
21
|
+
?.filter((a) => a.name === 'sourceCode')
|
|
22
|
+
.map((a) => {
|
|
23
|
+
return {
|
|
24
|
+
commitId: a.revisionId || '',
|
|
25
|
+
commitMessage: JSON.parse(a.revisionSummary || '{}')['CommitMessage'],
|
|
26
|
+
};
|
|
27
|
+
});
|
|
28
|
+
|
|
29
|
+
if (!detail || !detail[0]) throw new Error('Missing artifactRevision');
|
|
30
|
+
return detail[0];
|
|
31
|
+
};
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { SlackNotificationPayload } from '../entities';
|
|
2
|
+
|
|
3
|
+
export const getSlackPayload = (pipelineName: string, state: string, commitId: string, commitMessage: string): SlackNotificationPayload => {
|
|
4
|
+
const commitUrl = `https://github.com/${process.env.REPOSITORY_OWNER}/${process.env.REPOSITORY_NAME}/commit/${commitId}`;
|
|
5
|
+
const url = `https://us-east-1.console.aws.amazon.com/codesuite/codepipeline/pipelines/${pipelineName}/view?region=us-east-1`;
|
|
6
|
+
const fallback = ':robot_face: *[Deploy Pipeline]* :robot_face:\n';
|
|
7
|
+
const color = state === 'FAILED' ? '#D00000' : '#00d02d';
|
|
8
|
+
const fieldState =
|
|
9
|
+
state === 'FAILED'
|
|
10
|
+
? [
|
|
11
|
+
{
|
|
12
|
+
title: 'Status: [Pipeline Failed]',
|
|
13
|
+
short: false,
|
|
14
|
+
value: `_For more details <${url}|Go to AWS Console>_ `,
|
|
15
|
+
},
|
|
16
|
+
]
|
|
17
|
+
: [
|
|
18
|
+
{
|
|
19
|
+
title: 'Status: [Pipeline Finished]',
|
|
20
|
+
short: false,
|
|
21
|
+
value: `Deployed at: ${new Date().toDateString()}`,
|
|
22
|
+
},
|
|
23
|
+
];
|
|
24
|
+
|
|
25
|
+
return {
|
|
26
|
+
color,
|
|
27
|
+
fallback,
|
|
28
|
+
fields: [
|
|
29
|
+
{ title: 'Pipeline', short: false, value: pipelineName },
|
|
30
|
+
{
|
|
31
|
+
title: 'Commit',
|
|
32
|
+
short: false,
|
|
33
|
+
value: `${commitMessage} \n\n _For more details <${commitUrl}|Go to GitHub>_`,
|
|
34
|
+
},
|
|
35
|
+
...fieldState,
|
|
36
|
+
],
|
|
37
|
+
};
|
|
38
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { apiCall } from '@takumi-stack/sdk';
|
|
2
|
+
|
|
3
|
+
import { Slack } from '../catalog/integrations';
|
|
4
|
+
import { SlackNotificationPayload, SlackNotificationConfig } from '../entities';
|
|
5
|
+
|
|
6
|
+
export const sendToSlack = async (slackNotificationPayload: SlackNotificationPayload, slackNotificationConfig: SlackNotificationConfig) => {
|
|
7
|
+
const { fallback, color, fields } = slackNotificationPayload;
|
|
8
|
+
await apiCall(
|
|
9
|
+
Slack.config,
|
|
10
|
+
{
|
|
11
|
+
pathParams: { token: slackNotificationConfig.token },
|
|
12
|
+
body: { attachments: [{ pretext: fallback, fallback, color, fields }], channel: slackNotificationConfig.channel },
|
|
13
|
+
},
|
|
14
|
+
{ tracingMeta: {}, ignoreResponse: true }
|
|
15
|
+
);
|
|
16
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Duration } from 'aws-cdk-lib/core';
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
import { UserPoolSESOptions } from '../../../node_modules/aws-cdk-lib/aws-cognito/lib';
|
|
2
|
+
import { NodejsFunction } from '../../../node_modules/aws-cdk-lib/aws-lambda-nodejs/lib/function';
|
|
3
|
+
import { Effect, PolicyStatement } from 'aws-cdk-lib/aws-iam';
|
|
4
|
+
import { CnameRecord, HostedZone, IHostedZone } from 'aws-cdk-lib/aws-route53';
|
|
5
|
+
import { AwsCustomResource, AwsCustomResourcePolicy, PhysicalResourceId } from 'aws-cdk-lib/custom-resources';
|
|
6
|
+
import { Construct } from 'constructs';
|
|
7
|
+
|
|
8
|
+
import { BaseGlobalProps, ServiceStack, getDomain, getLogicalName } from '../../../common';
|
|
9
|
+
|
|
10
|
+
export class SesDomain extends Construct {
|
|
11
|
+
constructor(service: ServiceStack) {
|
|
12
|
+
super(service, getLogicalName(SesDomain.name));
|
|
13
|
+
|
|
14
|
+
const domain = getDomain('', service.props);
|
|
15
|
+
const zone = this.getHostedZone(domain);
|
|
16
|
+
|
|
17
|
+
const verifyDomainIdentity = this.verifyDomainIdentity(domain);
|
|
18
|
+
|
|
19
|
+
const verifyDomainDkim = this.verifyDomainDkim(domain);
|
|
20
|
+
verifyDomainDkim.node.addDependency(verifyDomainIdentity);
|
|
21
|
+
|
|
22
|
+
this.addDkimRecords(verifyDomainDkim, zone, domain);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
private verifyDomainIdentity(domainName: string): AwsCustomResource {
|
|
26
|
+
return new AwsCustomResource(this, 'VerifyDomainIdentity', {
|
|
27
|
+
installLatestAwsSdk: true,
|
|
28
|
+
onCreate: {
|
|
29
|
+
service: 'SES',
|
|
30
|
+
action: 'verifyDomainIdentity',
|
|
31
|
+
parameters: {
|
|
32
|
+
Domain: domainName,
|
|
33
|
+
},
|
|
34
|
+
physicalResourceId: PhysicalResourceId.fromResponse('VerificationToken'),
|
|
35
|
+
},
|
|
36
|
+
onUpdate: {
|
|
37
|
+
service: 'SES',
|
|
38
|
+
action: 'verifyDomainIdentity',
|
|
39
|
+
parameters: {
|
|
40
|
+
Domain: domainName,
|
|
41
|
+
},
|
|
42
|
+
physicalResourceId: PhysicalResourceId.fromResponse('VerificationToken'),
|
|
43
|
+
},
|
|
44
|
+
onDelete: {
|
|
45
|
+
service: 'SES',
|
|
46
|
+
action: 'deleteIdentity',
|
|
47
|
+
parameters: {
|
|
48
|
+
Identity: domainName,
|
|
49
|
+
},
|
|
50
|
+
},
|
|
51
|
+
policy: generateSesPolicyForCustomResource('VerifyDomainIdentity', 'DeleteIdentity'),
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
private verifyDomainDkim(domainName: string): AwsCustomResource {
|
|
56
|
+
return new AwsCustomResource(this, 'VerifyDomainDkim', {
|
|
57
|
+
installLatestAwsSdk: true,
|
|
58
|
+
onCreate: {
|
|
59
|
+
service: 'SES',
|
|
60
|
+
action: 'verifyDomainDkim',
|
|
61
|
+
parameters: {
|
|
62
|
+
Domain: domainName,
|
|
63
|
+
},
|
|
64
|
+
physicalResourceId: PhysicalResourceId.of(`${domainName}-verify-domain-dkim`),
|
|
65
|
+
},
|
|
66
|
+
onUpdate: {
|
|
67
|
+
service: 'SES',
|
|
68
|
+
action: 'verifyDomainDkim',
|
|
69
|
+
parameters: {
|
|
70
|
+
Domain: domainName,
|
|
71
|
+
},
|
|
72
|
+
physicalResourceId: PhysicalResourceId.of(`${domainName}-verify-domain-dkim`),
|
|
73
|
+
},
|
|
74
|
+
policy: generateSesPolicyForCustomResource('VerifyDomainDkim'),
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
private getHostedZone(domainName: string): IHostedZone {
|
|
79
|
+
return HostedZone.fromLookup(this, 'Zone', {
|
|
80
|
+
domainName: domainName,
|
|
81
|
+
});
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
private addDkimRecords(verifyDomainDkim: AwsCustomResource, zone: IHostedZone, domainName: string) {
|
|
85
|
+
[0, 1, 2].forEach((val) => {
|
|
86
|
+
const dkimToken = verifyDomainDkim.getResponseField(`DkimTokens.${val}`);
|
|
87
|
+
const cnameRecord = new CnameRecord(this, 'SesDkimVerificationRecord' + val, {
|
|
88
|
+
zone,
|
|
89
|
+
recordName: `${dkimToken}._domainkey.${domainName}`,
|
|
90
|
+
domainName: `${dkimToken}.dkim.amazonses.com`,
|
|
91
|
+
});
|
|
92
|
+
cnameRecord.node.addDependency(verifyDomainDkim);
|
|
93
|
+
});
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
// Custom Methods
|
|
97
|
+
public useMod(mods: (() => any)[]): (lambda: NodejsFunction) => void {
|
|
98
|
+
return (lambda: NodejsFunction): void => {
|
|
99
|
+
mods.map((fn) => fn()(lambda));
|
|
100
|
+
};
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
public static modifier = {
|
|
104
|
+
emailSender: (): ((lambda: NodejsFunction) => void) => {
|
|
105
|
+
return (lambda: NodejsFunction): void => {
|
|
106
|
+
lambda.addToRolePolicy(new PolicyStatement({ effect: Effect.ALLOW, actions: ['ses:SendRawEmail'], resources: ['*'] }));
|
|
107
|
+
};
|
|
108
|
+
},
|
|
109
|
+
smsSender: (): ((lambda: NodejsFunction) => void) => {
|
|
110
|
+
return (lambda: NodejsFunction): void => {
|
|
111
|
+
lambda.addToRolePolicy(new PolicyStatement({ effect: Effect.ALLOW, actions: ['sns:Publish'], resources: ['*'] }));
|
|
112
|
+
};
|
|
113
|
+
},
|
|
114
|
+
};
|
|
115
|
+
|
|
116
|
+
public static getCognitoRef(props: BaseGlobalProps): UserPoolSESOptions {
|
|
117
|
+
return {
|
|
118
|
+
// emailSendingAccount: 'DEVELOPER',
|
|
119
|
+
fromEmail: props.emailSender,
|
|
120
|
+
sesVerifiedDomain: getDomain('', props),
|
|
121
|
+
// sourceArn: `arn:aws:ses:${props.regionName}:${props.deployTarget['services'].account}:identity/${getDomain('', props)}`,
|
|
122
|
+
};
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
export function generateSesPolicyForCustomResource(...methods: string[]): AwsCustomResourcePolicy {
|
|
127
|
+
return AwsCustomResourcePolicy.fromStatements([
|
|
128
|
+
new PolicyStatement({
|
|
129
|
+
actions: methods.map((method) => 'ses:' + method),
|
|
130
|
+
effect: Effect.ALLOW,
|
|
131
|
+
resources: ['*'],
|
|
132
|
+
}),
|
|
133
|
+
]);
|
|
134
|
+
}
|
package/readme.md
ADDED
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
# CC-CORE
|
|
2
|
+
|
|
3
|
+
`CC-CORE` serves as the fundamental library upon which CC is built, providing the essential framework for creating the entire application infrastructure. Based on CDK, it offers extensibility through native commands, thereby leveraging the inherent advantages of being strongly opinionated.
|
|
4
|
+
|
|
5
|
+
Each individual component, or Prefab, within `CC-CORE` embodies production-ready capabilities, adhering rigorously to established standards of quality, performance, and security. This opinionated approach ensures that every element encapsulated within `CC-CORE` contributes to a robust and reliable application, aligning seamlessly with the highest benchmarks in terms of quality, performance, and security.
|
|
6
|
+
|
|
7
|
+
By leveraging `CC-CORE`, developers benefit from a structured, opinionated framework that not only streamlines infrastructure creation but also upholds uncompromising standards of excellence across the entire application ecosystem.
|
|
8
|
+
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
### This package includes:
|
|
12
|
+
|
|
13
|
+
### `common`
|
|
14
|
+
|
|
15
|
+
Includes primary definitions for foundational pieces like:
|
|
16
|
+
|
|
17
|
+
- `coordinator.ts`: Module for coordinating tasks.
|
|
18
|
+
- `modifier.ts`: Utilities for modifying data.
|
|
19
|
+
- `service.ts`: Service-related functionalities.
|
|
20
|
+
|
|
21
|
+
And also the folder `naming` for naming conventions and `synth` for CDK generation helpers
|
|
22
|
+
|
|
23
|
+
### `prefab`
|
|
24
|
+
|
|
25
|
+
Houses different high level infra components:
|
|
26
|
+
|
|
27
|
+
- `analytics`: Modules related to analytics:
|
|
28
|
+
- `events`: Automatic data ingestion for Event Bridge events
|
|
29
|
+
- `auth`: Authentication-related modules:
|
|
30
|
+
- `cognito-pool`: Cognito pool functionalities.
|
|
31
|
+
- `compute`: Computational modules:
|
|
32
|
+
- `fargate`: Fargate-related modules.
|
|
33
|
+
- `function`: Lambda functions with different kind of triggers:
|
|
34
|
+
- `api-function`: API function modules.
|
|
35
|
+
- `base-function`: Base function modules.
|
|
36
|
+
- `cognito-function`: Cognito function modules.
|
|
37
|
+
- `cron-function`: Cron job function modules.
|
|
38
|
+
- `event-function`: Event function modules.
|
|
39
|
+
- `queue-function`: Queue function modules.
|
|
40
|
+
- `topic-function`: Topic function modules.
|
|
41
|
+
- `frontend`: Infra for Frontend-related functionalities:
|
|
42
|
+
- `spa`: Single Page Application modules.
|
|
43
|
+
- `ssr`: Server-Side Rendering modules.
|
|
44
|
+
- `gateway`: Gateway-related modules:
|
|
45
|
+
- `alb-public`: ALB Public modules.
|
|
46
|
+
- `api`: API-related modules.
|
|
47
|
+
- `app-sync`: App Sync modules.
|
|
48
|
+
- `cdn-api`: CDN API modules.
|
|
49
|
+
- `cdn-asset`: CDN Asset modules.
|
|
50
|
+
- `integration`: Integration modules:
|
|
51
|
+
- `event-bus`: Event bus integration modules.
|
|
52
|
+
- `queue`: Queue integration modules.
|
|
53
|
+
- `topic`: Topic integration modules.
|
|
54
|
+
- `networking`: Networking-related modules:
|
|
55
|
+
- `dns-domain-ref`: DNS domain reference modules.
|
|
56
|
+
- `dns-subdomain-certificate`: DNS subdomain certificate modules.
|
|
57
|
+
- `dns-subdomain-hosted-zone`: DNS subdomain hosted zone modules.
|
|
58
|
+
- `vpc`: VPC modules.
|
|
59
|
+
- `waf`: WAF modules.
|
|
60
|
+
- `storage`: Storage-related modules:
|
|
61
|
+
- `bucket`: Bucket-related modules.
|
|
62
|
+
- `dynamo`: DynamoDB-related modules.
|
|
63
|
+
- `rds`: RDS-related modules.
|
|
64
|
+
- `timestream`: Timestream-related modules.
|
|
65
|
+
- `util`: Utility modules:
|
|
66
|
+
- `config`: Configuration-related utilities.
|
|
67
|
+
- `deploy-pipeline`: Deployment pipeline utilities.
|
|
68
|
+
- `ses`: SES (Simple Email Service) utilities.
|
|
69
|
+
|
|
70
|
+
### `script`
|
|
71
|
+
|
|
72
|
+
Scripts and commands for various tasks:
|
|
73
|
+
|
|
74
|
+
- `config-command`: Configuration command scripts.
|
|
75
|
+
- `index.ts`: Index file for scripts.
|
|
76
|
+
- `output-command`: Output command scripts.
|
|
77
|
+
|
|
78
|
+
---
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
/* eslint-disable no-console */
|
|
2
|
+
import { execSync } from 'child_process';
|
|
3
|
+
|
|
4
|
+
import {
|
|
5
|
+
BaseEnvName,
|
|
6
|
+
BaseGlobalEnv,
|
|
7
|
+
BaseDeployTargetName,
|
|
8
|
+
BaseGlobalConstConfig,
|
|
9
|
+
BaseGlobalEnvConfig,
|
|
10
|
+
BaseGlobalDeployTargetConfig,
|
|
11
|
+
preScript,
|
|
12
|
+
BaseRegionName,
|
|
13
|
+
assumeRole,
|
|
14
|
+
} from '../../common';
|
|
15
|
+
|
|
16
|
+
import { ConfigCommand } from '..';
|
|
17
|
+
|
|
18
|
+
export const bootstrap: ConfigCommand = async <
|
|
19
|
+
GlobalConst,
|
|
20
|
+
AllowedEnv extends BaseEnvName = BaseEnvName,
|
|
21
|
+
GlobalEnv extends BaseGlobalEnv = BaseGlobalEnv,
|
|
22
|
+
DeployTargetName extends BaseDeployTargetName = BaseDeployTargetName,
|
|
23
|
+
>(
|
|
24
|
+
globalConstConfig: BaseGlobalConstConfig<GlobalConst>,
|
|
25
|
+
globalEnvConfig: BaseGlobalEnvConfig<AllowedEnv, GlobalEnv>,
|
|
26
|
+
globalDeployTargetConfig: BaseGlobalDeployTargetConfig<AllowedEnv, DeployTargetName>,
|
|
27
|
+
args: string[]
|
|
28
|
+
): Promise<void> => {
|
|
29
|
+
try {
|
|
30
|
+
console.log('<< Bootstrap Started >>');
|
|
31
|
+
|
|
32
|
+
const { envName, envNameInput, roleName, outputFile, servicesNames, accountMap, bootstrappingServices, landingZones } = await preScript(
|
|
33
|
+
globalConstConfig,
|
|
34
|
+
globalEnvConfig,
|
|
35
|
+
globalDeployTargetConfig,
|
|
36
|
+
args
|
|
37
|
+
);
|
|
38
|
+
|
|
39
|
+
const accountArr = accountMap.split(' ');
|
|
40
|
+
const deployAccount: string = accountArr.find((a) => a.includes('deploy'))?.split('=')[1] || '';
|
|
41
|
+
const serviceAccount: string = accountArr.find((a) => a.includes('services'))?.split('=')[1] || '';
|
|
42
|
+
const dnsAccount: string = accountArr.find((a) => a.includes('dnsShared'))?.split('=')[1] || '';
|
|
43
|
+
|
|
44
|
+
const region = globalDeployTargetConfig[envName as AllowedEnv]['services' as DeployTargetName]['region'];
|
|
45
|
+
|
|
46
|
+
await runBootstrap(landingZones, serviceAccount, region, roleName, envNameInput, outputFile, accountMap, servicesNames);
|
|
47
|
+
|
|
48
|
+
await runBootstrap(landingZones, deployAccount, region, roleName, envNameInput, outputFile, accountMap, servicesNames);
|
|
49
|
+
|
|
50
|
+
if (dnsAccount !== deployAccount) {
|
|
51
|
+
await runBootstrap(landingZones, dnsAccount, region, roleName, envNameInput, outputFile, accountMap, servicesNames);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
if (bootstrappingServices) {
|
|
55
|
+
const command = `npx cdk deploy \
|
|
56
|
+
--require-approval='never' \
|
|
57
|
+
--cloudformation-execution-policies=arn:aws:iam::aws:policy/AdministratorAccess \
|
|
58
|
+
--context env=${envNameInput} \
|
|
59
|
+
--context isBootstrapping=true \
|
|
60
|
+
--context assume-role-credentials:writeIamRoleName=${roleName} \
|
|
61
|
+
--context assume-role-credentials:readIamRoleName=${roleName} \
|
|
62
|
+
--outputs-file ${outputFile} \
|
|
63
|
+
${accountMap} ${bootstrappingServices}`;
|
|
64
|
+
|
|
65
|
+
execSync(command, { stdio: 'inherit', env: process.env });
|
|
66
|
+
}
|
|
67
|
+
} catch (error) {
|
|
68
|
+
process.exit(1);
|
|
69
|
+
}
|
|
70
|
+
};
|
|
71
|
+
|
|
72
|
+
const runBootstrap = async (
|
|
73
|
+
landingZones: string[],
|
|
74
|
+
account: string,
|
|
75
|
+
region: BaseRegionName,
|
|
76
|
+
roleName: string,
|
|
77
|
+
envNameInput: string,
|
|
78
|
+
outputFile: string,
|
|
79
|
+
accountMap: string,
|
|
80
|
+
serviceName: string
|
|
81
|
+
) => {
|
|
82
|
+
const command = `npx cdk bootstrap ${account}/${region} \
|
|
83
|
+
--require-approval='never' \
|
|
84
|
+
${landingZones.map((lz) => `--trust ${lz}`).join(' ')} \
|
|
85
|
+
${landingZones.map((lz) => `--trust-for-lookup ${lz}`).join(' ')} \
|
|
86
|
+
--no-bootstrap-customer-key \
|
|
87
|
+
--require-approval='never' \
|
|
88
|
+
--cloudformation-execution-policies=arn:aws:iam::aws:policy/AdministratorAccess \
|
|
89
|
+
--context env=${envNameInput} \
|
|
90
|
+
--outputs-file ${outputFile} \
|
|
91
|
+
${accountMap} ${serviceName}`;
|
|
92
|
+
|
|
93
|
+
const role = await assumeRole({ account, region }, roleName).catch((e) => {
|
|
94
|
+
console.log(e);
|
|
95
|
+
throw e;
|
|
96
|
+
});
|
|
97
|
+
|
|
98
|
+
execSync(command, {
|
|
99
|
+
stdio: 'inherit',
|
|
100
|
+
env: {
|
|
101
|
+
...process.env,
|
|
102
|
+
AWS_ACCESS_KEY_ID: role.credentials.accessKeyId,
|
|
103
|
+
AWS_SECRET_ACCESS_KEY: role.credentials.secretAccessKey,
|
|
104
|
+
AWS_SESSION_TOKEN: role.credentials.sessionToken,
|
|
105
|
+
AWS_REGION: role.region,
|
|
106
|
+
},
|
|
107
|
+
});
|
|
108
|
+
};
|