@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,11 +1,11 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
1
|
+
import { Tags } from 'aws-cdk-lib'
|
|
2
|
+
import { Table } from 'aws-cdk-lib/aws-dynamodb'
|
|
3
|
+
import { CommonConstruct } from '../../common'
|
|
4
|
+
import { createCfnOutput } from '../../utils'
|
|
5
5
|
import { TableProps } from './types'
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
|
-
* @classdesc Provides operations on AWS DynamoDB
|
|
8
|
+
* @classdesc Provides operations on AWS DynamoDB
|
|
9
9
|
* - A new instance of this class is injected into {@link CommonConstruct} constructor.
|
|
10
10
|
* - If a custom construct extends {@link CommonConstruct}, an instance is available within the context.
|
|
11
11
|
* @example
|
|
@@ -30,7 +30,7 @@ export class DynamodbManager {
|
|
|
30
30
|
public createTable(id: string, scope: CommonConstruct, props: TableProps) {
|
|
31
31
|
if (!props) throw `Table props undefined for ${id}`
|
|
32
32
|
|
|
33
|
-
const table = new
|
|
33
|
+
const table = new Table(scope, `${id}`, {
|
|
34
34
|
billingMode: props.billingMode,
|
|
35
35
|
contributorInsightsEnabled: props.contributorInsightsEnabled,
|
|
36
36
|
encryption: props.encryption,
|
|
@@ -52,12 +52,12 @@ export class DynamodbManager {
|
|
|
52
52
|
|
|
53
53
|
if (props.tags && props.tags.length > 0) {
|
|
54
54
|
props.tags.forEach(tag => {
|
|
55
|
-
|
|
55
|
+
Tags.of(table).add(tag.key, tag.value)
|
|
56
56
|
})
|
|
57
57
|
}
|
|
58
58
|
|
|
59
|
-
|
|
60
|
-
|
|
59
|
+
createCfnOutput(`${id}-tableName`, scope, table.tableName)
|
|
60
|
+
createCfnOutput(`${id}-tableArn`, scope, table.tableArn)
|
|
61
61
|
|
|
62
62
|
return table
|
|
63
63
|
}
|
package/src/lib/services/{aws/elastic-container-registry → elastic-container-registry}/main.ts
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
1
|
+
import { DockerImageAsset } from 'aws-cdk-lib/aws-ecr-assets'
|
|
2
|
+
import { CommonConstruct } from '../../common'
|
|
3
|
+
import { createCfnOutput } from '../../utils'
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* @classdesc Provides operations on AWS Elastic Container Registry.
|
|
@@ -26,11 +26,11 @@ export class EcrManager {
|
|
|
26
26
|
* @param dockerfilePath
|
|
27
27
|
*/
|
|
28
28
|
public createDockerImage(id: string, scope: CommonConstruct, dockerfilePath: string) {
|
|
29
|
-
const asset = new
|
|
29
|
+
const asset = new DockerImageAsset(scope, `${id}`, {
|
|
30
30
|
directory: dockerfilePath,
|
|
31
31
|
})
|
|
32
32
|
|
|
33
|
-
|
|
33
|
+
createCfnOutput(`${id}-dockerImageArn`, scope, asset.imageUri)
|
|
34
34
|
|
|
35
35
|
return asset
|
|
36
36
|
}
|
package/src/lib/services/{aws/elastic-container-service → elastic-container-service}/main.ts
RENAMED
|
@@ -1,11 +1,21 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
import { Duration, Tags } from 'aws-cdk-lib'
|
|
2
|
+
import { IVpc } from 'aws-cdk-lib/aws-ec2'
|
|
3
|
+
import {
|
|
4
|
+
Cluster,
|
|
5
|
+
Compatibility,
|
|
6
|
+
ContainerImage,
|
|
7
|
+
CpuArchitecture,
|
|
8
|
+
ICluster,
|
|
9
|
+
LogDriver,
|
|
10
|
+
NetworkMode,
|
|
11
|
+
OperatingSystemFamily,
|
|
12
|
+
TaskDefinition,
|
|
13
|
+
} from 'aws-cdk-lib/aws-ecs'
|
|
14
|
+
import { ApplicationLoadBalancedFargateService } from 'aws-cdk-lib/aws-ecs-patterns'
|
|
15
|
+
import { Role } from 'aws-cdk-lib/aws-iam'
|
|
16
|
+
import { ILogGroup } from 'aws-cdk-lib/aws-logs'
|
|
17
|
+
import { CommonConstruct } from '../../common'
|
|
18
|
+
import { createCfnOutput } from '../../utils'
|
|
9
19
|
import { EcsApplicationLoadBalancedFargateServiceProps, EcsClusterProps, EcsTaskProps } from './types'
|
|
10
20
|
|
|
11
21
|
/**
|
|
@@ -16,7 +26,7 @@ import { EcsApplicationLoadBalancedFargateServiceProps, EcsClusterProps, EcsTask
|
|
|
16
26
|
* import { CommonConstruct } from '@gradientedge/cdk-utils'
|
|
17
27
|
*
|
|
18
28
|
* class CustomConstruct extends CommonConstruct {
|
|
19
|
-
* constructor(parent:
|
|
29
|
+
* constructor(parent: Construct, id: string, props: common.CommonStackProps) {
|
|
20
30
|
* super(parent, id, props)
|
|
21
31
|
* this.props = props
|
|
22
32
|
* this.ecsManager.createEcsCluster('MyCluster', this, vpc)
|
|
@@ -32,10 +42,10 @@ export class EcsManager {
|
|
|
32
42
|
* @param props
|
|
33
43
|
* @param vpc
|
|
34
44
|
*/
|
|
35
|
-
public createEcsCluster(id: string, scope: CommonConstruct, props: EcsClusterProps, vpc:
|
|
45
|
+
public createEcsCluster(id: string, scope: CommonConstruct, props: EcsClusterProps, vpc: IVpc) {
|
|
36
46
|
if (!props) throw `Ecs Cluster props undefined for ${id}`
|
|
37
47
|
|
|
38
|
-
const ecsCluster = new
|
|
48
|
+
const ecsCluster = new Cluster(scope, `${id}`, {
|
|
39
49
|
capacity: props.capacity,
|
|
40
50
|
clusterName: `${props.clusterName}-${scope.props.stage}`,
|
|
41
51
|
containerInsights: props.containerInsights,
|
|
@@ -47,12 +57,12 @@ export class EcsManager {
|
|
|
47
57
|
|
|
48
58
|
if (props.tags && props.tags.length > 0) {
|
|
49
59
|
props.tags.forEach(tag => {
|
|
50
|
-
|
|
60
|
+
Tags.of(ecsCluster).add(tag.key, tag.value)
|
|
51
61
|
})
|
|
52
62
|
}
|
|
53
63
|
|
|
54
|
-
|
|
55
|
-
|
|
64
|
+
createCfnOutput(`${id}-clusterArn`, scope, ecsCluster.clusterArn)
|
|
65
|
+
createCfnOutput(`${id}-clusterName`, scope, ecsCluster.clusterName)
|
|
56
66
|
|
|
57
67
|
return ecsCluster
|
|
58
68
|
}
|
|
@@ -74,18 +84,18 @@ export class EcsManager {
|
|
|
74
84
|
id: string,
|
|
75
85
|
scope: CommonConstruct,
|
|
76
86
|
props: EcsTaskProps,
|
|
77
|
-
cluster:
|
|
78
|
-
role:
|
|
79
|
-
logGroup:
|
|
80
|
-
containerImage:
|
|
87
|
+
cluster: ICluster,
|
|
88
|
+
role: Role,
|
|
89
|
+
logGroup: ILogGroup,
|
|
90
|
+
containerImage: ContainerImage,
|
|
81
91
|
environment?: any,
|
|
82
92
|
secrets?: any,
|
|
83
93
|
command?: string[]
|
|
84
94
|
) {
|
|
85
95
|
if (!props) throw `EcsTask props undefined for ${id}`
|
|
86
96
|
|
|
87
|
-
const ecsTask = new
|
|
88
|
-
compatibility:
|
|
97
|
+
const ecsTask = new TaskDefinition(scope, `${id}`, {
|
|
98
|
+
compatibility: Compatibility.FARGATE,
|
|
89
99
|
cpu: props.cpu,
|
|
90
100
|
ephemeralStorageGiB: props.ephemeralStorageGiB,
|
|
91
101
|
executionRole: role,
|
|
@@ -93,13 +103,13 @@ export class EcsManager {
|
|
|
93
103
|
inferenceAccelerators: props.inferenceAccelerators,
|
|
94
104
|
ipcMode: props.ipcMode,
|
|
95
105
|
memoryMiB: props.memoryMiB,
|
|
96
|
-
networkMode:
|
|
106
|
+
networkMode: NetworkMode.AWS_VPC,
|
|
97
107
|
pidMode: props.pidMode,
|
|
98
108
|
placementConstraints: props.placementConstraints,
|
|
99
109
|
proxyConfiguration: props.proxyConfiguration,
|
|
100
110
|
runtimePlatform: {
|
|
101
|
-
cpuArchitecture: props.runtimePlatform?.cpuArchitecture ??
|
|
102
|
-
operatingSystemFamily: props.runtimePlatform?.operatingSystemFamily ??
|
|
111
|
+
cpuArchitecture: props.runtimePlatform?.cpuArchitecture ?? CpuArchitecture.X86_64,
|
|
112
|
+
operatingSystemFamily: props.runtimePlatform?.operatingSystemFamily ?? OperatingSystemFamily.LINUX,
|
|
103
113
|
},
|
|
104
114
|
taskRole: role,
|
|
105
115
|
volumes: props.volumes,
|
|
@@ -111,7 +121,7 @@ export class EcsManager {
|
|
|
111
121
|
disableNetworking: false,
|
|
112
122
|
environment: environment,
|
|
113
123
|
image: containerImage,
|
|
114
|
-
logging:
|
|
124
|
+
logging: LogDriver.awsLogs({
|
|
115
125
|
logGroup: logGroup,
|
|
116
126
|
logRetention: props.logging?.logRetention,
|
|
117
127
|
multilinePattern: props.logging?.multilinePattern,
|
|
@@ -124,17 +134,17 @@ export class EcsManager {
|
|
|
124
134
|
|
|
125
135
|
if (props.tags && props.tags.length > 0) {
|
|
126
136
|
props.tags.forEach(tag => {
|
|
127
|
-
|
|
137
|
+
Tags.of(ecsTask).add(tag.key, tag.value)
|
|
128
138
|
})
|
|
129
139
|
}
|
|
130
140
|
|
|
131
|
-
|
|
141
|
+
createCfnOutput(`${id}-taskArn`, scope, ecsTask.taskDefinitionArn)
|
|
132
142
|
|
|
133
143
|
return ecsTask
|
|
134
144
|
}
|
|
135
145
|
|
|
136
146
|
/**
|
|
137
|
-
* @summary Method to create an application
|
|
147
|
+
* @summary Method to create an application load balanced ecs fargate task
|
|
138
148
|
* @param id scoped id of the resource
|
|
139
149
|
* @param scope scope in which this resource is defined
|
|
140
150
|
* @param props
|
|
@@ -145,13 +155,14 @@ export class EcsManager {
|
|
|
145
155
|
id: string,
|
|
146
156
|
scope: CommonConstruct,
|
|
147
157
|
props: EcsApplicationLoadBalancedFargateServiceProps,
|
|
148
|
-
cluster:
|
|
149
|
-
logGroup:
|
|
158
|
+
cluster: ICluster,
|
|
159
|
+
logGroup: ILogGroup
|
|
150
160
|
) {
|
|
151
|
-
if (!props) throw `
|
|
152
|
-
if (!props.taskImageOptions)
|
|
161
|
+
if (!props) throw `Ecs Load balanced Fargate Service props undefined for ${id}`
|
|
162
|
+
if (!props.taskImageOptions)
|
|
163
|
+
throw `TaskImageOptions for Ecs Load balanced Fargate Service props undefined for ${id}`
|
|
153
164
|
|
|
154
|
-
const fargateService = new
|
|
165
|
+
const fargateService = new ApplicationLoadBalancedFargateService(scope, `${id}-ecs-service`, {
|
|
155
166
|
assignPublicIp: props.assignPublicIp ?? true,
|
|
156
167
|
certificate: props.certificate,
|
|
157
168
|
cluster: cluster,
|
|
@@ -160,13 +171,13 @@ export class EcsManager {
|
|
|
160
171
|
domainName: props.domainName,
|
|
161
172
|
domainZone: props.domainZone,
|
|
162
173
|
enableECSManagedTags: true,
|
|
163
|
-
healthCheckGracePeriod: props.healthCheckGracePeriod ??
|
|
174
|
+
healthCheckGracePeriod: props.healthCheckGracePeriod ?? Duration.seconds(60),
|
|
164
175
|
listenerPort: props.listenerPort,
|
|
165
176
|
loadBalancerName: `${id}-${scope.props.stage}`,
|
|
166
177
|
memoryLimitMiB: props.memoryLimitMiB,
|
|
167
178
|
runtimePlatform: {
|
|
168
|
-
cpuArchitecture: props.runtimePlatform?.cpuArchitecture ??
|
|
169
|
-
operatingSystemFamily: props.runtimePlatform?.operatingSystemFamily ??
|
|
179
|
+
cpuArchitecture: props.runtimePlatform?.cpuArchitecture ?? CpuArchitecture.X86_64,
|
|
180
|
+
operatingSystemFamily: props.runtimePlatform?.operatingSystemFamily ?? OperatingSystemFamily.LINUX,
|
|
170
181
|
},
|
|
171
182
|
serviceName: `${id}-${scope.props.stage}`,
|
|
172
183
|
taskImageOptions: {
|
|
@@ -177,7 +188,7 @@ export class EcsManager {
|
|
|
177
188
|
image: props.taskImageOptions.image,
|
|
178
189
|
logDriver:
|
|
179
190
|
props.taskImageOptions?.logDriver ??
|
|
180
|
-
|
|
191
|
+
LogDriver.awsLogs({
|
|
181
192
|
logGroup: logGroup,
|
|
182
193
|
logRetention: props.logging?.logRetention,
|
|
183
194
|
multilinePattern: props.logging?.multilinePattern,
|
|
@@ -194,11 +205,11 @@ export class EcsManager {
|
|
|
194
205
|
healthyGrpcCodes: props.healthCheck.healthyGrpcCodes,
|
|
195
206
|
healthyHttpCodes: props.healthCheck.healthyHttpCodes,
|
|
196
207
|
healthyThresholdCount: props.healthCheck.healthyThresholdCount,
|
|
197
|
-
interval: props.healthCheck.interval ??
|
|
208
|
+
interval: props.healthCheck.interval ?? Duration.seconds(props.healthCheck.intervalInSecs),
|
|
198
209
|
path: props.healthCheck.path ?? '/',
|
|
199
210
|
port: props.healthCheck.port,
|
|
200
211
|
protocol: props.healthCheck.protocol,
|
|
201
|
-
timeout: props.healthCheck.timeout ??
|
|
212
|
+
timeout: props.healthCheck.timeout ?? Duration.seconds(props.healthCheck.timeoutInSecs),
|
|
202
213
|
unhealthyThresholdCount: props.healthCheck.unhealthyThresholdCount,
|
|
203
214
|
})
|
|
204
215
|
}
|
package/src/lib/services/{aws/elastic-container-service → elastic-container-service}/types.ts
RENAMED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { TagProps } from '../../../types'
|
|
2
|
-
import { AwsLogDriverProps, ClusterProps, MountPoint, TaskDefinitionProps } from 'aws-cdk-lib/aws-ecs'
|
|
3
1
|
import { ScalingSchedule } from 'aws-cdk-lib/aws-applicationautoscaling'
|
|
2
|
+
import { AwsLogDriverProps, ClusterProps, MountPoint, TaskDefinitionProps } from 'aws-cdk-lib/aws-ecs'
|
|
4
3
|
import { ApplicationLoadBalancedFargateServiceProps } from 'aws-cdk-lib/aws-ecs-patterns'
|
|
5
|
-
import
|
|
4
|
+
import { HealthCheck as ElbHealthCheck } from 'aws-cdk-lib/aws-elasticloadbalancingv2'
|
|
5
|
+
import { TagProps } from '../../types'
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
*/
|
|
@@ -28,7 +28,7 @@ export interface EcsScalingProps {
|
|
|
28
28
|
|
|
29
29
|
/**
|
|
30
30
|
*/
|
|
31
|
-
export interface HealthCheck extends
|
|
31
|
+
export interface HealthCheck extends ElbHealthCheck {
|
|
32
32
|
intervalInSecs: number
|
|
33
33
|
timeoutInSecs: number
|
|
34
34
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
1
|
+
import { RemovalPolicy } from 'aws-cdk-lib'
|
|
2
|
+
import { ISecurityGroup, IVpc, SubnetSelection } from 'aws-cdk-lib/aws-ec2'
|
|
3
|
+
import { FileSystem, LifecyclePolicy, OutOfInfrequentAccessPolicy, PerformanceMode } from 'aws-cdk-lib/aws-efs'
|
|
4
|
+
import { CommonConstruct } from '../../common'
|
|
5
|
+
import { createCfnOutput } from '../../utils'
|
|
6
6
|
import { EfsAccessPointOptions, EfsFileSystemProps } from './types'
|
|
7
7
|
|
|
8
8
|
export const DEFAULT_CREATE_ACL = {
|
|
@@ -47,28 +47,28 @@ export class EfsManager {
|
|
|
47
47
|
id: string,
|
|
48
48
|
scope: CommonConstruct,
|
|
49
49
|
props: EfsFileSystemProps,
|
|
50
|
-
vpc:
|
|
50
|
+
vpc: IVpc,
|
|
51
51
|
accessPointOptions?: EfsAccessPointOptions[],
|
|
52
|
-
securityGroup?:
|
|
53
|
-
vpcSubnets?:
|
|
52
|
+
securityGroup?: ISecurityGroup,
|
|
53
|
+
vpcSubnets?: SubnetSelection
|
|
54
54
|
) {
|
|
55
55
|
if (!props) throw `EFS props undefined for ${id}`
|
|
56
56
|
|
|
57
57
|
const fileSystemId = props.provisionNewOnDeployment ? `${id}-${new Date().getMilliseconds()}` : `${id}`
|
|
58
|
-
const fileSystem = new
|
|
58
|
+
const fileSystem = new FileSystem(scope, `${fileSystemId}`, {
|
|
59
59
|
...props,
|
|
60
60
|
fileSystemName: props.fileSystemName ? `${props.fileSystemName}-${scope.props.stage}` : undefined,
|
|
61
|
-
lifecyclePolicy: props.lifecyclePolicy ??
|
|
62
|
-
outOfInfrequentAccessPolicy: props.outOfInfrequentAccessPolicy ??
|
|
63
|
-
performanceMode: props.performanceMode ??
|
|
64
|
-
removalPolicy: props.removalPolicy ??
|
|
61
|
+
lifecyclePolicy: props.lifecyclePolicy ?? LifecyclePolicy.AFTER_7_DAYS,
|
|
62
|
+
outOfInfrequentAccessPolicy: props.outOfInfrequentAccessPolicy ?? OutOfInfrequentAccessPolicy.AFTER_1_ACCESS,
|
|
63
|
+
performanceMode: props.performanceMode ?? PerformanceMode.GENERAL_PURPOSE,
|
|
64
|
+
removalPolicy: props.removalPolicy ?? RemovalPolicy.DESTROY,
|
|
65
65
|
securityGroup,
|
|
66
66
|
vpc,
|
|
67
67
|
vpcSubnets,
|
|
68
68
|
})
|
|
69
69
|
|
|
70
|
-
|
|
71
|
-
|
|
70
|
+
createCfnOutput(`${id}-fileSystemArn`, scope, fileSystem.fileSystemArn)
|
|
71
|
+
createCfnOutput(`${id}-fileSystemId`, scope, fileSystem.fileSystemId)
|
|
72
72
|
|
|
73
73
|
/* provision access points if specified */
|
|
74
74
|
if (accessPointOptions && accessPointOptions.length > 0) {
|
|
@@ -80,8 +80,8 @@ export class EfsManager {
|
|
|
80
80
|
posixUser: accessPointOption.posixUser ?? DEFAULT_POSIX_USER,
|
|
81
81
|
})
|
|
82
82
|
|
|
83
|
-
|
|
84
|
-
|
|
83
|
+
createCfnOutput(`${id}-accessPointArn-${index}`, scope, accessPoint.accessPointArn)
|
|
84
|
+
createCfnOutput(`${id}-accessPointId-${index}`, scope, accessPoint.accessPointId)
|
|
85
85
|
}
|
|
86
86
|
}
|
|
87
87
|
|
package/src/lib/services/{aws/elastic-kubernetes-service → elastic-kubernetes-service}/main.ts
RENAMED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
1
|
+
import { IVpc, InstanceClass, InstanceSize, InstanceType } from 'aws-cdk-lib/aws-ec2'
|
|
2
|
+
import { DockerImageAsset } from 'aws-cdk-lib/aws-ecr-assets'
|
|
3
|
+
import { Cluster, KubernetesVersion } from 'aws-cdk-lib/aws-eks'
|
|
4
|
+
import { CommonConstruct } from '../../common'
|
|
5
|
+
import { createCfnOutput } from '../../utils'
|
|
6
6
|
import { EksClusterProps } from './types'
|
|
7
7
|
|
|
8
8
|
/**
|
|
@@ -34,8 +34,8 @@ export class EksManager {
|
|
|
34
34
|
id: string,
|
|
35
35
|
scope: CommonConstruct,
|
|
36
36
|
props: EksClusterProps,
|
|
37
|
-
image:
|
|
38
|
-
vpc:
|
|
37
|
+
image: DockerImageAsset,
|
|
38
|
+
vpc: IVpc
|
|
39
39
|
) {
|
|
40
40
|
if (!props) throw `EksCluster props undefined for ${id}`
|
|
41
41
|
|
|
@@ -80,18 +80,18 @@ export class EksManager {
|
|
|
80
80
|
},
|
|
81
81
|
}
|
|
82
82
|
|
|
83
|
-
const cluster = new
|
|
83
|
+
const cluster = new Cluster(scope, `${id}Cluster`, {
|
|
84
84
|
clusterName: `${id.toLowerCase()}-${scope.props.stage}`,
|
|
85
85
|
defaultCapacity: props.appCapacity,
|
|
86
|
-
defaultCapacityInstance:
|
|
87
|
-
version:
|
|
86
|
+
defaultCapacityInstance: InstanceType.of(InstanceClass.T3, InstanceSize.LARGE),
|
|
87
|
+
version: KubernetesVersion.V1_27,
|
|
88
88
|
vpc,
|
|
89
89
|
})
|
|
90
90
|
|
|
91
91
|
cluster.addManifest(`${id}Pod`, service, deployment)
|
|
92
92
|
|
|
93
|
-
|
|
94
|
-
|
|
93
|
+
createCfnOutput(`${id}-clusterArn`, scope, cluster.clusterArn)
|
|
94
|
+
createCfnOutput(`${id}-clusterEndpoint`, scope, cluster.clusterEndpoint)
|
|
95
95
|
|
|
96
96
|
return cluster
|
|
97
97
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
1
|
+
import { Tags } from 'aws-cdk-lib'
|
|
2
|
+
import { CfnCacheCluster, CfnReplicationGroup, CfnSubnetGroup } from 'aws-cdk-lib/aws-elasticache'
|
|
3
|
+
import { CommonConstruct } from '../../common'
|
|
4
|
+
import { createCfnOutput } from '../../utils'
|
|
5
5
|
import { ElastiCacheProps, ReplicatedElastiCacheProps } from './types'
|
|
6
6
|
|
|
7
7
|
/**
|
|
@@ -28,7 +28,7 @@ export class ElastiCacheManager {
|
|
|
28
28
|
* @param subnetIds
|
|
29
29
|
*/
|
|
30
30
|
public createElastiCacheSubnetGroup(id: string, scope: CommonConstruct, subnetIds: string[]) {
|
|
31
|
-
return new
|
|
31
|
+
return new CfnSubnetGroup(scope, `${id}`, {
|
|
32
32
|
cacheSubnetGroupName: `${id}-subnet-group-${scope.props.stage}`,
|
|
33
33
|
description: `${id}-subnet-group-${scope.props.stage}`,
|
|
34
34
|
subnetIds: subnetIds,
|
|
@@ -56,7 +56,7 @@ export class ElastiCacheManager {
|
|
|
56
56
|
|
|
57
57
|
const subnetGroup = this.createElastiCacheSubnetGroup(`${id}-subnetGroup`, scope, subnetIds)
|
|
58
58
|
|
|
59
|
-
const elasticacheCluster = new
|
|
59
|
+
const elasticacheCluster = new CfnCacheCluster(scope, `${id}`, {
|
|
60
60
|
autoMinorVersionUpgrade: props.autoMinorVersionUpgrade,
|
|
61
61
|
azMode: props.azMode,
|
|
62
62
|
cacheNodeType: props.cacheNodeType,
|
|
@@ -82,13 +82,13 @@ export class ElastiCacheManager {
|
|
|
82
82
|
|
|
83
83
|
if (props.tags && props.tags.length > 0) {
|
|
84
84
|
props.tags.forEach(tag => {
|
|
85
|
-
|
|
85
|
+
Tags.of(elasticacheCluster).add(tag.key, tag.value)
|
|
86
86
|
})
|
|
87
87
|
}
|
|
88
88
|
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
89
|
+
createCfnOutput(`${id}-clusterName`, scope, elasticacheCluster.clusterName)
|
|
90
|
+
createCfnOutput(`${id}-redisEndpointPort`, scope, elasticacheCluster.attrRedisEndpointPort)
|
|
91
|
+
createCfnOutput(`${id}-redisEndpointAddress`, scope, elasticacheCluster.attrRedisEndpointAddress)
|
|
92
92
|
|
|
93
93
|
return elasticacheCluster
|
|
94
94
|
}
|
|
@@ -112,7 +112,7 @@ export class ElastiCacheManager {
|
|
|
112
112
|
|
|
113
113
|
const subnetGroup = this.createElastiCacheSubnetGroup(`${id}-subnetGroup`, scope, subnetIds)
|
|
114
114
|
|
|
115
|
-
const elasticacheCluster = new
|
|
115
|
+
const elasticacheCluster = new CfnReplicationGroup(scope, `${id}`, {
|
|
116
116
|
autoMinorVersionUpgrade: props.autoMinorVersionUpgrade,
|
|
117
117
|
automaticFailoverEnabled: props.automaticFailoverEnabled,
|
|
118
118
|
cacheNodeType: props.cacheNodeType,
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import {
|
|
1
|
+
import { Tags } from 'aws-cdk-lib'
|
|
2
|
+
import { ICluster, ITaskDefinition } from 'aws-cdk-lib/aws-ecs'
|
|
3
|
+
import { CfnRule, EventBus, IEventBus, IRuleTarget, Rule } from 'aws-cdk-lib/aws-events'
|
|
4
|
+
import { CfnRole, Role } from 'aws-cdk-lib/aws-iam'
|
|
5
|
+
import { CfnPermission, IFunction } from 'aws-cdk-lib/aws-lambda'
|
|
6
|
+
import { CfnPipe } from 'aws-cdk-lib/aws-pipes'
|
|
7
|
+
import { IQueue } from 'aws-cdk-lib/aws-sqs'
|
|
8
|
+
import { IStateMachine } from 'aws-cdk-lib/aws-stepfunctions'
|
|
9
|
+
import { CommonConstruct } from '../../common'
|
|
10
|
+
import { createCfnOutput } from '../../utils'
|
|
11
11
|
import { EventBusProps, EventRuleProps, RuleProps, SqsToSfnPipeProps } from './types'
|
|
12
12
|
|
|
13
13
|
/**
|
|
@@ -18,7 +18,7 @@ import { EventBusProps, EventRuleProps, RuleProps, SqsToSfnPipeProps } from './t
|
|
|
18
18
|
* import { CommonConstruct } from '@gradientedge/cdk-utils'
|
|
19
19
|
*
|
|
20
20
|
* class CustomConstruct extends CommonConstruct {
|
|
21
|
-
* constructor(parent:
|
|
21
|
+
* constructor(parent: Construct, id: string, props: common.CommonStackProps) {
|
|
22
22
|
* super(parent, id, props)
|
|
23
23
|
* this.props = props
|
|
24
24
|
* this.eventManager.createLambdaRule('MyLambdaRule', this, lambdaFunction)
|
|
@@ -36,12 +36,12 @@ export class EventManager {
|
|
|
36
36
|
public createEventBus(id: string, scope: CommonConstruct, props: EventBusProps) {
|
|
37
37
|
if (!props) throw `EventBus props undefined for ${id}`
|
|
38
38
|
|
|
39
|
-
const eventBus = new
|
|
39
|
+
const eventBus = new EventBus(scope, `${id}`, {
|
|
40
40
|
eventBusName: `${props.eventBusName}-${scope.props.stage}`,
|
|
41
41
|
})
|
|
42
42
|
|
|
43
|
-
|
|
44
|
-
|
|
43
|
+
createCfnOutput(`${id}-eventBusName`, scope, `${props.eventBusName}-${scope.props.stage}`)
|
|
44
|
+
createCfnOutput(`${id}-eventBusArn`, scope, eventBus.eventBusArn)
|
|
45
45
|
|
|
46
46
|
return eventBus
|
|
47
47
|
}
|
|
@@ -58,12 +58,12 @@ export class EventManager {
|
|
|
58
58
|
id: string,
|
|
59
59
|
scope: CommonConstruct,
|
|
60
60
|
props: EventRuleProps,
|
|
61
|
-
eventBus?:
|
|
62
|
-
targets?:
|
|
61
|
+
eventBus?: IEventBus,
|
|
62
|
+
targets?: IRuleTarget[]
|
|
63
63
|
) {
|
|
64
64
|
if (!props) throw `EventRule props undefined for ${id}`
|
|
65
65
|
|
|
66
|
-
const rule = new
|
|
66
|
+
const rule = new Rule(scope, `${id}`, {
|
|
67
67
|
description: props.description,
|
|
68
68
|
enabled: props.enabled,
|
|
69
69
|
eventBus: eventBus,
|
|
@@ -80,12 +80,12 @@ export class EventManager {
|
|
|
80
80
|
|
|
81
81
|
if (props.tags && props.tags.length > 0) {
|
|
82
82
|
props.tags.forEach(tag => {
|
|
83
|
-
|
|
83
|
+
Tags.of(rule).add(tag.key, tag.value)
|
|
84
84
|
})
|
|
85
85
|
}
|
|
86
86
|
|
|
87
|
-
|
|
88
|
-
|
|
87
|
+
createCfnOutput(`${id}-ruleArn`, scope, rule.ruleArn)
|
|
88
|
+
createCfnOutput(`${id}-ruleName`, scope, rule.ruleName)
|
|
89
89
|
|
|
90
90
|
return rule
|
|
91
91
|
}
|
|
@@ -104,14 +104,14 @@ export class EventManager {
|
|
|
104
104
|
id: string,
|
|
105
105
|
scope: CommonConstruct,
|
|
106
106
|
props: RuleProps,
|
|
107
|
-
lambdaFunction:
|
|
107
|
+
lambdaFunction: IFunction,
|
|
108
108
|
eventBusName?: string,
|
|
109
109
|
eventPattern?: any,
|
|
110
110
|
scheduleExpression?: string
|
|
111
111
|
) {
|
|
112
112
|
if (!props) throw `EventRule props undefined for ${id}`
|
|
113
113
|
|
|
114
|
-
const eventRule = new
|
|
114
|
+
const eventRule = new CfnRule(scope, `${id}`, {
|
|
115
115
|
description: 'Rule to send notification to lambda function target',
|
|
116
116
|
eventBusName: eventBusName,
|
|
117
117
|
eventPattern: eventPattern,
|
|
@@ -127,15 +127,15 @@ export class EventManager {
|
|
|
127
127
|
],
|
|
128
128
|
})
|
|
129
129
|
|
|
130
|
-
new
|
|
130
|
+
new CfnPermission(scope, `${id}LambdaPermission`, {
|
|
131
131
|
action: 'lambda:InvokeFunction',
|
|
132
132
|
functionName: lambdaFunction.functionName,
|
|
133
|
-
principal: '
|
|
133
|
+
principal: 'amazonaws.com',
|
|
134
134
|
sourceArn: eventRule.attrArn,
|
|
135
135
|
})
|
|
136
136
|
|
|
137
|
-
|
|
138
|
-
|
|
137
|
+
createCfnOutput(`${id}-ruleArn`, scope, eventRule.attrArn)
|
|
138
|
+
createCfnOutput(`${id}-ruleName`, scope, eventRule.name)
|
|
139
139
|
|
|
140
140
|
return eventRule
|
|
141
141
|
}
|
|
@@ -155,15 +155,15 @@ export class EventManager {
|
|
|
155
155
|
id: string,
|
|
156
156
|
scope: CommonConstruct,
|
|
157
157
|
props: RuleProps,
|
|
158
|
-
cluster:
|
|
159
|
-
task:
|
|
158
|
+
cluster: ICluster,
|
|
159
|
+
task: ITaskDefinition,
|
|
160
160
|
subnetIds: string[],
|
|
161
|
-
role:
|
|
161
|
+
role: Role | CfnRole,
|
|
162
162
|
eventPattern?: any
|
|
163
163
|
) {
|
|
164
164
|
if (!props) throw `EventRule props undefined for ${id}`
|
|
165
165
|
|
|
166
|
-
const eventRule = new
|
|
166
|
+
const eventRule = new CfnRule(scope, `${id}`, {
|
|
167
167
|
description: 'Rule to send notification on new objects in data bucket to ecs task target',
|
|
168
168
|
eventPattern: eventPattern,
|
|
169
169
|
name: `${props.name}-${scope.props.stage}`,
|
|
@@ -180,13 +180,13 @@ export class EventManager {
|
|
|
180
180
|
taskDefinitionArn: task.taskDefinitionArn,
|
|
181
181
|
},
|
|
182
182
|
id: `${id}-${scope.props.stage}`,
|
|
183
|
-
roleArn: role instanceof
|
|
183
|
+
roleArn: role instanceof Role ? role.roleArn : role.attrArn,
|
|
184
184
|
},
|
|
185
185
|
],
|
|
186
186
|
})
|
|
187
187
|
|
|
188
|
-
|
|
189
|
-
|
|
188
|
+
createCfnOutput(`${id}-ruleArn`, scope, eventRule.attrArn)
|
|
189
|
+
createCfnOutput(`${id}-ruleName`, scope, eventRule.name)
|
|
190
190
|
|
|
191
191
|
return eventRule
|
|
192
192
|
}
|
|
@@ -203,8 +203,8 @@ export class EventManager {
|
|
|
203
203
|
id: string,
|
|
204
204
|
scope: CommonConstruct,
|
|
205
205
|
props: SqsToSfnPipeProps,
|
|
206
|
-
sourceQueue:
|
|
207
|
-
targetStepFunction:
|
|
206
|
+
sourceQueue: IQueue,
|
|
207
|
+
targetStepFunction: IStateMachine
|
|
208
208
|
) {
|
|
209
209
|
const pipeRole = scope.iamManager.createRoleForSqsToSfnPipe(
|
|
210
210
|
`${id}-role`,
|
|
@@ -213,7 +213,7 @@ export class EventManager {
|
|
|
213
213
|
targetStepFunction.stateMachineArn
|
|
214
214
|
)
|
|
215
215
|
|
|
216
|
-
const pipe = new
|
|
216
|
+
const pipe = new CfnPipe(scope, `${id}`, {
|
|
217
217
|
...props,
|
|
218
218
|
description: props.description,
|
|
219
219
|
enrichment: props.enrichment,
|
|
@@ -245,8 +245,8 @@ export class EventManager {
|
|
|
245
245
|
},
|
|
246
246
|
})
|
|
247
247
|
|
|
248
|
-
|
|
249
|
-
|
|
248
|
+
createCfnOutput(`${id}-pipeArn`, scope, pipe.attrArn)
|
|
249
|
+
createCfnOutput(`${id}-pipeName`, scope, pipe.name)
|
|
250
250
|
|
|
251
251
|
return pipe
|
|
252
252
|
}
|