@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
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.VpcManager = void 0;
|
|
4
|
+
const aws_cdk_lib_1 = require("aws-cdk-lib");
|
|
5
|
+
const aws_ec2_1 = require("aws-cdk-lib/aws-ec2");
|
|
6
|
+
const utils_1 = require("../../utils");
|
|
7
|
+
/**
|
|
8
|
+
*/
|
|
9
|
+
const CommonVpcIdentifier = 'CommonVpc';
|
|
10
|
+
/**
|
|
11
|
+
* @classdesc Provides operations on AWS VPC.
|
|
12
|
+
* - A new instance of this class is injected into {@link CommonConstruct} constructor.
|
|
13
|
+
* - If a custom construct extends {@link CommonConstruct}, an instance is available within the context.
|
|
14
|
+
* @example
|
|
15
|
+
* import { CommonConstruct } from '@gradientedge/cdk-utils'
|
|
16
|
+
*
|
|
17
|
+
* class CustomConstruct extends CommonConstruct {
|
|
18
|
+
* constructor(parent: cdk.Construct, id: string, props: common.CommonStackProps) {
|
|
19
|
+
* super(parent, id, props)
|
|
20
|
+
* this.props = props
|
|
21
|
+
* this.vpcManager.createVpc('MyVPC', this)
|
|
22
|
+
* }
|
|
23
|
+
* }
|
|
24
|
+
* @see [CDK VPC Module]{@link https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.@aws-cdk_aws-Vpc.html}
|
|
25
|
+
*/
|
|
26
|
+
class VpcManager {
|
|
27
|
+
/**
|
|
28
|
+
* @summary Method to create a new vpc
|
|
29
|
+
* @param id scoped id of the resource
|
|
30
|
+
* @param scope scope in which this resource is defined
|
|
31
|
+
* @param props
|
|
32
|
+
*/
|
|
33
|
+
createVpc(id, scope, props) {
|
|
34
|
+
if (!props)
|
|
35
|
+
throw `Vpc props undefined for ${id}`;
|
|
36
|
+
const vpc = new aws_ec2_1.Vpc(scope, `${id}`, {
|
|
37
|
+
ipAddresses: props.ipAddresses,
|
|
38
|
+
maxAzs: props.maxAzs,
|
|
39
|
+
});
|
|
40
|
+
(0, utils_1.createCfnOutput)(`${id}Id`, scope, vpc.vpcId);
|
|
41
|
+
(0, utils_1.createCfnOutput)(`${id}PublicSubnetIds`, scope, vpc.publicSubnets.map(subnet => subnet.subnetId).toString());
|
|
42
|
+
(0, utils_1.createCfnOutput)(`${id}PrivateSubnetIds`, scope, vpc.privateSubnets.map(subnet => subnet.subnetId).toString());
|
|
43
|
+
(0, utils_1.createCfnOutput)(`${id}PublicSubnetRouteTableIds`, scope, vpc.publicSubnets.map(subnet => subnet.routeTable.routeTableId).toString());
|
|
44
|
+
(0, utils_1.createCfnOutput)(`${id}PrivateSubnetRouteTableIds`, scope, vpc.privateSubnets.map(subnet => subnet.routeTable.routeTableId).toString());
|
|
45
|
+
(0, utils_1.createCfnOutput)(`${id}AvailabilityZones`, scope, vpc.availabilityZones.toString());
|
|
46
|
+
(0, utils_1.createCfnOutput)(`${id}DefaultSecurityGroup`, scope, vpc.vpcDefaultSecurityGroup.toString());
|
|
47
|
+
return vpc;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* @summary Method to create a common vpc
|
|
51
|
+
* @param scope scope in which this resource is defined
|
|
52
|
+
* @param props
|
|
53
|
+
* @param vpcIdentifier optional identifier for VPC
|
|
54
|
+
*/
|
|
55
|
+
createCommonVpc(scope, props, vpcIdentifier) {
|
|
56
|
+
const vpc = this.createVpc(CommonVpcIdentifier, scope, props);
|
|
57
|
+
aws_cdk_lib_1.Tags.of(vpc).add('Name', vpcIdentifier ?? CommonVpcIdentifier);
|
|
58
|
+
return vpc;
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* @summary Method to retrieve a common vpc
|
|
62
|
+
* @param id scoped id of the resource
|
|
63
|
+
* @param scope scope in which this resource is defined
|
|
64
|
+
* @param vpcIdentifier optional identifier for VPC
|
|
65
|
+
*/
|
|
66
|
+
retrieveCommonVpc(id, scope, vpcIdentifier) {
|
|
67
|
+
return aws_ec2_1.Vpc.fromLookup(scope, `${id}`, { vpcName: vpcIdentifier ?? CommonVpcIdentifier });
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
exports.VpcManager = VpcManager;
|
package/dist/src/lib/services/{aws/web-application-firewall → web-application-firewall}/main.d.ts
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { CommonConstruct } from '
|
|
1
|
+
import { CfnIPSet, CfnWebACL } from 'aws-cdk-lib/aws-wafv2';
|
|
2
|
+
import { CommonConstruct } from '../../common';
|
|
3
3
|
import { WafIPSetProps, WafWebACLProps } from './types';
|
|
4
4
|
/**
|
|
5
5
|
* @classdesc Provides operations on AWS WAF.
|
|
@@ -24,12 +24,12 @@ export declare class WafManager {
|
|
|
24
24
|
* @param scope scope in which this resource is defined
|
|
25
25
|
* @param props
|
|
26
26
|
*/
|
|
27
|
-
createIpSet(id: string, scope: CommonConstruct, props: WafIPSetProps):
|
|
27
|
+
createIpSet(id: string, scope: CommonConstruct, props: WafIPSetProps): CfnIPSet;
|
|
28
28
|
/**
|
|
29
29
|
* @summary Method to create a web acl
|
|
30
30
|
* @param id scoped id of the resource
|
|
31
31
|
* @param scope scope in which this resource is defined
|
|
32
32
|
* @param props
|
|
33
33
|
*/
|
|
34
|
-
createWebAcl(id: string, scope: CommonConstruct, props: WafWebACLProps):
|
|
34
|
+
createWebAcl(id: string, scope: CommonConstruct, props: WafWebACLProps): CfnWebACL;
|
|
35
35
|
}
|
package/dist/src/lib/services/{aws/web-application-firewall → web-application-firewall}/main.js
RENAMED
|
@@ -1,31 +1,8 @@
|
|
|
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.WafManager = void 0;
|
|
27
|
-
const
|
|
28
|
-
const
|
|
4
|
+
const aws_wafv2_1 = require("aws-cdk-lib/aws-wafv2");
|
|
5
|
+
const utils_1 = require("../../utils");
|
|
29
6
|
/**
|
|
30
7
|
* @classdesc Provides operations on AWS WAF.
|
|
31
8
|
* - A new instance of this class is injected into {@link CommonConstruct} constructor.
|
|
@@ -52,15 +29,15 @@ class WafManager {
|
|
|
52
29
|
createIpSet(id, scope, props) {
|
|
53
30
|
if (!props)
|
|
54
31
|
throw `WAF Ip Set props undefined for ${id}`;
|
|
55
|
-
const ipSet = new
|
|
32
|
+
const ipSet = new aws_wafv2_1.CfnIPSet(scope, `${id}`, {
|
|
56
33
|
addresses: props.addresses,
|
|
57
34
|
description: `IP Set for ${id} - ${scope.props.stage} stage`,
|
|
58
35
|
ipAddressVersion: props.ipAddressVersion,
|
|
59
36
|
name: scope.isProductionStage() ? props.name : `${props.name}-${scope.props.stage}`,
|
|
60
37
|
scope: props.scope,
|
|
61
38
|
});
|
|
62
|
-
|
|
63
|
-
|
|
39
|
+
(0, utils_1.createCfnOutput)(`${id}-ipSetId`, scope, ipSet.attrId);
|
|
40
|
+
(0, utils_1.createCfnOutput)(`${id}-ipSetArn`, scope, ipSet.attrArn);
|
|
64
41
|
return ipSet;
|
|
65
42
|
}
|
|
66
43
|
/**
|
|
@@ -72,7 +49,7 @@ class WafManager {
|
|
|
72
49
|
createWebAcl(id, scope, props) {
|
|
73
50
|
if (!props)
|
|
74
51
|
throw `WAF WebACL props undefined for ${id}`;
|
|
75
|
-
const webAcl = new
|
|
52
|
+
const webAcl = new aws_wafv2_1.CfnWebACL(scope, `${id}`, {
|
|
76
53
|
defaultAction: props.defaultAction,
|
|
77
54
|
description: `Web Acl for ${id} - ${scope.props.stage} stage`,
|
|
78
55
|
name: scope.isProductionStage() ? props.name : `${props.name}-${scope.props.stage}`,
|
|
@@ -81,8 +58,8 @@ class WafManager {
|
|
|
81
58
|
tags: [{ key: 'service', value: scope.props.name }],
|
|
82
59
|
visibilityConfig: props.visibilityConfig,
|
|
83
60
|
});
|
|
84
|
-
|
|
85
|
-
|
|
61
|
+
(0, utils_1.createCfnOutput)(`${id}-webAclId`, scope, webAcl.attrId);
|
|
62
|
+
(0, utils_1.createCfnOutput)(`${id}-webAclArn`, scope, webAcl.attrArn);
|
|
86
63
|
return webAcl;
|
|
87
64
|
}
|
|
88
65
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import * as cdk from 'aws-cdk-lib';
|
|
2
|
-
import { CommonConstruct } from '../../common';
|
|
3
1
|
import { AwsCredentialIdentityProvider } from '@aws-sdk/types';
|
|
2
|
+
import { CfnOutput } from 'aws-cdk-lib';
|
|
3
|
+
import { CommonConstruct } from '../../common';
|
|
4
4
|
/**
|
|
5
5
|
* @summary Helper method to add CloudFormation outputs from the construct
|
|
6
6
|
* @param id scoped id of the resource
|
|
@@ -10,5 +10,8 @@ import { AwsCredentialIdentityProvider } from '@aws-sdk/types';
|
|
|
10
10
|
* @param overrideId Flag which indicates whether to override the default logical id of the output
|
|
11
11
|
* @returns The CloudFormation output
|
|
12
12
|
*/
|
|
13
|
-
export declare function createCfnOutput(id: string, scope: CommonConstruct, value?: string, description?: string, overrideId?: boolean):
|
|
13
|
+
export declare function createCfnOutput(id: string, scope: CommonConstruct, value?: string, description?: string, overrideId?: boolean): CfnOutput;
|
|
14
|
+
/**
|
|
15
|
+
*
|
|
16
|
+
*/
|
|
14
17
|
export declare function determineCredentials(): AwsCredentialIdentityProvider;
|
|
@@ -1,32 +1,12 @@
|
|
|
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.determineCredentials = exports.createCfnOutput = void 0;
|
|
27
|
-
const cdk = __importStar(require("aws-cdk-lib"));
|
|
28
|
-
const _ = __importStar(require("lodash"));
|
|
29
7
|
const credential_providers_1 = require("@aws-sdk/credential-providers");
|
|
8
|
+
const aws_cdk_lib_1 = require("aws-cdk-lib");
|
|
9
|
+
const lodash_1 = __importDefault(require("lodash"));
|
|
30
10
|
/**
|
|
31
11
|
* @summary Helper method to add CloudFormation outputs from the construct
|
|
32
12
|
* @param id scoped id of the resource
|
|
@@ -37,8 +17,8 @@ const credential_providers_1 = require("@aws-sdk/credential-providers");
|
|
|
37
17
|
* @returns The CloudFormation output
|
|
38
18
|
*/
|
|
39
19
|
function createCfnOutput(id, scope, value, description, overrideId = true) {
|
|
40
|
-
const camelName =
|
|
41
|
-
const output = new
|
|
20
|
+
const camelName = lodash_1.default.camelCase(id);
|
|
21
|
+
const output = new aws_cdk_lib_1.CfnOutput(scope, id, {
|
|
42
22
|
description,
|
|
43
23
|
exportName: `${scope.props.stackName}-${camelName}`,
|
|
44
24
|
value: value ?? '',
|
|
@@ -49,6 +29,9 @@ function createCfnOutput(id, scope, value, description, overrideId = true) {
|
|
|
49
29
|
return output;
|
|
50
30
|
}
|
|
51
31
|
exports.createCfnOutput = createCfnOutput;
|
|
32
|
+
/**
|
|
33
|
+
*
|
|
34
|
+
*/
|
|
52
35
|
function determineCredentials() {
|
|
53
36
|
if (process.env.AWS_PROFILE)
|
|
54
37
|
return (0, credential_providers_1.fromIni)();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gradientedge/cdk-utils",
|
|
3
|
-
"version": "8.
|
|
3
|
+
"version": "8.120.0",
|
|
4
4
|
"description": "Utilities for AWS CDK provisioning",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"engines": {
|
|
@@ -46,15 +46,15 @@
|
|
|
46
46
|
}
|
|
47
47
|
},
|
|
48
48
|
"dependencies": {
|
|
49
|
-
"@aws-sdk/client-secrets-manager": "^3.
|
|
50
|
-
"@aws-sdk/credential-providers": "^3.
|
|
49
|
+
"@aws-sdk/client-secrets-manager": "^3.405.0",
|
|
50
|
+
"@aws-sdk/credential-providers": "^3.405.0",
|
|
51
51
|
"@aws-sdk/types": "^3.398.0",
|
|
52
52
|
"@types/lodash": "^4.14.197",
|
|
53
|
-
"@types/node": "^20.5.
|
|
54
|
-
"@types/uuid": "^9.0.
|
|
53
|
+
"@types/node": "^20.5.9",
|
|
54
|
+
"@types/uuid": "^9.0.3",
|
|
55
55
|
"app-root-path": "^3.1.0",
|
|
56
|
-
"aws-cdk-lib": "^2.
|
|
57
|
-
"constructs": "^10.2.
|
|
56
|
+
"aws-cdk-lib": "^2.94.0",
|
|
57
|
+
"constructs": "^10.2.70",
|
|
58
58
|
"lodash": "^4.17.21",
|
|
59
59
|
"moment": "^2.29.4",
|
|
60
60
|
"nconf": "^0.12.0",
|
|
@@ -63,22 +63,22 @@
|
|
|
63
63
|
"uuid": "^9.0.0"
|
|
64
64
|
},
|
|
65
65
|
"devDependencies": {
|
|
66
|
-
"@babel/core": "^7.22.
|
|
67
|
-
"@babel/eslint-parser": "^7.22.
|
|
66
|
+
"@babel/core": "^7.22.15",
|
|
67
|
+
"@babel/eslint-parser": "^7.22.15",
|
|
68
68
|
"@babel/plugin-proposal-class-properties": "^7.18.6",
|
|
69
69
|
"@types/jest": "^29.5.4",
|
|
70
|
-
"@typescript-eslint/eslint-plugin": "^6.
|
|
71
|
-
"@typescript-eslint/parser": "^6.
|
|
72
|
-
"aws-cdk": "^2.
|
|
70
|
+
"@typescript-eslint/eslint-plugin": "^6.6.0",
|
|
71
|
+
"@typescript-eslint/parser": "^6.6.0",
|
|
72
|
+
"aws-cdk": "^2.94.0",
|
|
73
73
|
"better-docs": "^2.7.2",
|
|
74
74
|
"codecov": "^3.8.3",
|
|
75
75
|
"commitizen": "^4.3.0",
|
|
76
|
-
"docdash": "^2.0.
|
|
76
|
+
"docdash": "^2.0.2",
|
|
77
77
|
"dotenv": "^16.3.1",
|
|
78
78
|
"eslint": "^8.48.0",
|
|
79
79
|
"eslint-config-prettier": "^9.0.0",
|
|
80
80
|
"eslint-plugin-import": "^2.28.1",
|
|
81
|
-
"eslint-plugin-jsdoc": "^46.5.
|
|
81
|
+
"eslint-plugin-jsdoc": "^46.5.1",
|
|
82
82
|
"husky": "^8.0.3",
|
|
83
83
|
"jest": "^29.6.4",
|
|
84
84
|
"jest-extended": "^4.0.1",
|
|
@@ -88,7 +88,7 @@
|
|
|
88
88
|
"jsdoc-mermaid": "^1.0.0",
|
|
89
89
|
"jsdoc-plugin-typescript": "^2.2.1",
|
|
90
90
|
"jsdoc-to-markdown": "^8.0.0",
|
|
91
|
-
"prettier": "^3.0.
|
|
91
|
+
"prettier": "^3.0.3",
|
|
92
92
|
"prettier-plugin-organize-imports": "^3.2.3",
|
|
93
93
|
"rimraf": "^5.0.1",
|
|
94
94
|
"semantic-release": "^21.1.1",
|
|
@@ -1,7 +1,37 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { CfnOutput } from 'aws-cdk-lib'
|
|
2
2
|
import { Construct } from 'constructs'
|
|
3
|
-
import
|
|
4
|
-
|
|
3
|
+
import {
|
|
4
|
+
AcmManager,
|
|
5
|
+
ApiManager,
|
|
6
|
+
AppConfigManager,
|
|
7
|
+
CloudFrontManager,
|
|
8
|
+
CloudTrailManager,
|
|
9
|
+
CloudWatchManager,
|
|
10
|
+
CodeBuildManager,
|
|
11
|
+
DynamodbManager,
|
|
12
|
+
EcrManager,
|
|
13
|
+
EcsManager,
|
|
14
|
+
EfsManager,
|
|
15
|
+
EksManager,
|
|
16
|
+
ElastiCacheManager,
|
|
17
|
+
EventManager,
|
|
18
|
+
EventTargetManager,
|
|
19
|
+
EvidentlyManager,
|
|
20
|
+
IamManager,
|
|
21
|
+
KmsManager,
|
|
22
|
+
LambdaManager,
|
|
23
|
+
LogManager,
|
|
24
|
+
Route53Manager,
|
|
25
|
+
S3Manager,
|
|
26
|
+
SecretsManager,
|
|
27
|
+
SfnManager,
|
|
28
|
+
SnsManager,
|
|
29
|
+
SqsManager,
|
|
30
|
+
SsmManager,
|
|
31
|
+
VpcManager,
|
|
32
|
+
WafManager,
|
|
33
|
+
} from '../services'
|
|
34
|
+
import { createCfnOutput, isDevStage, isPrdStage, isTestStage, isUatStage } from '../utils'
|
|
5
35
|
import { CommonStackProps } from './types'
|
|
6
36
|
|
|
7
37
|
/**
|
|
@@ -19,70 +49,70 @@ import { CommonStackProps } from './types'
|
|
|
19
49
|
*/
|
|
20
50
|
export class CommonConstruct extends Construct {
|
|
21
51
|
props: CommonStackProps
|
|
22
|
-
acmManager:
|
|
23
|
-
apiManager:
|
|
24
|
-
appConfigManager:
|
|
25
|
-
codeBuildManager:
|
|
26
|
-
cloudFrontManager:
|
|
27
|
-
cloudTrailManager:
|
|
28
|
-
cloudWatchManager:
|
|
29
|
-
dynamodbManager:
|
|
30
|
-
ecrManager:
|
|
31
|
-
ecsManager:
|
|
32
|
-
efsManager:
|
|
33
|
-
eksManager:
|
|
34
|
-
elasticacheManager:
|
|
35
|
-
eventManager:
|
|
36
|
-
eventTargetManager:
|
|
37
|
-
evidentlyManager:
|
|
38
|
-
iamManager:
|
|
39
|
-
kmsManager:
|
|
40
|
-
lambdaManager:
|
|
41
|
-
logManager:
|
|
42
|
-
route53Manager:
|
|
43
|
-
s3Manager:
|
|
44
|
-
secretsManager:
|
|
45
|
-
sfnManager:
|
|
46
|
-
snsManager:
|
|
47
|
-
sqsManager:
|
|
48
|
-
ssmManager:
|
|
49
|
-
vpcManager:
|
|
50
|
-
wafManager:
|
|
52
|
+
acmManager: AcmManager
|
|
53
|
+
apiManager: ApiManager
|
|
54
|
+
appConfigManager: AppConfigManager
|
|
55
|
+
codeBuildManager: CodeBuildManager
|
|
56
|
+
cloudFrontManager: CloudFrontManager
|
|
57
|
+
cloudTrailManager: CloudTrailManager
|
|
58
|
+
cloudWatchManager: CloudWatchManager
|
|
59
|
+
dynamodbManager: DynamodbManager
|
|
60
|
+
ecrManager: EcrManager
|
|
61
|
+
ecsManager: EcsManager
|
|
62
|
+
efsManager: EfsManager
|
|
63
|
+
eksManager: EksManager
|
|
64
|
+
elasticacheManager: ElastiCacheManager
|
|
65
|
+
eventManager: EventManager
|
|
66
|
+
eventTargetManager: EventTargetManager
|
|
67
|
+
evidentlyManager: EvidentlyManager
|
|
68
|
+
iamManager: IamManager
|
|
69
|
+
kmsManager: KmsManager
|
|
70
|
+
lambdaManager: LambdaManager
|
|
71
|
+
logManager: LogManager
|
|
72
|
+
route53Manager: Route53Manager
|
|
73
|
+
s3Manager: S3Manager
|
|
74
|
+
secretsManager: SecretsManager
|
|
75
|
+
sfnManager: SfnManager
|
|
76
|
+
snsManager: SnsManager
|
|
77
|
+
sqsManager: SqsManager
|
|
78
|
+
ssmManager: SsmManager
|
|
79
|
+
vpcManager: VpcManager
|
|
80
|
+
wafManager: WafManager
|
|
51
81
|
|
|
52
82
|
fullyQualifiedDomainName: string
|
|
53
83
|
|
|
54
84
|
constructor(parent: Construct, id: string, props: CommonStackProps) {
|
|
55
85
|
super(parent, id)
|
|
56
86
|
this.props = props
|
|
57
|
-
this.acmManager = new
|
|
58
|
-
this.apiManager = new
|
|
59
|
-
this.appConfigManager = new
|
|
60
|
-
this.codeBuildManager = new
|
|
61
|
-
this.cloudFrontManager = new
|
|
62
|
-
this.cloudTrailManager = new
|
|
63
|
-
this.cloudWatchManager = new
|
|
64
|
-
this.dynamodbManager = new
|
|
65
|
-
this.ecrManager = new
|
|
66
|
-
this.ecsManager = new
|
|
67
|
-
this.efsManager = new
|
|
68
|
-
this.eksManager = new
|
|
69
|
-
this.elasticacheManager = new
|
|
70
|
-
this.eventManager = new
|
|
71
|
-
this.eventTargetManager = new
|
|
72
|
-
this.evidentlyManager = new
|
|
73
|
-
this.iamManager = new
|
|
74
|
-
this.kmsManager = new
|
|
75
|
-
this.lambdaManager = new
|
|
76
|
-
this.logManager = new
|
|
77
|
-
this.route53Manager = new
|
|
78
|
-
this.s3Manager = new
|
|
79
|
-
this.secretsManager = new
|
|
80
|
-
this.sfnManager = new
|
|
81
|
-
this.snsManager = new
|
|
82
|
-
this.sqsManager = new
|
|
83
|
-
this.ssmManager = new
|
|
84
|
-
this.vpcManager = new
|
|
85
|
-
this.wafManager = new
|
|
87
|
+
this.acmManager = new AcmManager()
|
|
88
|
+
this.apiManager = new ApiManager()
|
|
89
|
+
this.appConfigManager = new AppConfigManager()
|
|
90
|
+
this.codeBuildManager = new CodeBuildManager()
|
|
91
|
+
this.cloudFrontManager = new CloudFrontManager()
|
|
92
|
+
this.cloudTrailManager = new CloudTrailManager()
|
|
93
|
+
this.cloudWatchManager = new CloudWatchManager()
|
|
94
|
+
this.dynamodbManager = new DynamodbManager()
|
|
95
|
+
this.ecrManager = new EcrManager()
|
|
96
|
+
this.ecsManager = new EcsManager()
|
|
97
|
+
this.efsManager = new EfsManager()
|
|
98
|
+
this.eksManager = new EksManager()
|
|
99
|
+
this.elasticacheManager = new ElastiCacheManager()
|
|
100
|
+
this.eventManager = new EventManager()
|
|
101
|
+
this.eventTargetManager = new EventTargetManager()
|
|
102
|
+
this.evidentlyManager = new EvidentlyManager()
|
|
103
|
+
this.iamManager = new IamManager()
|
|
104
|
+
this.kmsManager = new KmsManager()
|
|
105
|
+
this.lambdaManager = new LambdaManager()
|
|
106
|
+
this.logManager = new LogManager()
|
|
107
|
+
this.route53Manager = new Route53Manager()
|
|
108
|
+
this.s3Manager = new S3Manager()
|
|
109
|
+
this.secretsManager = new SecretsManager()
|
|
110
|
+
this.sfnManager = new SfnManager()
|
|
111
|
+
this.snsManager = new SnsManager()
|
|
112
|
+
this.sqsManager = new SqsManager()
|
|
113
|
+
this.ssmManager = new SsmManager()
|
|
114
|
+
this.vpcManager = new VpcManager()
|
|
115
|
+
this.wafManager = new WafManager()
|
|
86
116
|
|
|
87
117
|
this.determineFullyQualifiedDomain()
|
|
88
118
|
}
|
|
@@ -94,8 +124,8 @@ export class CommonConstruct extends Construct {
|
|
|
94
124
|
* @param description optional description for the output
|
|
95
125
|
* @param overrideId Flag which indicates whether to override the default logical id of the output
|
|
96
126
|
*/
|
|
97
|
-
protected addCfnOutput(id: string, value: string, description?: string, overrideId = true):
|
|
98
|
-
return
|
|
127
|
+
protected addCfnOutput(id: string, value: string, description?: string, overrideId = true): CfnOutput {
|
|
128
|
+
return createCfnOutput(id, this, value, description, overrideId)
|
|
99
129
|
}
|
|
100
130
|
|
|
101
131
|
/**
|
|
@@ -111,25 +141,25 @@ export class CommonConstruct extends Construct {
|
|
|
111
141
|
* @summary Utility method to determine if the initialisation is in development (dev) stage
|
|
112
142
|
* This is determined by the stage property injected via cdk context
|
|
113
143
|
*/
|
|
114
|
-
public isDevelopmentStage = () =>
|
|
144
|
+
public isDevelopmentStage = () => isDevStage(this.props.stage)
|
|
115
145
|
|
|
116
146
|
/**
|
|
117
147
|
* @summary Utility method to determine if the initialisation is in test (tst) stage
|
|
118
148
|
* This is determined by the stage property injected via cdk context
|
|
119
149
|
*/
|
|
120
|
-
public isTestStage = () =>
|
|
150
|
+
public isTestStage = () => isTestStage(this.props.stage)
|
|
121
151
|
|
|
122
152
|
/**
|
|
123
153
|
* @summary Utility method to determine if the initialisation is in uat (uat) stage
|
|
124
154
|
* This is determined by the stage property injected via cdk context
|
|
125
155
|
*/
|
|
126
|
-
public isUatStage = () =>
|
|
156
|
+
public isUatStage = () => isUatStage(this.props.stage)
|
|
127
157
|
|
|
128
158
|
/**
|
|
129
159
|
* @summary Utility method to determine if the initialisation is in production (prd) stage
|
|
130
160
|
* This is determined by the stage property injected via cdk context
|
|
131
161
|
*/
|
|
132
|
-
public isProductionStage = () =>
|
|
162
|
+
public isProductionStage = () => isPrdStage(this.props.stage)
|
|
133
163
|
}
|
|
134
164
|
|
|
135
165
|
export const applyMixins = (derivedCtor: any, constructors: any[]) => {
|
package/src/lib/common/stack.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import { App, Stack, StackProps } from 'aws-cdk-lib'
|
|
2
|
+
import { Runtime } from 'aws-cdk-lib/aws-lambda'
|
|
3
|
+
import fs from 'fs'
|
|
4
4
|
import { isDevStage } from '../utils'
|
|
5
5
|
import { CommonConstruct } from './construct'
|
|
6
|
+
import { CommonStackProps } from './types'
|
|
6
7
|
|
|
7
|
-
|
|
8
|
-
const fs = require('fs')
|
|
8
|
+
import appRoot from 'app-root-path'
|
|
9
9
|
|
|
10
10
|
/**
|
|
11
11
|
* @classdesc Common stack to use as a base for all higher level constructs.
|
|
@@ -13,19 +13,19 @@ const fs = require('fs')
|
|
|
13
13
|
* import { CommonStack } from '@gradientedge/cdk-utils'
|
|
14
14
|
*
|
|
15
15
|
* class CustomStack extends CommonStack {
|
|
16
|
-
* constructor(parent:
|
|
16
|
+
* constructor(parent: App, name: string, props: StackProps) {
|
|
17
17
|
* super(parent, name, props)
|
|
18
18
|
* // provision resources
|
|
19
19
|
* }
|
|
20
20
|
* }
|
|
21
21
|
*/
|
|
22
|
-
export class CommonStack extends
|
|
23
|
-
public static NODEJS_RUNTIME =
|
|
22
|
+
export class CommonStack extends Stack {
|
|
23
|
+
public static NODEJS_RUNTIME = Runtime.NODEJS_18_X
|
|
24
24
|
|
|
25
25
|
construct: CommonConstruct
|
|
26
26
|
props: CommonStackProps
|
|
27
27
|
|
|
28
|
-
constructor(parent:
|
|
28
|
+
constructor(parent: App, name: string, props: StackProps) {
|
|
29
29
|
super(parent, name, props)
|
|
30
30
|
|
|
31
31
|
/* determine extra cdk contexts */
|
|
@@ -45,7 +45,7 @@ export class CommonStack extends cdk.Stack {
|
|
|
45
45
|
* @param props The stack properties
|
|
46
46
|
* @returns The stack properties
|
|
47
47
|
*/
|
|
48
|
-
protected determineConstructProps(props:
|
|
48
|
+
protected determineConstructProps(props: StackProps) {
|
|
49
49
|
return {
|
|
50
50
|
domainName: this.node.tryGetContext('domainName'),
|
|
51
51
|
excludeDomainNameForBuckets: this.node.tryGetContext('excludeDomainNameForBuckets'),
|
|
@@ -86,7 +86,7 @@ export class CommonStack extends cdk.Stack {
|
|
|
86
86
|
if (debug) console.debug(`Adding additional contexts provided in ${extraContextPath}`)
|
|
87
87
|
|
|
88
88
|
/* parse as JSON properties */
|
|
89
|
-
const extraContextProps = JSON.parse(extraContextPropsBuffer)
|
|
89
|
+
const extraContextProps = JSON.parse(extraContextPropsBuffer.toString('utf-8'))
|
|
90
90
|
|
|
91
91
|
/* set each of the property into the cdk node context */
|
|
92
92
|
Object.keys(extraContextProps).forEach((propKey: any) => {
|
|
@@ -122,7 +122,7 @@ export class CommonStack extends cdk.Stack {
|
|
|
122
122
|
if (debug) console.debug(`Adding additional stage contexts provided in ${stageContextFilePath}`)
|
|
123
123
|
|
|
124
124
|
/* parse as JSON properties */
|
|
125
|
-
const stageContextProps = JSON.parse(stageContextPropsBuffer)
|
|
125
|
+
const stageContextProps = JSON.parse(stageContextPropsBuffer.toString('utf-8'))
|
|
126
126
|
|
|
127
127
|
/* set each of the property into the cdk node context */
|
|
128
128
|
Object.keys(stageContextProps).forEach((propKey: any) => {
|
package/src/lib/common/types.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
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
6
|
*/
|
|
7
|
-
export interface CommonStackProps extends
|
|
7
|
+
export interface CommonStackProps extends StackProps {
|
|
8
8
|
name: string
|
|
9
9
|
region: string
|
|
10
10
|
stage: string
|