@alekitto/cdk-constructs
Advanced tools
Comparing version 0.1.7-beta.1 to 0.1.7-beta.2
@@ -7,2 +7,3 @@ "use strict"; | ||
const extension_interfaces_1 = require("./extension-interfaces"); | ||
const service_1 = require("../service"); | ||
// The version of the App Mesh envoy sidecar to add to the task. | ||
@@ -255,2 +256,5 @@ const APP_MESH_ENVOY_SIDECAR_VERSION = 'v1.20.0.1-prod'; | ||
var _a, _b; | ||
if (!(this.parentService instanceof service_1.Service)) { | ||
return; | ||
} | ||
const otherAppMesh = otherService.serviceDescription.get('appmesh'); | ||
@@ -304,2 +308,2 @@ const otherContainer = otherService.serviceDescription.get('service-container'); | ||
exports.AppMeshExtension = AppMeshExtension; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYXBwbWVzaC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbImFwcG1lc2gudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQUEseUNBQXlDO0FBQ3pDLDZDQVNxQjtBQUVyQixpRUFBd0U7QUFJeEUsZ0VBQWdFO0FBQ2hFLE1BQU0sOEJBQThCLEdBQUcsZ0JBQWdCLENBQUM7QUFDeEQsTUFBTSxlQUFlLEdBQUcsQ0FBQyxJQUFZLEVBQUUsRUFBRSxDQUFDLElBQUksQ0FBQyxPQUFPLENBQUMsbUJBQW1CLEVBQUUsR0FBRyxDQUFDLENBQUM7QUF3Q2pGOzs7Ozs7Ozs7R0FTRztBQUNILE1BQWEsZ0JBQWlCLFNBQVEsdUNBQWdCO0lBZ0JsRCxZQUFZLEtBQWdCOztRQUN4QixLQUFLLENBQUMsU0FBUyxDQUFDLENBQUM7UUFDakIsSUFBSSxDQUFDLElBQUksR0FBRyxLQUFLLENBQUMsSUFBSSxDQUFDO1FBQ3ZCLElBQUksQ0FBQyxZQUFZLFNBQUcsS0FBSyxDQUFDLFlBQVksbUNBQUksOEJBQThCLENBQUM7UUFDekUsSUFBSSx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gIH1cblxuICAgICAgICB0aGlzLnRyYWZmaWNQb3J0ID0gdGhpcy50cmFmZmljUG9ydCA/PyBjb250YWluZXJleHRlbnNpb24udHJhZmZpY1BvcnRzWzBdO1xuXG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICAuLi5wcm9wcyxcblxuICAgICAgICAgICAgLy8gQXBwIE1lc2ggcmVxdWlyZXMgQVdTIFZQQyBuZXR3b3JraW5nIG1vZGUgc28gdGhhdCBlYWNoXG4gICAgICAgICAgICAvLyBUYXNrIGNhbiBoYXZlIGl0cyBvd24gSVAgYWRkcmVzc1xuICAgICAgICAgICAgbmV0d29ya01vZGU6IGVjcy5OZXR3b3JrTW9kZS5BV1NfVlBDLFxuXG4gICAgICAgICAgICAvLyBUaGlzIGNvbmZpZ3VyZXMgdGhlIGVudm95IGNvbnRhaW5lciBhcyBhIHByb3h5IGZvciBhbGxcbiAgICAgICAgICAgIC8vIFRyYWZmaWMgZ29pbmcgaW50byBhbmQgb3V0IG9mIHRoZSB0YXNrLCB3aXRoIGEgZmV3IGV4Y2VwdGlvbnNcbiAgICAgICAgICAgIC8vIEZvciBtZXRhZGF0YSBlbmRwb2ludHMgb3Igb3RoZXIgcG9ydHMgdGhhdCBuZWVkIGRpcmVjdFxuICAgICAgICAgICAgLy8gQ29tbXVuaWNhdGlvblxuICAgICAgICAgICAgcHJveHlDb25maWd1cmF0aW9uOiBuZXcgZWNzLkFwcE1lc2hQcm94eUNvbmZpZ3VyYXRpb24oe1xuICAgICAgICAgICAgICAgIGNvbnRhaW5lck5hbWU6ICdlbnZveScsXG4gICAgICAgICAgICAgICAgcHJvcGVydGllczoge1xuICAgICAgICAgICAgICAgICAgICBhcHBQb3J0czogWyB0aGlzLnRyYWZmaWNQb3J0LnBvcnQgXSxcbiAgICAgICAgICAgICAgICAgICAgcHJveHlFZ3Jlc3NQb3J0OiAxNTAwMSxcbiAgICAgICAgICAgICAgICAgICAgcHJveHlJbmdyZXNzUG9ydDogMTUwMDAsXG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50SWRGb3JSZWdpb24oJ2V1LW5vcnRoLTEnKSxcbiAgICAgICAgICAgICAgICAnZXUtc291dGgtMSc6IHRoaXMuYWNjb3VudElkRm9yUmVnaW9uKCdldS1zb3V0aC0xJyksXG4gICAgICAgICAgICAgICAgJ2V1LXdlc3QtMSc6IHRoaXMuYWNjb3VudElkRm9yUmVnaW9uKCdldS13ZXN0LTEnKSxcbiAgICAgICAgICAgICAgICAnZXUtd2VzdC0yJzogdGhpcy5hY2NvdW50SWRGb3JSZWdpb24oJ2V1LXdlc3QtMicpLFxuICAgICAgICAgICAgICAgICdldS13ZXN0LTMnOiB0aGlzLmFjY291bnRJZEZvclJlZ2lvbignZXUtd2VzdC0zJyksXG4gICAgICAgICAgICAgICAgJ3NhLWVhc3QtMSc6IHRoaXMuYWNjb3VudElkRm9yUmVnaW9uKCdzYS1lYXN0LTEnKSxcbiAgICAgICAgICAgICAgICAndXMtZWFzdC0xJzogdGhpcy5hY2NvdW50SWRGb3JSZWdpb24oJ3VzLWVhc3QtMScpLFxuICAgICAgICAgICAgICAgICd1cy1lYXN0LTInOiB0aGlzLmFjY291bnRJZEZvclJlZ2lvbigndXMtZWFzdC0yJyksXG4gICAgICAgICAgICAgICAgJ3VzLXdlc3QtMSc6IHRoaXMuYWNjb3VudElkRm9yUmVnaW9uKCd1cy13ZXN0LTEnKSxcbiAgICAgICAgICAgICAgICAndXMtd2VzdC0yJzogdGhpcy5hY2NvdW50SWRGb3JSZWdpb24oJ3VzLXdlc3QtMicpLFxuXG4gICAgICAgICAgICAgICAgJ21lLXNvdXRoLTEnOiB0aGlzLmFjY291bnRJZEZvclJlZ2lvbignbWUtc291dGgtMScpLFxuICAgICAgICAgICAgICAgICdhcC1lYXN0LTEnOiB0aGlzLmFjY291bnRJZEZvclJlZ2lvbignYXAtZWFzdC0xJyksXG4gICAgICAgICAgICAgICAgJ2FmLXNvdXRoLTEnOiB0aGlzLmFjY291bnRJZEZvclJlZ2lvbignYWYtc291dGgtMScpLFxuICAgICAgICAgICAgfSxcbiAgICAgICAgfSk7XG5cbiAgICAgICAgLy8gV0hFTlxuICAgICAgICBjb25zdCBvd25lckFjY291bnQgPSBtYXBwaW5nLmZpbmRJbk1hcChyZWdpb24sICdlY3JSZXBvJyk7XG5cbiAgICAgICAgY29uc3QgYXBwTWVzaFJlcG8gPSBlY3IuUmVwb3NpdG9yeS5mcm9tUmVwb3NpdG9yeUF0dHJpYnV0ZXMoXG4gICAgICAgICAgICB0aGlzLnNjb3BlLFxuICAgICAgICAgICAgYCR7dGhpcy5wYXJlbnRTZXJ2aWNlLmlkfS1lbnZveS1yZXBvYCxcbiAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICByZXBvc2l0b3J5TmFtZTogJ2F3cy1hcHBtZXNoLWVudm95JyxcbiAgICAgICAgICAgICAgICByZXBvc2l0b3J5QXJuOiBgYXJuOmF3czplY3I6JHtyZWdpb259OiR7b3duZXJBY2NvdW50fTpyZXBvc2l0b3J5L2F3cy1hcHBtZXNoLWVudm95YCxcbiAgICAgICAgICAgIH0sXG4gICAgICAgICk7XG5cbiAgICAgICAgdGhpcy5jb250YWluZXIgPSB0YXNrRGVmaW5pdGlvbi5hZGRDb250YWluZXIoJ2Vudm95Jywge1xuICAgICAgICAgICAgaW1hZ2U6IGVjcy5Db250YWluZXJJbWFnZS5mcm9tRWNyUmVwb3NpdG9yeShhcHBNZXNoUmVwbywgdGhpcy5lbnZveVZlcnNpb24pLFxuICAgICAgICAgICAgZXNzZW50aWFsOiB0cnVlLFxuICAgICAgICAgICAgZW52aXJvbm1lbnQ6IHtcbiAgICAgICAgICAgICAgICBBUFBNRVNIX1ZJUlRVQUxfTk9ERV9OQU1FOiBgbWVzaC8ke3RoaXMubWVzaC5tZXNoTmFtZX0vdmlydHVhbE5vZGUvJHttZXNoTmFtZUNsZWFudXAodGhpcy5wYXJlbnRTZXJ2aWNlLmlkKX1gLFxuICAgICAgICAgICAgICAgIEFXU19SRUdJT046IFN0YWNrLm9mKHRoa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gVGFzayBjYW4gaGF2ZSBpdHMgb3duIElQIGFkZHJlc3NcbiAgICAgICAgICAgIG5ldHdvcmtNb2RlOiBlY3MuTmV0d29ya01vZGUuQVdTX1ZQQyxcblxuICAgICAgICAgICAgLy8gVGhpcyBjb25maWd1cmVzIHRoZSBlbnZveSBjb250YWluZXIgYXMgYSBwcm94eSBmb3IgYWxsXG4gICAgICAgICAgICAvLyBUcmFmZmljIGdvaW5nIGludG8gYW5kIG91dCBvZiB0aGUgdGFzaywgd2l0aCBhIGZldyBleGNlcHRpb25zXG4gICAgICAgICAgICAvLyBGb3IgbWV0YWRhdGEgZW5kcG9pbnRzIG9yIG90aGVyIHBvcnRzIHRoYXQgbmVlZCBkaXJlY3RcbiAgICAgICAgICAgIC8vIENvbW11bmljYXRpb25cbiAgICAgICAgICAgIHByb3h5Q29uZmlndXJhdGlvbjogbmV3IGVjcy5BcHBNZXNoUHJveHlDb25maWd1cmF0aW9uKHtcbiAgICAgICAgICAgICAgICBjb250YWluZXJOYW1lOiAnZW52b3knLFxuICAgICAgICAgICAgICAgIHByb3BlcnRpZXM6IHtcbiAgICAgICAgICAgICAgICAgICAgYXBwUG9ydHM6IFsgdGhpcy50cmFmZmljUG9ydC5wb3J0IF0sXG4gICAgICAgICAgICAgICAgICAgIHByb3h5RWdyZXNzUG9ydDogMTUwMDEsXG4gICAgICAgICAgICAgICAgICAgIHByb3h5SW5ncmVzc1BvcnQ6IDE1MDAwLFxuXG4gICAgICAgICAgICAgICAgICAgIC8vIFRoZSBBcHAgTWVzaCBwcm94eSBydW5zIHdpdGggdGhpcyB1c2VyIElELCBhbmQgdGhpcyBrZWVwcyBpdHNcbiAgICAgICAgICAgICAgICAgICAgLy8gT3duIG91dGJvdW5kIGNvbm5lY3Rpb25zIGZyb20gcmVjdXJzaXZlbHkgYXR0ZW1wdGluZyB0byBpbmZpbml0ZWx5IHByb3h5LlxuICAgICAgICAgICAgICAgICAgICBpZ25vcmVkVUlEOiAxMzM3LFxuXG4gIC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50LW1hcHBpbmdgLCB7XG4gICAgICAgICAgICBtYXBwaW5nOiB7XG4gICAgICAgICAgICAgICAgJ2FwLW5vcnRoZWFzdC0xJzogdGhpcy5hY2NvdW50SWRGb3JSZWdpb24oJ2FwLW5vcnRoZWFzdC0xJyksXG4gICAgICAgICAgICAgICAgJ2FwLW5vcnRoZWFzdC0yJzogdGhpcy5hY2NvdW50SWRGb3JSZWdpb24oJ2FwLW5vcnRoZWFzdC0yJyksXG4gICAgICAgICAgICAgICAgJ2FwLXNvdXRoLTEnOiB0aGlzLmFjY291bnRJZEZvclJlZ2lvbignYXAtc291dGgtMScpLFxuICAgICAgICAgICAgICAgICdhcC1zb3V0aGVhc3QtMSc6IHRoaXMuYWNjb3VudElkRm9yUmVnaW9uKCdhcC1zb3V0aGVhc3QtMScpLFxuICAgICAgICAgICAgICAgICdhcC1zb3V0aGVhc3QtMic6IHRoaXMuYWNjb3VudElkRm9yUmVnaW9uKCdhcC1zb3V0aGVhc3QtMScpLFxuICAgICAgICAgICAgICAgICdjYS1jZW50cmFsLTEnOiB0aGlzLmFjY291bnRJZEZvclJlZ2lvbignY2EtY2VudHJhbC0xJyksXG4gICAgICAgICAgICAgICAgJ2V1LWNlbnRyYWwtMSc6IHRoaXMuYWNjb3VudElkRm9yUmVnaW9uKCdldS1jZW50cmFsLTEnKSxcbiAgICAgICAgICAgICAgICAnZXUtbm9ydGgtMSc6IHRoaXMuYWNjb3VudElkRm9yUmVnaW9uKCdldS1ub3J0aC0xJyksXG4gICAgICAgICAgICAgICAgJ2V1LXNvdXRoLTEnOiB0aGlzLmFjY291bnRJZEZvclJlZ2lvbignZXUtc291dGgtMScpLFxuICAgICAgICAgICAgICAgICdldS13ZXN0LTEnOiB0aGlzLmFjY291bnRJZEZvclJlZ2lvbignZXUtd2VzdC0xJyksXG4gICAgICAgICAgICAgICAgJ2V1LXdlc3QtMic6IHRoaXMuYWNjb3VudElkRm9yUmVnaW9uKCdldS13ZXN0LTInKSxcbiAgICAgICAgICAgICAgICAnZXUtd2VzdC0zJzogdGhpcy5hY2NvdW50SWRGb3JSZWdpb24oJ2V1LXdlc3QtMycpLFxuICAgICAgICAgICAgICAgICdzYS1lYXN0LTEnOiB0aGlzLmFjY291bnRJZEZvclJlZ2lvbignc2EtZWFzdC0xJyksXG4gICAgICAgICAgICAgICAgJ3VzLWVhc3QtMSc6IHRoaXMuYWNjb3VudElkRm9yUmVnaW9uKCd1cy1lYXN0LTEnKSxcbiAgICAgICAgICAgICAgICAndXMtZWFzdC0yJzogdGhpcy5hY2NvdW50SWRGb3JSZWdpb24oJ3VzLWVhc3QtMicpLFxuICAgICAgICAgICAgICAgICd1cy13ZXN0LTEnOiB0aGlzLmFjY291bnRJZEZvclJlZ2lvbigndXMtd2VzdC0xJyksXG4gICAgICAgICAgICAgICAgJ3VzLXdlc3QtMic6IHRoaXMuYWNjb3VudElkRm9yUmVnaW9uKCd1cy13ZXN0LTInKSxcblxuICAgICAgICAgICAgICAgICdtZS1zb3V0aC0xJzogdGhpcy5hY2NvdW50SWRGb3JSZWdpb24oJ21lLXNvdXRoLTEnKSxcbiAgICAgICAgICAgICAgICAnYXAtZWFzdC0xJzogdGhpcy5hY2NvdW50SWRGb3JSZWdpb24oJ2FwLWVhc3QtMScpLFxuICAgICAgICAgICAgICAgICdhZi1zb3V0aC0xJzogdGhpcy5hY2NvdW50SWRGb3JSZWdpb24oJ2FmLXNvdXRoLTEnKSxcbiAgICAgICAgICAgIH0sXG4gICAgICAgIH0pO1xuXG4gICAgICAgIC8vIFdIRU5cbiAgICAgICAgY29uc3Qgb3duZXJBY2NvdW50ID0gbWFwcGluZy5maW5kSW5NYXAocmVnaW9uLCAnZWNyUmVwbycpO1xuXG4gICAgICAgIGNvbnN0IGFwcE1lc2hSZXBvID0gZWNyLlJlcG9zaXRvcnkuZnJvbVJlcG9zaXRvcnlBdHRyaWJ1dGVzKFxuICAgICAgICAgICAgdGhpcy5zY29wZSxcbiAgICAgICAgICAgIGAke3RoaXMucGFyZW50U2VydmljZS5pZH0tZW52b3ktcmVwb2AsXG4gICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAgcmVwb3NpdG9yeU5hbWU6ICdhd3MtYXBwbWVzaC1lbnZveScsXG4gICAgICAgICAgICAgICAgcmVwb3NpdG9yeUFybjogYGFybjphd3M6ZWNyOiR7cmVnaW9ufToke293bmVyQWNjb3VudH06cmVwb3NpdG9yeS9hd3MtYXBwbWVzaC1lbnZveWAsXG4gICAgICAgICAgICB9LFxuICAgICAgICApO1xuXG4gICAgICAgIHRoaXMuY29udGFpbmVyID0gdGFza0RlZmluaXRpb24uYWRkQ29udGFpbmVyKCdlbnZveScsIHtcbiAgICAgICAgICAgIGltYWdlOiBlY3MuQ29udGFpbmVySW1hZ2UuZnJvbUVjclJlcG9zaXRvcnkoYXBwTWVzaFJlcG8sIHRoaXMuZW52b3lWZXJzaW9uKSxcbiAgICAgICAgICAgIGVzc2VudGlhbDogdHJ1ZSxcbiAgICAgICAgICAgIGVudmlyb25tZW50OiB7XG4gICAgICAgICAgICAgICAgQVBQTUVTSF9WSVJUVUFMX05PREVfTkFNRTogYG1lc2gvJHt0aGlzLm1lc2gubWVzaE5hbWV9L3ZpcnR1YWxOb2RlLyR7bWVzaE5hbWVDbGVhbnVwKHRoaXMucGFyZW50U2VydmljZS5pZCl9YCxcbiAgICAgICAgICAgICAgICBBV1NfUkVHSU9OOiBTdGFjay5vZih0aGlzLnBhcmVudFNlcnZpY2UpLnJlZ2lvbixcbiAgICAgICAgICAgICAgICBFTkFCTEVfRU5WT1lfU1RBVFNfVEFHUzogJzEnLFxuICAgICAgICAgICAgICAgIEVOQUJMRV9FTlZPWV9ET0dfU1RBVFNEOiAnMScsXG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAgaGVhbHRoQ2hlY2s6IHtcbiAgICAgICAgICAgICAgICBjb21tYW5kOiBbXG4gICAgICAgICAgICAgICAgICAgICdDTUQtU0hFTEwnLFxuICAgICAgICAgICAgICAgICAgICAnY3V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Y2VOYW1lLFxuICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICB9KTtcbiAgICAgICAgICAgIGNhc2UgYXBwbWVzaC5Qcm90b2NvbC5UQ1A6IHJldHVybiBhcHBtZXNoLlJvdXRlU3BlYy50Y3Aoe1xuICAgICAgICAgICAgICAgIHdlaWdodGVkVGFyZ2V0czogd2VpZ2h0ZWRUYXJnZXRzLFxuICAgICAgICAgICAgfSk7XG4gICAgICAgIH1cbiAgICB9XG5cbiAgICBwcml2YXRlIHZpcnR1YWxSb3V0ZXJMaXN0ZW5lcihwb3J0OiBudW1iZXIpOiBhcHBtZXNoLlZpcnR1YWxSb3V0ZXJMaXN0ZW5lciB7XG4gICAgICAgIHN3aXRjaCAodGhpcy5wcm90b2NvbCkge1xuICAgICAgICAgICAgY2FzZSBhcHBtZXNoLlByb3RvY29sLkhUVFA6IHJldHVybiBhcHBtZXNoLlZpcnR1YWxSb3V0ZXJMaXN0ZW5lci5odHRwKHBvcnQpO1xuICAgICAgICAgICAgY2FzZSBhcHBtZXNoLlByb3RvY29sLkhUVFAyOiByZXR1cm4gYXBwbWVzaC5WaXJ0dWFsUm91dGVyTGlzdGVuZXIuaHR0cDIocG9ydCk7XG4gICAgICAgICAgICBjYXNlIGFwcG1lc2guUHJvdG9jb2wuR1JQQzogcmV0dXJuIGFwcG1lc2guVmlydHVhbFJvdXRlckxpc3RlbmVyLmdycGMocG9ydCk7XG4gICAgICAgICAgICBjYXNlIGFwcG1lc2guUHJvdG9jb2wuVENQOiByZXR1cm4gYXBwbWVzaC5WaXJ0dWFsUm91dGVyTGlzdGVuZXIudGNwKHBvcnQpO1xuICAgICAgICB9XG4gICAgfVxufVxuIl19 |
import { Duration, aws_ecs as ecs } from 'aws-cdk-lib'; | ||
import { Construct } from 'constructs'; | ||
import { Service } from '../service'; | ||
import { BaseService } from "../base-service"; | ||
/** | ||
@@ -124,3 +125,3 @@ * The types of capacity that are supported. These capacity types may change the | ||
*/ | ||
protected parentService: Service; | ||
protected parentService: BaseService; | ||
protected scope: Construct; | ||
@@ -162,3 +163,3 @@ protected containerMutatingHooks: ContainerMutatingHook[]; | ||
*/ | ||
prehook(parent: Service, scope: Construct): void; | ||
prehook(parent: BaseService, scope: Construct): void; | ||
/** | ||
@@ -165,0 +166,0 @@ * Once the task definition is created, this hook is called for each |
@@ -161,2 +161,2 @@ "use strict"; | ||
exports.ContainerMutatingHook = ContainerMutatingHook; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZXh0ZW5zaW9uLWludGVyZmFjZXMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJleHRlbnNpb24taW50ZXJmYWNlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFPQSx5REFBeUQ7QUFDekQsc0RBQXNEO0FBRXREOzs7R0FHRztBQUNILElBQVksdUJBWVg7QUFaRCxXQUFZLHVCQUF1QjtJQUMvQjs7O09BR0c7SUFDSCw4Q0FBbUIsQ0FBQTtJQUVuQjs7O09BR0c7SUFDSCxzQ0FBVyxDQUFBO0FBQ2YsQ0FBQyxFQVpXLHVCQUF1QixHQUF2QiwrQkFBdUIsS0FBdkIsK0JBQXVCLFFBWWxDO0FBOEZEOzs7O0dBSUc7QUFDSCxNQUFzQixnQkFBZ0I7SUEyQmxDLFlBQVksSUFBWTtRQUp4QixzREFBc0Q7UUFDdEQsMkNBQTJDO1FBQ2pDLDJCQUFzQixHQUE0QixFQUFFLENBQUM7UUFHM0QsSUFBSSxDQUFDLElBQUksR0FBRyxJQUFJLENBQUM7SUFDckIsQ0FBQztJQUVEOzs7T0FHRztJQUNJLFFBQVEsS0FBSyxDQUFDLENBQUMsc0JBQXNCO0lBRTVDOzs7Ozs7OztPQVFHO0lBQ0ksd0JBQXdCLENBQUMsSUFBMkI7UUFDdkQsSUFBSSxDQUFDLHNCQUFzQixDQUFDLElBQUksQ0FBQyxJQUFJLENBQUMsQ0FBQztJQUMzQyx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XJzLlxuICovXG5leHBvcnQgYWJzdHJhY3QgY2xhc3MgQ29udGFpbmVyTXV0YXRpbmdIb29rIHtcbiAgICAvKipcbiAgICAgKiBUaGlzIGlzIGEgaG9vayBmb3IgbW9kaWZ5aW5nIHRoZSBjb250YWluZXIgZGVmaW5pdGlvbiBvZiBhbnkgdXBzdHJlYW1cbiAgICAgKiBjb250YWluZXJzLiBUaGlzIGlzIHByaW1hcmlseSB1c2VkIGZvciB0aGUgbWFpbiBhcHBsaWNhdGlvbiBjb250YWluZXIuXG4gICAgICogRm9yIGV4YW1wbGUsIHRoZSBGaXJlbGVucyBleHRlbnNpb24gd2FudHMgdG8gYmUgYWJsZSB0byBtb2RpZnkgdGhlIGxvZ2dpbmdcbiAgICAgKiBzZXR0aW5ncyBvZiB0aGUgYXBwbGljYXRpb24gY29udGFpbmVyLlxuICAgICAqXG4gICAgICogQHBhcmFtIHByb3BzIC0gVGhlIGNvbnRhaW5lciBkZWZpbml0aW9uIHRvIG11dGF0ZS5cbiAgICAgKi9cbiAgICBwdWJsaWMgbXV0YXRlQ29udGFpbmVyRGVmaW5pdGlvbihwcm9wczogZWNzLkNvbnRhaW5lckRlZmluaXRpb25PcHRpb25zKTogZWNzLkNvbnRhaW5lckRlZmluaXRpb25PcHRpb25zIHtcbiAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICAgIC4uLnByb3BzLFxuICAgICAgICB9IGFzIGVjcy5Db250YWluZXJEZWZpbml0aW9uT3B0aW9ucztcbiAgICB9XG59XG4iXX0= |
@@ -1,7 +0,5 @@ | ||
import { EnvironmentCapacityType } from './extensions/extension-interfaces'; | ||
import { aws_ec2 as ec2, aws_ecs as ecs, aws_ecs_patterns as ecs_patterns, aws_events as events } from 'aws-cdk-lib'; | ||
import { aws_ecs_patterns as ecs_patterns, aws_events as events } from 'aws-cdk-lib'; | ||
import { Construct } from 'constructs'; | ||
import { IEnvironment } from './environment'; | ||
import { ServiceDescription } from './service-description'; | ||
import { ServiceProps } from "./service"; | ||
import { BaseService } from "./base-service"; | ||
/** | ||
@@ -21,3 +19,3 @@ * The settings for an ECS Task. | ||
*/ | ||
export declare class ScheduledTask extends Construct { | ||
export declare class ScheduledTask extends BaseService { | ||
/** | ||
@@ -31,43 +29,3 @@ * The underlying ECS service that was created. | ||
readonly schedule: events.Schedule; | ||
/** | ||
* The name of the service. | ||
*/ | ||
readonly id: string; | ||
/** | ||
* The VPC where this service should be placed. | ||
*/ | ||
readonly vpc: ec2.IVpc; | ||
/** | ||
* The cluster that is providing capacity for this service. | ||
* [disable-awslint:ref-via-interface] | ||
*/ | ||
readonly cluster: ecs.ICluster; | ||
/** | ||
* The capacity type that this service will use. | ||
* Valid values are EC2 or FARGATE. | ||
*/ | ||
readonly capacityType: EnvironmentCapacityType; | ||
/** | ||
* The ServiceDescription used to build this service. | ||
*/ | ||
readonly serviceDescription: ServiceDescription; | ||
/** | ||
* The environment where this service was launched. | ||
*/ | ||
readonly environment: IEnvironment; | ||
/** | ||
* The generated task definition for this service. It is only | ||
* generated after .prepare() has been executed. | ||
*/ | ||
protected taskDefinition: ecs.TaskDefinition; | ||
/** | ||
* The list of URLs associated with this service. | ||
*/ | ||
private urls; | ||
private readonly scope; | ||
constructor(scope: Construct, id: string, props: TaskProps); | ||
/** | ||
* Returns the task network mode from definition. | ||
*/ | ||
get networkMode(): ecs.NetworkMode; | ||
} |
@@ -6,3 +6,3 @@ "use strict"; | ||
const aws_cdk_lib_1 = require("aws-cdk-lib"); | ||
const constructs_1 = require("constructs"); | ||
const base_service_1 = require("./base-service"); | ||
/** | ||
@@ -13,23 +13,6 @@ * This Service construct serves as a Builder class for an ECS service. It | ||
*/ | ||
class ScheduledTask extends constructs_1.Construct { | ||
class ScheduledTask extends base_service_1.BaseService { | ||
constructor(scope, id, props) { | ||
var _a; | ||
super(scope, id); | ||
/** | ||
* The list of URLs associated with this service. | ||
*/ | ||
this.urls = {}; | ||
this.scope = scope; | ||
this.id = id; | ||
this.environment = props.environment; | ||
this.vpc = props.environment.vpc; | ||
this.cluster = props.environment.cluster; | ||
this.capacityType = (_a = props.capacityType) !== null && _a !== void 0 ? _a : props.environment.capacityType; | ||
this.serviceDescription = props.serviceDescription; | ||
super(scope, id, props); | ||
this.schedule = props.schedule; | ||
// Check to make sure that the user has actually added a container | ||
const containerextension = this.serviceDescription.get('service-container'); | ||
if (!containerextension) { | ||
throw new Error(`Service '${this.id}' must have a Container extension`); | ||
} | ||
// At the point of preparation all extensions have been defined on the service | ||
@@ -96,10 +79,4 @@ // So give each extension a chance to now add hooks to other extensions if | ||
} | ||
/** | ||
* Returns the task network mode from definition. | ||
*/ | ||
get networkMode() { | ||
return this.taskDefinition.networkMode; | ||
} | ||
} | ||
exports.ScheduledTask = ScheduledTask; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2NoZWR1bGVkLXRhc2suanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJzY2hlZHVsZWQtdGFzay50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFBQSw0RUFBNEU7QUFDNUUsNkNBTXFCO0FBQ3JCLDJDQUF1QztBQWV2Qzs7OztHQUlHO0FBQ0gsTUFBYSxhQUFjLFNBQVEsc0JBQVM7SUF3RHhDLFlBQVksS0FBZ0IsRUFBRSxFQUFVLEVBQUUsS0FBZ0I7O1FBQ3RELEtBQUssQ0FBQyxLQUFLLEVBQUUsRUFBRSxDQUFDLENBQUM7UUFSckI7O1dBRUc7UUFDSyxTQUFJLEdBQTJCLEVBQUUsQ0FBQztRQU90QyxJQUFJLENBQUMsS0FBSyxHQUFHLEtBQUssQ0FBQztRQUNuQixJQUFJLENBQUMsRUFBRSxHQUFHLEVBQUUsQ0FBQztRQUNiLElBQUksQ0FBQyxXQUFXLEdBQUcsS0FBSyxDQUFDLFdBQVcsQ0FBQztRQUNyQyxJQUFJLENBQUMsR0FBRyxHQUFHLEtBQUssQ0FBQyxXQUFXLENBQUMsR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5zY29wZSwgYCR7dGhpcy5pZH0tdGFza2AsIHRhc2tQcm9wcyk7XG4gICAgICAgIH0gZWxzZSBpZiAodGhpcy5jYXBhY2l0eVR5cGUgPT09IEVudmlyb25tZW50Q2FwYWNpdHlUeXBlLkZBUkdBVEUpIHtcbiAgICAgICAgICAgIHRoaXMuZWNzVGFzayA9IG5ldyBlY3NfcGF0dGVybnMuU2NoZWR1bGVkRmFyZ2F0ZVRhc2sodGhpcy5zY29wZSwgYCR7dGhpcy5pZH0tdGFza2AsIHRhc2tQcm9wcyk7XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IoYFVua25vd24gY2FwYWNpdHkgdHlwZSBmb3Igc2VydmljZSAke3RoaXMuaWR9YCk7XG4gICAgICAgIH1cbiAgICB9XG59XG4iXX0= |
import { EnvironmentCapacityType } from './extensions/extension-interfaces'; | ||
import { aws_ec2 as ec2, aws_ecs as ecs, aws_iam as iam } from 'aws-cdk-lib'; | ||
import { aws_ecs as ecs, aws_iam as iam } from 'aws-cdk-lib'; | ||
import { Construct } from 'constructs'; | ||
import { IEnvironment } from './environment'; | ||
import { ServiceDescription } from './service-description'; | ||
import { BaseService } from "./base-service"; | ||
/** | ||
@@ -44,3 +45,3 @@ * The settings for an ECS Service. | ||
*/ | ||
export declare class Service extends Construct { | ||
export declare class Service extends BaseService { | ||
/** | ||
@@ -51,37 +52,5 @@ * The underlying ECS service that was created. | ||
/** | ||
* The name of the service. | ||
*/ | ||
readonly id: string; | ||
/** | ||
* The VPC where this service should be placed. | ||
*/ | ||
readonly vpc: ec2.IVpc; | ||
/** | ||
* The cluster that is providing capacity for this service. | ||
* [disable-awslint:ref-via-interface] | ||
*/ | ||
readonly cluster: ecs.ICluster; | ||
/** | ||
* The capacity type that this service will use. | ||
* Valid values are EC2 or FARGATE. | ||
*/ | ||
readonly capacityType: EnvironmentCapacityType; | ||
/** | ||
* The ServiceDescription used to build this service. | ||
*/ | ||
readonly serviceDescription: ServiceDescription; | ||
/** | ||
* The environment where this service was launched. | ||
*/ | ||
readonly environment: IEnvironment; | ||
/** | ||
* The generated task definition for this service. It is only | ||
* generated after .prepare() has been executed. | ||
*/ | ||
protected taskDefinition: ecs.TaskDefinition; | ||
/** | ||
* The list of URLs associated with this service. | ||
*/ | ||
private urls; | ||
private readonly scope; | ||
constructor(scope: Construct, id: string, props: ServiceProps); | ||
@@ -111,6 +80,2 @@ /** | ||
getURL(urlName: string): string; | ||
/** | ||
* Returns the task network mode from definition. | ||
*/ | ||
get networkMode(): ecs.NetworkMode; | ||
} |
@@ -6,3 +6,3 @@ "use strict"; | ||
const aws_cdk_lib_1 = require("aws-cdk-lib"); | ||
const constructs_1 = require("constructs"); | ||
const base_service_1 = require("./base-service"); | ||
/** | ||
@@ -13,6 +13,6 @@ * This Service construct serves as a Builder class for an ECS service. It | ||
*/ | ||
class Service extends constructs_1.Construct { | ||
class Service extends base_service_1.BaseService { | ||
constructor(scope, id, props) { | ||
var _a, _b; | ||
super(scope, id); | ||
super(scope, id, props); | ||
/** | ||
@@ -22,20 +22,2 @@ * The list of URLs associated with this service. | ||
this.urls = {}; | ||
this.scope = scope; | ||
this.id = id; | ||
this.environment = props.environment; | ||
this.vpc = props.environment.vpc; | ||
this.cluster = props.environment.cluster; | ||
this.capacityType = (_a = props.capacityType) !== null && _a !== void 0 ? _a : props.environment.capacityType; | ||
this.serviceDescription = props.serviceDescription; | ||
// Check to make sure that the user has actually added a container | ||
const containerextension = this.serviceDescription.get('service-container'); | ||
if (!containerextension) { | ||
throw new Error(`Service '${this.id}' must have a Container extension`); | ||
} | ||
// First set the scope for all the extensions | ||
for (const extensions in this.serviceDescription.extensions) { | ||
if (this.serviceDescription.extensions[extensions]) { | ||
this.serviceDescription.extensions[extensions].prehook(this, this.scope); | ||
} | ||
} | ||
// At the point of preparation all extensions have been defined on the service | ||
@@ -51,5 +33,2 @@ // So give each extension a chance to now add hooks to other extensions if | ||
let taskDefProps = { | ||
// Default CPU and memory | ||
cpu: '256', | ||
memoryMiB: '512', | ||
// Allow user to pre-define the taskRole so that it can be used in resource policies that may | ||
@@ -61,2 +40,9 @@ // Be defined before the ECS service exists in a CDK application | ||
}; | ||
if (this.capacityType === extension_interfaces_1.EnvironmentCapacityType.FARGATE) { | ||
taskDefProps = { | ||
...taskDefProps, | ||
cpu: '256', | ||
memoryMiB: '512', | ||
}; | ||
} | ||
for (const extensions of Object.keys(this.serviceDescription.extensions)) { | ||
@@ -75,2 +61,16 @@ if (this.serviceDescription.extensions[extensions]) { | ||
} | ||
if (this.capacityType === extension_interfaces_1.EnvironmentCapacityType.EC2) { | ||
let memory = 0; | ||
for (const extensions of Object.keys(this.serviceDescription.extensions)) { | ||
if (this.serviceDescription.extensions[extensions]) { | ||
const container = this.serviceDescription.extensions[extensions].container; | ||
if (container) { | ||
const props = container.props; | ||
memory += (_a = props.memoryReservationMiB) !== null && _a !== void 0 ? _a : props.memoryLimitMiB; | ||
} | ||
} | ||
} | ||
const node = this.taskDefinition.node.findChild('Resource'); | ||
node.memory = String(memory || 256); | ||
} | ||
// Now that all containers are created, give each extension a chance | ||
@@ -196,10 +196,4 @@ // To bake its dependency graph | ||
} | ||
/** | ||
* Returns the task network mode from definition. | ||
*/ | ||
get networkMode() { | ||
return this.taskDefinition.networkMode; | ||
} | ||
} | ||
exports.Service = Service; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2VydmljZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbInNlcnZpY2UudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQUEsNEVBQTBGO0FBQzFGLDZDQUlxQjtBQUNyQiwyQ0FBdUM7QUEwQ3ZDOzs7O0dBSUc7QUFDSCxNQUFhLE9BQVEsU0FBUSxzQkFBUztJQW1EbEMsWUFBWSxLQUFnQixFQUFFLEVBQVUsRUFBRSxLQUFtQjs7UUFDekQsS0FBSyxDQU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HJvcHMgPSB7XG4gICAgICAgICAgICAgICAgICAgIC4uLnNlcnZpY2VQcm9wcyxcbiAgICAgICAgICAgICAgICAgICAgbWF4SGVhbHRoeVBlcmNlbnQ6IE1hdGgubWF4KDIwMCwgc2VydmljZVByb3BzLm1heEhlYWx0aHlQZXJjZW50KSxcbiAgICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgfSBlbHNlIGlmICgzID49IHNlcnZpY2VQcm9wcy5kZXNpcmVkQ291bnQpIHtcbiAgICAgICAgICAgICAgICAvLyBJZiB0YXNrIGNvdW50IGlzIDIgb3IgMyB0aGVuIG1heCBwZXJjZW50IG11c3QgYmUgYXQgbGVhc3QgMTUwJSB0b1xuICAgICAgICAgICAgICAgIC8vIEFsbG93IG9uZSByZXBsYWNlbWVudCB0YXNrIHRvIGJlIGxhdW5jaGVkIGF0IGEgdGltZS5cbiAgICAgICAgICAgICAgICBzZXJ2aWNlUHJvcHMgPSB7XG4gICAgICAgICAgICAgICAgICAgIC4uLnNlcnZpY2VQcm9wcyxcbiAgICAgICAgICAgICAgICAgICAgbWF4SGVhbHRoeVBlcmNlbnQ6IE1hdGgubWF4KDE1MCwgc2VydmljZVByb3BzLm1heEhlYWx0aHlQZXJjZW50KSxcbiAgICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAvLyBGb3IgYW55dGhpbmcgaGlnaGVyIHRoYW4gMyB0YXNrcyBzZXQgbWF4IHBlcmNlbnQgdG8gYXQgbGVhc3QgMTI1JVxuICAgICAgICAgICAgICAgIC8vIEZvciA0IHRhc2tzIHRoaXMgd2lsbCBhbGxvdyBleGFjdGx5IG9uZSBleHRyYSByZXBsYWNlbWVudCB0YXNrXG4gICAgICAgICAgICAgICAgLy8gQXQgYSB0aW1lLCBmb3IgYW55IGhpZ2hlciB0YXNrIGNvdW50IGl0IHdpbGwgYWxsb3cgMjUlIG9mIHRoZSB0YXNrc1xuICAgICAgICAgICAgICAgIC8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BhZGRVUkwodXJsTmFtZTogc3RyaW5nLCB1cmw6IHN0cmluZykge1xuICAgICAgICB0aGlzLnVybHNbdXJsTmFtZV0gPSB1cmw7XG4gICAgfVxuXG4gICAgLyoqXG4gICAgICogUmV0cmlldmUgYSBVUkwgZm9yIHRoZSBzZXJ2aWNlLiBUaGUgVVJMIG11c3QgaGF2ZSBwcmV2aW91c2x5IGJlZW5cbiAgICAgKiBzdG9yZWQgYnkgb25lIG9mIHRoZSBVUkwgcHJvdmlkaW5nIGV4dGVuc2lvbnMuXG4gICAgICpcbiAgICAgKiBAcGFyYW0gdXJsTmFtZSAtIFRoZSBVUkwgdG8gbG9vayB1cC5cbiAgICAgKi9cbiAgICBwdWJsaWMgZ2V0VVJMKHVybE5hbWU6IHN0cmluZykge1xuICAgICAgICBpZiAoIXRoaXMudXJsc1t1cmxOYW1lXSkge1xuICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKGBVbmFibGUgdG8gZmluZCBhIFVSTCB3aXRoIG5hbWUgJyR7dXJsTmFtZX0nYCk7XG4gICAgICAgIH1cblxuICAgICAgICByZXR1cm4gdGhpcy51cmxzW3VybE5hbWVdO1xuICAgIH1cblxuICAgIC8qKlxuICAgICAqIFJldHVybnMgdGhlIHRhc2sgbmV0d29yayBtb2RlIGZyb20gZGVmaW5pdGlvbi5cbiAgICAgKi9cbiAgICBnZXQgbmV0d29ya01vZGUoKTogZWNzLk5ldHdvcmtNb2RlIHtcbiAgICAgICAgcmV0dXJuIHRoaXMudGFza0RlZmluaXRpb24ubmV0d29ya01vZGU7XG4gICAgfVxufVxuIl19 | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2VydmljZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbInNlcnZpY2UudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQUEsNEVBQTBGO0FBQzFGLDZDQUlxQjtBQUlyQixpREFBNkM7QU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lIHJlcGxhY2VtZW50IHRhc2sgdG8gYmUgbGF1bmNoZWQgYXQgYSB0aW1lLlxuICAgICAgICAgICAgICAgIHNlcnZpY2VQcm9wcyA9IHtcbiAgICAgICAgICAgICAgICAgICAgLi4uc2VydmljZVByb3BzLFxuICAgICAgICAgICAgICAgICAgICBtYXhIZWFsdGh5UGVyY2VudDogTWF0aC5tYXgoMTUwLCBzZXJ2aWNlUHJvcHMubWF4SGVhbHRoeVBlcmNlbnQpLFxuICAgICAgICAgICAgICAgIH07XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIC8vIEZvciBhbnl0aGluZyBoaWdoZXIgdGhhbiAzIHRhc2tzIHNldCBtYXggcGVyY2VudCB0byBhdCBsZWFzdCAxMjUlXG4gICAgICAgICAgICAgICAgLy8gRm9yIDQgdGFza3MgdGhpcyB3aWxsIGFsbG93IGV4YWN0bHkgb25lIGV4dHJhIHJlcGxhY2VtZW50IHRhc2tcbiAgICAgICAgICAgICAgICAvLyBBdCBhIHRpbWUsIGZvciBhbnkgaGlnaGVyIHRhc2sgY291bnQgaXQgd2lsbCBhbGxvdyAyNSUgb2YgdGhlIHRhc2tzXG4gICAgICAgICAgICAgICAgLy8gVG8gYmUgcmVwbGFjZWQgYXQgYSB0aW1lLlxuICAgICAgICAgICAgICAgIHNlcnZpY2VQcm9wcyA9IHtcbiAgICAgICAgICAgICAgICAgICAgLi4uc2VydmljZVByb3BzLFxuICAgICAgICAgICAgICAgICAgICBtYXhIZWFsdGh5UGVyY2VudDogTWF0aC5tYXgoMTI1LCBzZXJ2aWNlUHJvcHMubWF4SGVhbHRoeVBlcmNlbnQpLFxuICAgICAgICAgICAgICAgIH07XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICBpZiAoMCA8IChwcm9wcy5jYXBhY2l0eVByb3ZpZGVyU3RyYXRlZ2llcyA/PyBbXSkubGVuZ3RoKSB7XG4gICAgICAgICAgICBzZXJ2aWNlUHJvcHMgP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UkwodXJsTmFtZTogc3RyaW5nKSB7XG4gICAgICAgIGlmICghdGhpcy51cmxzW3VybE5hbWVdKSB7XG4gICAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IoYFVuYWJsZSB0byBmaW5kIGEgVVJMIHdpdGggbmFtZSAnJHt1cmxOYW1lfSdgKTtcbiAgICAgICAgfVxuXG4gICAgICAgIHJldHVybiB0aGlzLnVybHNbdXJsTmFtZV07XG4gICAgfVxufVxuIl19 |
{ | ||
"name": "@alekitto/cdk-constructs", | ||
"version": "0.1.7-beta.1", | ||
"version": "0.1.7-beta.2", | ||
"description": "AWS CDK constructs", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
151
961179
10846