@gradientedge/cdk-utils 8.118.0 → 8.120.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/app/api-destined-function/package.json +1 -1
- package/dist/src/lib/common/construct.d.ts +32 -32
- package/dist/src/lib/common/construct.js +36 -59
- package/dist/src/lib/common/stack.d.ts +8 -7
- package/dist/src/lib/common/stack.js +17 -37
- package/dist/src/lib/common/types.d.ts +2 -2
- package/dist/src/lib/construct/api-to-eventbridge-target/api.d.ts +22 -22
- package/dist/src/lib/construct/api-to-eventbridge-target/event.d.ts +9 -9
- package/dist/src/lib/construct/api-to-eventbridge-target/main.d.ts +3 -3
- package/dist/src/lib/construct/api-to-eventbridge-target/main.js +37 -60
- package/dist/src/lib/construct/api-to-eventbridge-target-with-sns/api-destined-lambda.d.ts +9 -9
- package/dist/src/lib/construct/api-to-eventbridge-target-with-sns/main.d.ts +3 -3
- package/dist/src/lib/construct/api-to-eventbridge-target-with-sns/main.js +40 -63
- package/dist/src/lib/construct/api-to-lambda-target/api.d.ts +23 -23
- package/dist/src/lib/construct/api-to-lambda-target/main.d.ts +2 -2
- package/dist/src/lib/construct/api-to-lambda-target/main.js +15 -38
- package/dist/src/lib/construct/application-configuration/main.d.ts +7 -7
- package/dist/src/lib/construct/application-configuration/main.js +17 -41
- package/dist/src/lib/construct/graphql-api-lambda/main.d.ts +17 -17
- package/dist/src/lib/construct/graphql-api-lambda/main.js +6 -29
- package/dist/src/lib/construct/graphql-api-lambda-with-cache/main.d.ts +5 -5
- package/dist/src/lib/construct/graphql-api-lambda-with-cache/main.js +7 -7
- package/dist/src/lib/construct/lambda-with-iam-access/main.d.ts +16 -16
- package/dist/src/lib/construct/lambda-with-iam-access/main.js +8 -31
- package/dist/src/lib/construct/lambda-with-iam-access/types.d.ts +4 -4
- package/dist/src/lib/construct/rest-api-lambda/main.d.ts +16 -16
- package/dist/src/lib/construct/rest-api-lambda/main.js +5 -28
- package/dist/src/lib/construct/rest-api-lambda-with-cache/main.d.ts +5 -5
- package/dist/src/lib/construct/rest-api-lambda-with-cache/main.js +9 -32
- package/dist/src/lib/construct/site-with-ecs-backend/main.d.ts +38 -39
- package/dist/src/lib/construct/site-with-ecs-backend/main.js +33 -54
- package/dist/src/lib/construct/static-asset-deployment/main.d.ts +4 -4
- package/dist/src/lib/construct/static-asset-deployment/main.js +3 -26
- package/dist/src/lib/construct/static-site/main.d.ts +15 -15
- package/dist/src/lib/construct/static-site/main.js +4 -27
- package/dist/src/lib/services/{aws/api-gateway → api-gateway}/main.d.ts +10 -10
- package/dist/src/lib/services/{aws/api-gateway → api-gateway}/main.js +21 -44
- package/dist/src/lib/services/api-gateway/types.d.ts +7 -0
- package/dist/src/lib/services/{aws/appconfig → appconfig}/main.d.ts +7 -7
- package/dist/src/lib/services/{aws/appconfig → appconfig}/main.js +14 -37
- package/dist/src/lib/services/{aws/certificate-manager → certificate-manager}/main.d.ts +5 -5
- package/dist/src/lib/services/{aws/certificate-manager → certificate-manager}/main.js +10 -33
- package/dist/src/lib/services/{aws/certificate-manager → certificate-manager}/types.d.ts +2 -2
- package/dist/src/lib/services/{aws/cloudfront → cloudfront}/main.d.ts +19 -19
- package/dist/src/lib/services/{aws/cloudfront → cloudfront}/main.js +47 -46
- package/dist/src/lib/services/{aws/cloudfront → cloudfront}/types.d.ts +3 -4
- package/dist/src/lib/services/{aws/cloudtrail → cloudtrail}/main.d.ts +6 -6
- package/dist/src/lib/services/{aws/cloudtrail → cloudtrail}/main.js +5 -28
- package/dist/src/lib/services/{aws/cloudwatch → cloudwatch}/logs.d.ts +1 -1
- package/dist/src/lib/services/{aws/cloudwatch → cloudwatch}/logs.js +1 -1
- package/dist/src/lib/services/{aws/cloudwatch → cloudwatch}/main.d.ts +1 -1
- package/dist/src/lib/services/{aws/cloudwatch → cloudwatch}/main.js +1 -1
- package/dist/src/lib/services/{aws/cloudwatch → cloudwatch}/types.d.ts +1 -1
- package/dist/src/lib/services/{aws/codebuild → codebuild}/main.d.ts +4 -4
- package/dist/src/lib/services/{aws/codebuild → codebuild}/main.js +7 -30
- package/dist/src/lib/services/{aws/dynamodb → dynamodb}/main.d.ts +4 -4
- package/dist/src/lib/services/{aws/dynamodb → dynamodb}/main.js +8 -31
- package/dist/src/lib/services/{aws/dynamodb → dynamodb}/types.d.ts +1 -1
- package/dist/src/lib/services/{aws/elastic-container-registry → elastic-container-registry}/main.d.ts +3 -3
- package/dist/src/lib/services/elastic-container-registry/main.js +37 -0
- package/dist/src/lib/services/{aws/elastic-container-service → elastic-container-service}/main.d.ts +11 -11
- package/dist/src/lib/services/{aws/elastic-container-service → elastic-container-service}/main.js +27 -50
- package/dist/src/lib/services/{aws/elastic-container-service → elastic-container-service}/types.d.ts +4 -4
- package/dist/src/lib/services/{aws/elastic-file-system → elastic-file-system}/main.d.ts +4 -4
- package/dist/src/lib/services/{aws/elastic-file-system → elastic-file-system}/main.js +12 -35
- package/dist/src/lib/services/{aws/elastic-kubernetes-service → elastic-kubernetes-service}/main.d.ts +5 -5
- package/dist/src/lib/services/{aws/elastic-kubernetes-service → elastic-kubernetes-service}/main.js +8 -31
- package/dist/src/lib/services/{aws/elasticache → elasticache}/main.d.ts +5 -5
- package/dist/src/lib/services/{aws/elasticache → elasticache}/main.js +10 -33
- package/dist/src/lib/services/{aws/eventbridge → eventbridge}/main.d.ts +14 -14
- package/dist/src/lib/services/{aws/eventbridge → eventbridge}/main.js +26 -49
- package/dist/src/lib/services/{aws/eventbridge → eventbridge}/target.d.ts +11 -11
- package/dist/src/lib/services/{aws/eventbridge → eventbridge}/target.js +6 -29
- package/dist/src/lib/services/{aws/eventbridge → eventbridge}/types.d.ts +1 -1
- package/dist/src/lib/services/{aws/evidently → evidently}/main.d.ts +8 -8
- package/dist/src/lib/services/{aws/evidently → evidently}/main.js +18 -41
- package/dist/src/lib/services/{aws/identity-access-management → identity-access-management}/main.d.ts +49 -50
- package/dist/src/lib/services/{aws/identity-access-management → identity-access-management}/main.js +110 -133
- package/dist/src/lib/services/index.d.ts +28 -1
- package/dist/src/lib/services/index.js +28 -1
- package/dist/src/lib/services/{aws/key-management-service → key-management-service}/main.d.ts +3 -3
- package/dist/src/lib/services/{aws/key-management-service → key-management-service}/main.js +5 -28
- package/dist/src/lib/services/{aws/lambda → lambda}/main.d.ts +12 -14
- package/dist/src/lib/services/{aws/lambda → lambda}/main.js +32 -59
- package/dist/src/lib/services/{aws/lambda → lambda}/types.d.ts +1 -1
- package/dist/src/lib/services/{aws/route53 → route53}/main.d.ts +10 -10
- package/dist/src/lib/services/{aws/route53 → route53}/main.js +21 -44
- package/dist/src/lib/services/{aws/secrets-manager → secrets-manager}/main.d.ts +6 -7
- package/dist/src/lib/services/{aws/secrets-manager → secrets-manager}/main.js +10 -33
- package/dist/src/lib/services/{aws/simple-notification-service → simple-notification-service}/main.d.ts +5 -5
- package/dist/src/lib/services/{aws/simple-notification-service → simple-notification-service}/main.js +11 -34
- package/dist/src/lib/services/{aws/simple-queue-service → simple-queue-service}/main.d.ts +7 -8
- package/dist/src/lib/services/{aws/simple-queue-service → simple-queue-service}/main.js +15 -38
- package/dist/src/lib/services/{aws/simple-queue-service → simple-queue-service}/types.d.ts +1 -1
- package/dist/src/lib/services/{aws/simple-storage-service → simple-storage-service}/main.d.ts +10 -11
- package/dist/src/lib/services/{aws/simple-storage-service → simple-storage-service}/main.js +31 -54
- package/dist/src/lib/services/{aws/simple-storage-service → simple-storage-service}/types.d.ts +1 -1
- package/dist/src/lib/services/{aws/step-function → step-function}/main.d.ts +32 -33
- package/dist/src/lib/services/{aws/step-function → step-function}/main.js +33 -57
- package/dist/src/lib/services/{aws/systems-manager → systems-manager}/main.d.ts +5 -5
- package/dist/src/lib/services/{aws/systems-manager → systems-manager}/main.js +10 -33
- package/dist/src/lib/services/{aws/virtual-private-cloud → virtual-private-cloud}/main.d.ts +6 -7
- package/dist/src/lib/services/virtual-private-cloud/main.js +70 -0
- package/dist/src/lib/services/{aws/web-application-firewall → web-application-firewall}/main.d.ts +4 -4
- package/dist/src/lib/services/{aws/web-application-firewall → web-application-firewall}/main.js +8 -31
- package/dist/src/lib/utils/aws/index.d.ts +6 -3
- package/dist/src/lib/utils/aws/index.js +9 -26
- package/package.json +15 -15
- package/src/lib/common/construct.ts +97 -67
- package/src/lib/common/stack.ts +12 -12
- package/src/lib/common/types.ts +2 -2
- package/src/lib/construct/api-to-eventbridge-target/api.ts +31 -22
- package/src/lib/construct/api-to-eventbridge-target/event.ts +9 -9
- package/src/lib/construct/api-to-eventbridge-target/main.ts +56 -41
- package/src/lib/construct/api-to-eventbridge-target-with-sns/api-destined-lambda.ts +9 -9
- package/src/lib/construct/api-to-eventbridge-target-with-sns/main.ts +62 -47
- package/src/lib/construct/api-to-lambda-target/api.ts +33 -23
- package/src/lib/construct/api-to-lambda-target/main.ts +24 -18
- package/src/lib/construct/application-configuration/main.ts +31 -24
- package/src/lib/construct/graphql-api-lambda/main.ts +22 -22
- package/src/lib/construct/graphql-api-lambda-with-cache/main.ts +13 -13
- package/src/lib/construct/lambda-with-iam-access/main.ts +25 -25
- package/src/lib/construct/lambda-with-iam-access/types.ts +4 -4
- package/src/lib/construct/rest-api-lambda/main.ts +21 -21
- package/src/lib/construct/rest-api-lambda-with-cache/main.ts +14 -14
- package/src/lib/construct/site-with-ecs-backend/main.ts +79 -60
- package/src/lib/construct/static-asset-deployment/main.ts +6 -6
- package/src/lib/construct/static-site/main.ts +23 -17
- package/src/lib/services/{aws/api-gateway → api-gateway}/main.ts +42 -36
- package/src/lib/services/api-gateway/types.ts +8 -0
- package/src/lib/services/{aws/appconfig → appconfig}/main.ts +19 -19
- package/src/lib/services/{aws/certificate-manager → certificate-manager}/main.ts +14 -14
- package/src/lib/services/{aws/certificate-manager → certificate-manager}/types.ts +2 -2
- package/src/lib/services/{aws/cloudfront → cloudfront}/main.ts +89 -75
- package/src/lib/services/{aws/cloudfront → cloudfront}/types.ts +7 -4
- package/src/lib/services/{aws/cloudtrail → cloudtrail}/main.ts +12 -12
- package/src/lib/services/{aws/cloudwatch → cloudwatch}/logs.ts +2 -2
- package/src/lib/services/{aws/cloudwatch → cloudwatch}/main.ts +2 -2
- package/src/lib/services/{aws/cloudwatch → cloudwatch}/types.ts +1 -1
- package/src/lib/services/{aws/codebuild → codebuild}/main.ts +8 -8
- package/src/lib/services/{aws/dynamodb → dynamodb}/main.ts +9 -9
- package/src/lib/services/{aws/dynamodb → dynamodb}/types.ts +1 -1
- package/src/lib/services/{aws/elastic-container-registry → elastic-container-registry}/main.ts +5 -5
- package/src/lib/services/{aws/elastic-container-service → elastic-container-service}/main.ts +49 -38
- package/src/lib/services/{aws/elastic-container-service → elastic-container-service}/types.ts +4 -4
- package/src/lib/services/{aws/elastic-file-system → elastic-file-system}/main.ts +17 -17
- package/src/lib/services/{aws/elastic-kubernetes-service → elastic-kubernetes-service}/main.ts +12 -12
- package/src/lib/services/{aws/elasticache → elasticache}/main.ts +11 -11
- package/src/lib/services/{aws/eventbridge → eventbridge}/main.ts +38 -38
- package/src/lib/services/{aws/eventbridge → eventbridge}/target.ts +15 -15
- package/src/lib/services/{aws/eventbridge → eventbridge}/types.ts +1 -1
- package/src/lib/services/{aws/evidently → evidently}/main.ts +19 -19
- package/src/lib/services/{aws/identity-access-management → identity-access-management}/main.ts +143 -135
- package/src/lib/services/index.ts +28 -1
- package/src/lib/services/{aws/key-management-service → key-management-service}/main.ts +6 -6
- package/src/lib/services/{aws/lambda → lambda}/main.ts +66 -60
- package/src/lib/services/{aws/lambda → lambda}/types.ts +1 -1
- package/src/lib/services/{aws/route53 → route53}/main.ts +32 -32
- package/src/lib/services/{aws/secrets-manager → secrets-manager}/main.ts +12 -16
- package/src/lib/services/{aws/simple-notification-service → simple-notification-service}/main.ts +14 -14
- package/src/lib/services/{aws/simple-queue-service → simple-queue-service}/main.ts +19 -19
- package/src/lib/services/{aws/simple-queue-service → simple-queue-service}/types.ts +1 -1
- package/src/lib/services/{aws/simple-storage-service → simple-storage-service}/main.ts +40 -40
- package/src/lib/services/{aws/simple-storage-service → simple-storage-service}/types.ts +1 -1
- package/src/lib/services/{aws/step-function → step-function}/main.ts +78 -66
- package/src/lib/services/{aws/systems-manager → systems-manager}/main.ts +18 -13
- package/src/lib/services/{aws/virtual-private-cloud → virtual-private-cloud}/main.ts +17 -17
- package/src/lib/services/{aws/web-application-firewall → web-application-firewall}/main.ts +9 -9
- package/src/lib/utils/aws/index.ts +8 -5
- package/dist/src/lib/services/aws/api-gateway/types.d.ts +0 -7
- package/dist/src/lib/services/aws/elastic-container-registry/main.js +0 -60
- package/dist/src/lib/services/aws/index.d.ts +0 -28
- package/dist/src/lib/services/aws/index.js +0 -44
- package/dist/src/lib/services/aws/virtual-private-cloud/main.js +0 -93
- package/src/lib/services/aws/api-gateway/types.ts +0 -8
- package/src/lib/services/aws/index.ts +0 -28
- /package/dist/src/lib/services/{aws/api-gateway → api-gateway}/index.d.ts +0 -0
- /package/dist/src/lib/services/{aws/api-gateway → api-gateway}/index.js +0 -0
- /package/dist/src/lib/services/{aws/api-gateway → api-gateway}/types.js +0 -0
- /package/dist/src/lib/services/{aws/appconfig → appconfig}/constants.d.ts +0 -0
- /package/dist/src/lib/services/{aws/appconfig → appconfig}/constants.js +0 -0
- /package/dist/src/lib/services/{aws/appconfig → appconfig}/index.d.ts +0 -0
- /package/dist/src/lib/services/{aws/appconfig → appconfig}/index.js +0 -0
- /package/dist/src/lib/services/{aws/appconfig → appconfig}/types.d.ts +0 -0
- /package/dist/src/lib/services/{aws/appconfig → appconfig}/types.js +0 -0
- /package/dist/src/lib/services/{aws/certificate-manager → certificate-manager}/index.d.ts +0 -0
- /package/dist/src/lib/services/{aws/certificate-manager → certificate-manager}/index.js +0 -0
- /package/dist/src/lib/services/{aws/certificate-manager → certificate-manager}/types.js +0 -0
- /package/dist/src/lib/services/{aws/cloudfront → cloudfront}/index.d.ts +0 -0
- /package/dist/src/lib/services/{aws/cloudfront → cloudfront}/index.js +0 -0
- /package/dist/src/lib/services/{aws/cloudfront → cloudfront}/types.js +0 -0
- /package/dist/src/lib/services/{aws/cloudtrail → cloudtrail}/index.d.ts +0 -0
- /package/dist/src/lib/services/{aws/cloudtrail → cloudtrail}/index.js +0 -0
- /package/dist/src/lib/services/{aws/cloudtrail → cloudtrail}/types.d.ts +0 -0
- /package/dist/src/lib/services/{aws/cloudtrail → cloudtrail}/types.js +0 -0
- /package/dist/src/lib/services/{aws/cloudwatch → cloudwatch}/index.d.ts +0 -0
- /package/dist/src/lib/services/{aws/cloudwatch → cloudwatch}/index.js +0 -0
- /package/dist/src/lib/services/{aws/cloudwatch → cloudwatch}/types.js +0 -0
- /package/dist/src/lib/services/{aws/codebuild → codebuild}/index.d.ts +0 -0
- /package/dist/src/lib/services/{aws/codebuild → codebuild}/index.js +0 -0
- /package/dist/src/lib/services/{aws/constants.d.ts → constants.d.ts} +0 -0
- /package/dist/src/lib/services/{aws/constants.js → constants.js} +0 -0
- /package/dist/src/lib/services/{aws/dynamodb → dynamodb}/index.d.ts +0 -0
- /package/dist/src/lib/services/{aws/dynamodb → dynamodb}/index.js +0 -0
- /package/dist/src/lib/services/{aws/dynamodb → dynamodb}/types.js +0 -0
- /package/dist/src/lib/services/{aws/elastic-container-registry → elastic-container-registry}/index.d.ts +0 -0
- /package/dist/src/lib/services/{aws/elastic-container-registry → elastic-container-registry}/index.js +0 -0
- /package/dist/src/lib/services/{aws/elastic-container-service → elastic-container-service}/index.d.ts +0 -0
- /package/dist/src/lib/services/{aws/elastic-container-service → elastic-container-service}/index.js +0 -0
- /package/dist/src/lib/services/{aws/elastic-container-service → elastic-container-service}/types.js +0 -0
- /package/dist/src/lib/services/{aws/elastic-file-system → elastic-file-system}/index.d.ts +0 -0
- /package/dist/src/lib/services/{aws/elastic-file-system → elastic-file-system}/index.js +0 -0
- /package/dist/src/lib/services/{aws/elastic-file-system → elastic-file-system}/types.d.ts +0 -0
- /package/dist/src/lib/services/{aws/elastic-file-system → elastic-file-system}/types.js +0 -0
- /package/dist/src/lib/services/{aws/elastic-kubernetes-service → elastic-kubernetes-service}/index.d.ts +0 -0
- /package/dist/src/lib/services/{aws/elastic-kubernetes-service → elastic-kubernetes-service}/index.js +0 -0
- /package/dist/src/lib/services/{aws/elastic-kubernetes-service → elastic-kubernetes-service}/types.d.ts +0 -0
- /package/dist/src/lib/services/{aws/elastic-kubernetes-service → elastic-kubernetes-service}/types.js +0 -0
- /package/dist/src/lib/services/{aws/elasticache → elasticache}/index.d.ts +0 -0
- /package/dist/src/lib/services/{aws/elasticache → elasticache}/index.js +0 -0
- /package/dist/src/lib/services/{aws/elasticache → elasticache}/types.d.ts +0 -0
- /package/dist/src/lib/services/{aws/elasticache → elasticache}/types.js +0 -0
- /package/dist/src/lib/services/{aws/eventbridge → eventbridge}/index.d.ts +0 -0
- /package/dist/src/lib/services/{aws/eventbridge → eventbridge}/index.js +0 -0
- /package/dist/src/lib/services/{aws/eventbridge → eventbridge}/types.js +0 -0
- /package/dist/src/lib/services/{aws/evidently → evidently}/index.d.ts +0 -0
- /package/dist/src/lib/services/{aws/evidently → evidently}/index.js +0 -0
- /package/dist/src/lib/services/{aws/evidently → evidently}/types.d.ts +0 -0
- /package/dist/src/lib/services/{aws/evidently → evidently}/types.js +0 -0
- /package/dist/src/lib/services/{aws/identity-access-management → identity-access-management}/index.d.ts +0 -0
- /package/dist/src/lib/services/{aws/identity-access-management → identity-access-management}/index.js +0 -0
- /package/dist/src/lib/services/{aws/key-management-service → key-management-service}/index.d.ts +0 -0
- /package/dist/src/lib/services/{aws/key-management-service → key-management-service}/index.js +0 -0
- /package/dist/src/lib/services/{aws/key-management-service → key-management-service}/types.d.ts +0 -0
- /package/dist/src/lib/services/{aws/key-management-service → key-management-service}/types.js +0 -0
- /package/dist/src/lib/services/{aws/lambda → lambda}/index.d.ts +0 -0
- /package/dist/src/lib/services/{aws/lambda → lambda}/index.js +0 -0
- /package/dist/src/lib/services/{aws/lambda → lambda}/types.js +0 -0
- /package/dist/src/lib/services/{aws/route53 → route53}/index.d.ts +0 -0
- /package/dist/src/lib/services/{aws/route53 → route53}/index.js +0 -0
- /package/dist/src/lib/services/{aws/route53 → route53}/types.d.ts +0 -0
- /package/dist/src/lib/services/{aws/route53 → route53}/types.js +0 -0
- /package/dist/src/lib/services/{aws/secrets-manager → secrets-manager}/index.d.ts +0 -0
- /package/dist/src/lib/services/{aws/secrets-manager → secrets-manager}/index.js +0 -0
- /package/dist/src/lib/services/{aws/simple-notification-service → simple-notification-service}/index.d.ts +0 -0
- /package/dist/src/lib/services/{aws/simple-notification-service → simple-notification-service}/index.js +0 -0
- /package/dist/src/lib/services/{aws/simple-notification-service → simple-notification-service}/types.d.ts +0 -0
- /package/dist/src/lib/services/{aws/simple-notification-service → simple-notification-service}/types.js +0 -0
- /package/dist/src/lib/services/{aws/simple-queue-service → simple-queue-service}/index.d.ts +0 -0
- /package/dist/src/lib/services/{aws/simple-queue-service → simple-queue-service}/index.js +0 -0
- /package/dist/src/lib/services/{aws/simple-queue-service → simple-queue-service}/types.js +0 -0
- /package/dist/src/lib/services/{aws/simple-storage-service → simple-storage-service}/index.d.ts +0 -0
- /package/dist/src/lib/services/{aws/simple-storage-service → simple-storage-service}/index.js +0 -0
- /package/dist/src/lib/services/{aws/simple-storage-service → simple-storage-service}/types.js +0 -0
- /package/dist/src/lib/services/{aws/step-function → step-function}/index.d.ts +0 -0
- /package/dist/src/lib/services/{aws/step-function → step-function}/index.js +0 -0
- /package/dist/src/lib/services/{aws/step-function → step-function}/types.d.ts +0 -0
- /package/dist/src/lib/services/{aws/step-function → step-function}/types.js +0 -0
- /package/dist/src/lib/services/{aws/systems-manager → systems-manager}/index.d.ts +0 -0
- /package/dist/src/lib/services/{aws/systems-manager → systems-manager}/index.js +0 -0
- /package/dist/src/lib/services/{aws/systems-manager → systems-manager}/types.d.ts +0 -0
- /package/dist/src/lib/services/{aws/systems-manager → systems-manager}/types.js +0 -0
- /package/dist/src/lib/services/{aws/virtual-private-cloud → virtual-private-cloud}/index.d.ts +0 -0
- /package/dist/src/lib/services/{aws/virtual-private-cloud → virtual-private-cloud}/index.js +0 -0
- /package/dist/src/lib/services/{aws/web-application-firewall → web-application-firewall}/index.d.ts +0 -0
- /package/dist/src/lib/services/{aws/web-application-firewall → web-application-firewall}/index.js +0 -0
- /package/dist/src/lib/services/{aws/web-application-firewall → web-application-firewall}/types.d.ts +0 -0
- /package/dist/src/lib/services/{aws/web-application-firewall → web-application-firewall}/types.js +0 -0
- /package/src/lib/services/{aws/api-gateway → api-gateway}/index.ts +0 -0
- /package/src/lib/services/{aws/appconfig → appconfig}/constants.ts +0 -0
- /package/src/lib/services/{aws/appconfig → appconfig}/index.ts +0 -0
- /package/src/lib/services/{aws/appconfig → appconfig}/types.ts +0 -0
- /package/src/lib/services/{aws/certificate-manager → certificate-manager}/index.ts +0 -0
- /package/src/lib/services/{aws/cloudfront → cloudfront}/index.ts +0 -0
- /package/src/lib/services/{aws/cloudtrail → cloudtrail}/index.ts +0 -0
- /package/src/lib/services/{aws/cloudtrail → cloudtrail}/types.ts +0 -0
- /package/src/lib/services/{aws/cloudwatch → cloudwatch}/index.ts +0 -0
- /package/src/lib/services/{aws/codebuild → codebuild}/index.ts +0 -0
- /package/src/lib/services/{aws/constants.ts → constants.ts} +0 -0
- /package/src/lib/services/{aws/dynamodb → dynamodb}/index.ts +0 -0
- /package/src/lib/services/{aws/elastic-container-registry → elastic-container-registry}/index.ts +0 -0
- /package/src/lib/services/{aws/elastic-container-service → elastic-container-service}/index.ts +0 -0
- /package/src/lib/services/{aws/elastic-file-system → elastic-file-system}/index.ts +0 -0
- /package/src/lib/services/{aws/elastic-file-system → elastic-file-system}/types.ts +0 -0
- /package/src/lib/services/{aws/elastic-kubernetes-service → elastic-kubernetes-service}/index.ts +0 -0
- /package/src/lib/services/{aws/elastic-kubernetes-service → elastic-kubernetes-service}/types.ts +0 -0
- /package/src/lib/services/{aws/elasticache → elasticache}/index.ts +0 -0
- /package/src/lib/services/{aws/elasticache → elasticache}/types.ts +0 -0
- /package/src/lib/services/{aws/eventbridge → eventbridge}/index.ts +0 -0
- /package/src/lib/services/{aws/evidently → evidently}/index.ts +0 -0
- /package/src/lib/services/{aws/evidently → evidently}/types.ts +0 -0
- /package/src/lib/services/{aws/identity-access-management → identity-access-management}/index.ts +0 -0
- /package/src/lib/services/{aws/key-management-service → key-management-service}/index.ts +0 -0
- /package/src/lib/services/{aws/key-management-service → key-management-service}/types.ts +0 -0
- /package/src/lib/services/{aws/lambda → lambda}/index.ts +0 -0
- /package/src/lib/services/{aws/route53 → route53}/index.ts +0 -0
- /package/src/lib/services/{aws/route53 → route53}/types.ts +0 -0
- /package/src/lib/services/{aws/secrets-manager → secrets-manager}/index.ts +0 -0
- /package/src/lib/services/{aws/simple-notification-service → simple-notification-service}/index.ts +0 -0
- /package/src/lib/services/{aws/simple-notification-service → simple-notification-service}/types.ts +0 -0
- /package/src/lib/services/{aws/simple-queue-service → simple-queue-service}/index.ts +0 -0
- /package/src/lib/services/{aws/simple-storage-service → simple-storage-service}/index.ts +0 -0
- /package/src/lib/services/{aws/step-function → step-function}/index.ts +0 -0
- /package/src/lib/services/{aws/step-function → step-function}/types.ts +0 -0
- /package/src/lib/services/{aws/systems-manager → systems-manager}/index.ts +0 -0
- /package/src/lib/services/{aws/systems-manager → systems-manager}/types.ts +0 -0
- /package/src/lib/services/{aws/virtual-private-cloud → virtual-private-cloud}/index.ts +0 -0
- /package/src/lib/services/{aws/web-application-firewall → web-application-firewall}/index.ts +0 -0
- /package/src/lib/services/{aws/web-application-firewall → web-application-firewall}/types.ts +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { CfnOutput } from 'aws-cdk-lib';
|
|
2
2
|
import { Construct } from 'constructs';
|
|
3
|
-
import
|
|
3
|
+
import { AcmManager, ApiManager, AppConfigManager, CloudFrontManager, CloudTrailManager, CloudWatchManager, CodeBuildManager, DynamodbManager, EcrManager, EcsManager, EfsManager, EksManager, ElastiCacheManager, EventManager, EventTargetManager, EvidentlyManager, IamManager, KmsManager, LambdaManager, LogManager, Route53Manager, S3Manager, SecretsManager, SfnManager, SnsManager, SqsManager, SsmManager, VpcManager, WafManager } from '../services';
|
|
4
4
|
import { CommonStackProps } from './types';
|
|
5
5
|
/**
|
|
6
6
|
* @subcategory Construct
|
|
@@ -17,35 +17,35 @@ import { CommonStackProps } from './types';
|
|
|
17
17
|
*/
|
|
18
18
|
export declare class CommonConstruct extends Construct {
|
|
19
19
|
props: CommonStackProps;
|
|
20
|
-
acmManager:
|
|
21
|
-
apiManager:
|
|
22
|
-
appConfigManager:
|
|
23
|
-
codeBuildManager:
|
|
24
|
-
cloudFrontManager:
|
|
25
|
-
cloudTrailManager:
|
|
26
|
-
cloudWatchManager:
|
|
27
|
-
dynamodbManager:
|
|
28
|
-
ecrManager:
|
|
29
|
-
ecsManager:
|
|
30
|
-
efsManager:
|
|
31
|
-
eksManager:
|
|
32
|
-
elasticacheManager:
|
|
33
|
-
eventManager:
|
|
34
|
-
eventTargetManager:
|
|
35
|
-
evidentlyManager:
|
|
36
|
-
iamManager:
|
|
37
|
-
kmsManager:
|
|
38
|
-
lambdaManager:
|
|
39
|
-
logManager:
|
|
40
|
-
route53Manager:
|
|
41
|
-
s3Manager:
|
|
42
|
-
secretsManager:
|
|
43
|
-
sfnManager:
|
|
44
|
-
snsManager:
|
|
45
|
-
sqsManager:
|
|
46
|
-
ssmManager:
|
|
47
|
-
vpcManager:
|
|
48
|
-
wafManager:
|
|
20
|
+
acmManager: AcmManager;
|
|
21
|
+
apiManager: ApiManager;
|
|
22
|
+
appConfigManager: AppConfigManager;
|
|
23
|
+
codeBuildManager: CodeBuildManager;
|
|
24
|
+
cloudFrontManager: CloudFrontManager;
|
|
25
|
+
cloudTrailManager: CloudTrailManager;
|
|
26
|
+
cloudWatchManager: CloudWatchManager;
|
|
27
|
+
dynamodbManager: DynamodbManager;
|
|
28
|
+
ecrManager: EcrManager;
|
|
29
|
+
ecsManager: EcsManager;
|
|
30
|
+
efsManager: EfsManager;
|
|
31
|
+
eksManager: EksManager;
|
|
32
|
+
elasticacheManager: ElastiCacheManager;
|
|
33
|
+
eventManager: EventManager;
|
|
34
|
+
eventTargetManager: EventTargetManager;
|
|
35
|
+
evidentlyManager: EvidentlyManager;
|
|
36
|
+
iamManager: IamManager;
|
|
37
|
+
kmsManager: KmsManager;
|
|
38
|
+
lambdaManager: LambdaManager;
|
|
39
|
+
logManager: LogManager;
|
|
40
|
+
route53Manager: Route53Manager;
|
|
41
|
+
s3Manager: S3Manager;
|
|
42
|
+
secretsManager: SecretsManager;
|
|
43
|
+
sfnManager: SfnManager;
|
|
44
|
+
snsManager: SnsManager;
|
|
45
|
+
sqsManager: SqsManager;
|
|
46
|
+
ssmManager: SsmManager;
|
|
47
|
+
vpcManager: VpcManager;
|
|
48
|
+
wafManager: WafManager;
|
|
49
49
|
fullyQualifiedDomainName: string;
|
|
50
50
|
constructor(parent: Construct, id: string, props: CommonStackProps);
|
|
51
51
|
/**
|
|
@@ -55,7 +55,7 @@ export declare class CommonConstruct extends Construct {
|
|
|
55
55
|
* @param description optional description for the output
|
|
56
56
|
* @param overrideId Flag which indicates whether to override the default logical id of the output
|
|
57
57
|
*/
|
|
58
|
-
protected addCfnOutput(id: string, value: string, description?: string, overrideId?: boolean):
|
|
58
|
+
protected addCfnOutput(id: string, value: string, description?: string, overrideId?: boolean): CfnOutput;
|
|
59
59
|
/**
|
|
60
60
|
* @summary Determine the fully qualified domain name based on domainName & subDomain
|
|
61
61
|
*/
|
|
@@ -1,32 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
-
if (mod && mod.__esModule) return mod;
|
|
20
|
-
var result = {};
|
|
21
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
-
__setModuleDefault(result, mod);
|
|
23
|
-
return result;
|
|
24
|
-
};
|
|
25
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
3
|
exports.applyMixins = exports.CommonConstruct = void 0;
|
|
27
4
|
const constructs_1 = require("constructs");
|
|
28
|
-
const
|
|
29
|
-
const
|
|
5
|
+
const services_1 = require("../services");
|
|
6
|
+
const utils_1 = require("../utils");
|
|
30
7
|
/**
|
|
31
8
|
* @subcategory Construct
|
|
32
9
|
* @classdesc Common construct to use as a base for all higher level constructs.
|
|
@@ -75,35 +52,35 @@ class CommonConstruct extends constructs_1.Construct {
|
|
|
75
52
|
constructor(parent, id, props) {
|
|
76
53
|
super(parent, id);
|
|
77
54
|
this.props = props;
|
|
78
|
-
this.acmManager = new
|
|
79
|
-
this.apiManager = new
|
|
80
|
-
this.appConfigManager = new
|
|
81
|
-
this.codeBuildManager = new
|
|
82
|
-
this.cloudFrontManager = new
|
|
83
|
-
this.cloudTrailManager = new
|
|
84
|
-
this.cloudWatchManager = new
|
|
85
|
-
this.dynamodbManager = new
|
|
86
|
-
this.ecrManager = new
|
|
87
|
-
this.ecsManager = new
|
|
88
|
-
this.efsManager = new
|
|
89
|
-
this.eksManager = new
|
|
90
|
-
this.elasticacheManager = new
|
|
91
|
-
this.eventManager = new
|
|
92
|
-
this.eventTargetManager = new
|
|
93
|
-
this.evidentlyManager = new
|
|
94
|
-
this.iamManager = new
|
|
95
|
-
this.kmsManager = new
|
|
96
|
-
this.lambdaManager = new
|
|
97
|
-
this.logManager = new
|
|
98
|
-
this.route53Manager = new
|
|
99
|
-
this.s3Manager = new
|
|
100
|
-
this.secretsManager = new
|
|
101
|
-
this.sfnManager = new
|
|
102
|
-
this.snsManager = new
|
|
103
|
-
this.sqsManager = new
|
|
104
|
-
this.ssmManager = new
|
|
105
|
-
this.vpcManager = new
|
|
106
|
-
this.wafManager = new
|
|
55
|
+
this.acmManager = new services_1.AcmManager();
|
|
56
|
+
this.apiManager = new services_1.ApiManager();
|
|
57
|
+
this.appConfigManager = new services_1.AppConfigManager();
|
|
58
|
+
this.codeBuildManager = new services_1.CodeBuildManager();
|
|
59
|
+
this.cloudFrontManager = new services_1.CloudFrontManager();
|
|
60
|
+
this.cloudTrailManager = new services_1.CloudTrailManager();
|
|
61
|
+
this.cloudWatchManager = new services_1.CloudWatchManager();
|
|
62
|
+
this.dynamodbManager = new services_1.DynamodbManager();
|
|
63
|
+
this.ecrManager = new services_1.EcrManager();
|
|
64
|
+
this.ecsManager = new services_1.EcsManager();
|
|
65
|
+
this.efsManager = new services_1.EfsManager();
|
|
66
|
+
this.eksManager = new services_1.EksManager();
|
|
67
|
+
this.elasticacheManager = new services_1.ElastiCacheManager();
|
|
68
|
+
this.eventManager = new services_1.EventManager();
|
|
69
|
+
this.eventTargetManager = new services_1.EventTargetManager();
|
|
70
|
+
this.evidentlyManager = new services_1.EvidentlyManager();
|
|
71
|
+
this.iamManager = new services_1.IamManager();
|
|
72
|
+
this.kmsManager = new services_1.KmsManager();
|
|
73
|
+
this.lambdaManager = new services_1.LambdaManager();
|
|
74
|
+
this.logManager = new services_1.LogManager();
|
|
75
|
+
this.route53Manager = new services_1.Route53Manager();
|
|
76
|
+
this.s3Manager = new services_1.S3Manager();
|
|
77
|
+
this.secretsManager = new services_1.SecretsManager();
|
|
78
|
+
this.sfnManager = new services_1.SfnManager();
|
|
79
|
+
this.snsManager = new services_1.SnsManager();
|
|
80
|
+
this.sqsManager = new services_1.SqsManager();
|
|
81
|
+
this.ssmManager = new services_1.SsmManager();
|
|
82
|
+
this.vpcManager = new services_1.VpcManager();
|
|
83
|
+
this.wafManager = new services_1.WafManager();
|
|
107
84
|
this.determineFullyQualifiedDomain();
|
|
108
85
|
}
|
|
109
86
|
/**
|
|
@@ -114,7 +91,7 @@ class CommonConstruct extends constructs_1.Construct {
|
|
|
114
91
|
* @param overrideId Flag which indicates whether to override the default logical id of the output
|
|
115
92
|
*/
|
|
116
93
|
addCfnOutput(id, value, description, overrideId = true) {
|
|
117
|
-
return
|
|
94
|
+
return (0, utils_1.createCfnOutput)(id, this, value, description, overrideId);
|
|
118
95
|
}
|
|
119
96
|
/**
|
|
120
97
|
* @summary Determine the fully qualified domain name based on domainName & subDomain
|
|
@@ -128,22 +105,22 @@ class CommonConstruct extends constructs_1.Construct {
|
|
|
128
105
|
* @summary Utility method to determine if the initialisation is in development (dev) stage
|
|
129
106
|
* This is determined by the stage property injected via cdk context
|
|
130
107
|
*/
|
|
131
|
-
isDevelopmentStage = () =>
|
|
108
|
+
isDevelopmentStage = () => (0, utils_1.isDevStage)(this.props.stage);
|
|
132
109
|
/**
|
|
133
110
|
* @summary Utility method to determine if the initialisation is in test (tst) stage
|
|
134
111
|
* This is determined by the stage property injected via cdk context
|
|
135
112
|
*/
|
|
136
|
-
isTestStage = () =>
|
|
113
|
+
isTestStage = () => (0, utils_1.isTestStage)(this.props.stage);
|
|
137
114
|
/**
|
|
138
115
|
* @summary Utility method to determine if the initialisation is in uat (uat) stage
|
|
139
116
|
* This is determined by the stage property injected via cdk context
|
|
140
117
|
*/
|
|
141
|
-
isUatStage = () =>
|
|
118
|
+
isUatStage = () => (0, utils_1.isUatStage)(this.props.stage);
|
|
142
119
|
/**
|
|
143
120
|
* @summary Utility method to determine if the initialisation is in production (prd) stage
|
|
144
121
|
* This is determined by the stage property injected via cdk context
|
|
145
122
|
*/
|
|
146
|
-
isProductionStage = () =>
|
|
123
|
+
isProductionStage = () => (0, utils_1.isPrdStage)(this.props.stage);
|
|
147
124
|
}
|
|
148
125
|
exports.CommonConstruct = CommonConstruct;
|
|
149
126
|
const applyMixins = (derivedCtor, constructors) => {
|
|
@@ -1,29 +1,30 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
1
|
+
import { App, Stack, StackProps } from 'aws-cdk-lib';
|
|
2
|
+
import { Runtime } from 'aws-cdk-lib/aws-lambda';
|
|
3
3
|
import { CommonConstruct } from './construct';
|
|
4
|
+
import { CommonStackProps } from './types';
|
|
4
5
|
/**
|
|
5
6
|
* @classdesc Common stack to use as a base for all higher level constructs.
|
|
6
7
|
* @example
|
|
7
8
|
* import { CommonStack } from '@gradientedge/cdk-utils'
|
|
8
9
|
*
|
|
9
10
|
* class CustomStack extends CommonStack {
|
|
10
|
-
* constructor(parent:
|
|
11
|
+
* constructor(parent: App, name: string, props: StackProps) {
|
|
11
12
|
* super(parent, name, props)
|
|
12
13
|
* // provision resources
|
|
13
14
|
* }
|
|
14
15
|
* }
|
|
15
16
|
*/
|
|
16
|
-
export declare class CommonStack extends
|
|
17
|
-
static NODEJS_RUNTIME:
|
|
17
|
+
export declare class CommonStack extends Stack {
|
|
18
|
+
static NODEJS_RUNTIME: Runtime;
|
|
18
19
|
construct: CommonConstruct;
|
|
19
20
|
props: CommonStackProps;
|
|
20
|
-
constructor(parent:
|
|
21
|
+
constructor(parent: App, name: string, props: StackProps);
|
|
21
22
|
/**
|
|
22
23
|
* @summary Method to determine the core CDK construct properties injected via context cdk.json
|
|
23
24
|
* @param props The stack properties
|
|
24
25
|
* @returns The stack properties
|
|
25
26
|
*/
|
|
26
|
-
protected determineConstructProps(props:
|
|
27
|
+
protected determineConstructProps(props: StackProps): {
|
|
27
28
|
domainName: any;
|
|
28
29
|
excludeDomainNameForBuckets: any;
|
|
29
30
|
extraContexts: any;
|
|
@@ -1,49 +1,29 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var
|
|
3
|
-
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
-
if (mod && mod.__esModule) return mod;
|
|
20
|
-
var result = {};
|
|
21
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
-
__setModuleDefault(result, mod);
|
|
23
|
-
return result;
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
24
4
|
};
|
|
25
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
6
|
exports.CommonStack = void 0;
|
|
27
|
-
const
|
|
28
|
-
const
|
|
7
|
+
const aws_cdk_lib_1 = require("aws-cdk-lib");
|
|
8
|
+
const aws_lambda_1 = require("aws-cdk-lib/aws-lambda");
|
|
9
|
+
const fs_1 = __importDefault(require("fs"));
|
|
29
10
|
const utils_1 = require("../utils");
|
|
30
11
|
const construct_1 = require("./construct");
|
|
31
|
-
const
|
|
32
|
-
const fs = require('fs');
|
|
12
|
+
const app_root_path_1 = __importDefault(require("app-root-path"));
|
|
33
13
|
/**
|
|
34
14
|
* @classdesc Common stack to use as a base for all higher level constructs.
|
|
35
15
|
* @example
|
|
36
16
|
* import { CommonStack } from '@gradientedge/cdk-utils'
|
|
37
17
|
*
|
|
38
18
|
* class CustomStack extends CommonStack {
|
|
39
|
-
* constructor(parent:
|
|
19
|
+
* constructor(parent: App, name: string, props: StackProps) {
|
|
40
20
|
* super(parent, name, props)
|
|
41
21
|
* // provision resources
|
|
42
22
|
* }
|
|
43
23
|
* }
|
|
44
24
|
*/
|
|
45
|
-
class CommonStack extends
|
|
46
|
-
static NODEJS_RUNTIME =
|
|
25
|
+
class CommonStack extends aws_cdk_lib_1.Stack {
|
|
26
|
+
static NODEJS_RUNTIME = aws_lambda_1.Runtime.NODEJS_18_X;
|
|
47
27
|
construct;
|
|
48
28
|
props;
|
|
49
29
|
constructor(parent, name, props) {
|
|
@@ -90,16 +70,16 @@ class CommonStack extends cdk.Stack {
|
|
|
90
70
|
return;
|
|
91
71
|
}
|
|
92
72
|
extraContexts.forEach((context) => {
|
|
93
|
-
const extraContextPath = `${
|
|
73
|
+
const extraContextPath = `${app_root_path_1.default.path}/${context}`;
|
|
94
74
|
/* scenario where extra context is configured in cdk.json but absent in file system */
|
|
95
|
-
if (!
|
|
75
|
+
if (!fs_1.default.existsSync(extraContextPath))
|
|
96
76
|
throw `Extra context properties unavailable in path:${extraContextPath}`;
|
|
97
77
|
/* read the extra properties */
|
|
98
|
-
const extraContextPropsBuffer =
|
|
78
|
+
const extraContextPropsBuffer = fs_1.default.readFileSync(extraContextPath);
|
|
99
79
|
if (debug)
|
|
100
80
|
console.debug(`Adding additional contexts provided in ${extraContextPath}`);
|
|
101
81
|
/* parse as JSON properties */
|
|
102
|
-
const extraContextProps = JSON.parse(extraContextPropsBuffer);
|
|
82
|
+
const extraContextProps = JSON.parse(extraContextPropsBuffer.toString('utf-8'));
|
|
103
83
|
/* set each of the property into the cdk node context */
|
|
104
84
|
Object.keys(extraContextProps).forEach((propKey) => {
|
|
105
85
|
this.node.setContext(propKey, extraContextProps[propKey]);
|
|
@@ -114,14 +94,14 @@ class CommonStack extends cdk.Stack {
|
|
|
114
94
|
determineStageContexts() {
|
|
115
95
|
const stage = this.node.tryGetContext('stage');
|
|
116
96
|
const stageContextPath = this.node.tryGetContext('stageContextPath') || 'cdkEnv';
|
|
117
|
-
const stageContextFilePath = `${
|
|
97
|
+
const stageContextFilePath = `${app_root_path_1.default.path}/${stageContextPath}/${stage}.json`;
|
|
118
98
|
const debug = this.node.tryGetContext('debug');
|
|
119
99
|
if ((0, utils_1.isDevStage)(stage)) {
|
|
120
100
|
if (debug)
|
|
121
101
|
console.debug(`Development stage. Using default stage context properties`);
|
|
122
102
|
}
|
|
123
103
|
/* alert default context usage when extra stage config is missing */
|
|
124
|
-
if (!
|
|
104
|
+
if (!fs_1.default.existsSync(stageContextFilePath)) {
|
|
125
105
|
if (debug)
|
|
126
106
|
console.debug(`Stage specific context properties unavailable in path:${stageContextFilePath}`);
|
|
127
107
|
if (debug)
|
|
@@ -129,11 +109,11 @@ class CommonStack extends cdk.Stack {
|
|
|
129
109
|
return;
|
|
130
110
|
}
|
|
131
111
|
/* read the extra properties */
|
|
132
|
-
const stageContextPropsBuffer =
|
|
112
|
+
const stageContextPropsBuffer = fs_1.default.readFileSync(stageContextFilePath);
|
|
133
113
|
if (debug)
|
|
134
114
|
console.debug(`Adding additional stage contexts provided in ${stageContextFilePath}`);
|
|
135
115
|
/* parse as JSON properties */
|
|
136
|
-
const stageContextProps = JSON.parse(stageContextPropsBuffer);
|
|
116
|
+
const stageContextProps = JSON.parse(stageContextPropsBuffer.toString('utf-8'));
|
|
137
117
|
/* set each of the property into the cdk node context */
|
|
138
118
|
Object.keys(stageContextProps).forEach((propKey) => {
|
|
139
119
|
/* handle object, array properties */
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { StackProps } from 'aws-cdk-lib';
|
|
2
2
|
import { Runtime, Tracing } from 'aws-cdk-lib/aws-lambda';
|
|
3
3
|
import { RetentionDays } from 'aws-cdk-lib/aws-logs';
|
|
4
4
|
/**
|
|
5
5
|
*/
|
|
6
|
-
export interface CommonStackProps extends
|
|
6
|
+
export interface CommonStackProps extends StackProps {
|
|
7
7
|
name: string;
|
|
8
8
|
region: string;
|
|
9
9
|
stage: string;
|
|
@@ -1,34 +1,34 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
1
|
+
import { DomainName, Integration, IntegrationResponse, Method, MethodResponse, Model, Resource, RestApi } from 'aws-cdk-lib/aws-apigateway';
|
|
2
|
+
import { ICertificate } from 'aws-cdk-lib/aws-certificatemanager';
|
|
3
|
+
import { Role } from 'aws-cdk-lib/aws-iam';
|
|
4
|
+
import { LogGroup } from 'aws-cdk-lib/aws-logs';
|
|
5
|
+
import { IHostedZone } from 'aws-cdk-lib/aws-route53';
|
|
6
|
+
import { Topic } from 'aws-cdk-lib/aws-sns';
|
|
7
7
|
import { ApiToEventBridgeTargetRestApiType } from './types';
|
|
8
8
|
/**
|
|
9
9
|
* @classdesc Provides a construct to contain api resources for ApiToEventBridgeTargetWithSns
|
|
10
10
|
*/
|
|
11
11
|
export declare class ApiToEventbridgeTargetRestApi implements ApiToEventBridgeTargetRestApiType {
|
|
12
|
-
accessLogGroup:
|
|
13
|
-
api:
|
|
14
|
-
certificate:
|
|
15
|
-
domain:
|
|
16
|
-
errorResponseModel:
|
|
17
|
-
hostedZone:
|
|
18
|
-
integration:
|
|
19
|
-
integrationErrorResponse:
|
|
12
|
+
accessLogGroup: LogGroup;
|
|
13
|
+
api: RestApi;
|
|
14
|
+
certificate: ICertificate;
|
|
15
|
+
domain: DomainName;
|
|
16
|
+
errorResponseModel: Model;
|
|
17
|
+
hostedZone: IHostedZone;
|
|
18
|
+
integration: Integration;
|
|
19
|
+
integrationErrorResponse: IntegrationResponse;
|
|
20
20
|
integrationRequestParameters: {
|
|
21
21
|
[p: string]: string;
|
|
22
22
|
};
|
|
23
23
|
integrationRequestTemplates: {
|
|
24
24
|
[p: string]: string;
|
|
25
25
|
};
|
|
26
|
-
integrationResponse:
|
|
27
|
-
method:
|
|
28
|
-
methodErrorResponse:
|
|
29
|
-
methodResponse:
|
|
30
|
-
resource:
|
|
31
|
-
responseModel:
|
|
32
|
-
topic:
|
|
33
|
-
role:
|
|
26
|
+
integrationResponse: IntegrationResponse;
|
|
27
|
+
method: Method;
|
|
28
|
+
methodErrorResponse: MethodResponse;
|
|
29
|
+
methodResponse: MethodResponse;
|
|
30
|
+
resource: Resource;
|
|
31
|
+
responseModel: Model;
|
|
32
|
+
topic: Topic;
|
|
33
|
+
role: Role;
|
|
34
34
|
}
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import { IEventBus, Rule } from 'aws-cdk-lib/aws-events';
|
|
2
|
+
import { LogGroup } from 'aws-cdk-lib/aws-logs';
|
|
3
3
|
import { ApiToEventBridgeTargetEventType } from './types';
|
|
4
4
|
/**
|
|
5
5
|
* @classdesc Provides a construct to contain event resources for ApiToEventBridgeTargetWithSns
|
|
6
6
|
*/
|
|
7
7
|
export declare class ApiToEventbridgeTargetEvent implements ApiToEventBridgeTargetEventType {
|
|
8
|
-
eventBus:
|
|
9
|
-
logGroup:
|
|
10
|
-
logGroupFailure:
|
|
11
|
-
logGroupSuccess:
|
|
12
|
-
rule:
|
|
13
|
-
ruleFailure:
|
|
14
|
-
ruleSuccess:
|
|
8
|
+
eventBus: IEventBus;
|
|
9
|
+
logGroup: LogGroup;
|
|
10
|
+
logGroupFailure: LogGroup;
|
|
11
|
+
logGroupSuccess: LogGroup;
|
|
12
|
+
rule: Rule;
|
|
13
|
+
ruleFailure: Rule;
|
|
14
|
+
ruleSuccess: Rule;
|
|
15
15
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { ISecret } from 'aws-cdk-lib/aws-secretsmanager';
|
|
2
2
|
import { Construct } from 'constructs';
|
|
3
3
|
import { CommonConstruct } from '../../common';
|
|
4
4
|
import { ApiToEventBridgeTargetEventType, ApiToEventBridgeTargetProps, ApiToEventBridgeTargetRestApiType } from './types';
|
|
@@ -22,7 +22,7 @@ import { ApiToEventBridgeTargetEventType, ApiToEventBridgeTargetProps, ApiToEven
|
|
|
22
22
|
export declare class ApiToEventBridgeTarget extends CommonConstruct {
|
|
23
23
|
props: ApiToEventBridgeTargetProps;
|
|
24
24
|
id: string;
|
|
25
|
-
applicationSecrets:
|
|
25
|
+
applicationSecrets: ISecret[];
|
|
26
26
|
apiEvent: ApiToEventBridgeTargetEventType;
|
|
27
27
|
apiToEventBridgeTargetRestApi: ApiToEventBridgeTargetRestApiType;
|
|
28
28
|
apiResource: string;
|
|
@@ -42,7 +42,7 @@ export declare class ApiToEventBridgeTarget extends CommonConstruct {
|
|
|
42
42
|
*/
|
|
43
43
|
protected resolveCertificate(): void;
|
|
44
44
|
/**
|
|
45
|
-
* @summary Method to create or use an existing
|
|
45
|
+
* @summary Method to create or use an existing event bus for api payload deliveries
|
|
46
46
|
*/
|
|
47
47
|
protected createApiToEventBridgeTargetEventBus(): void;
|
|
48
48
|
/**
|