@gradientedge/cdk-utils 4.4.2 → 4.4.6

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.
Files changed (449) hide show
  1. package/app/api-destined-function/package.json +1 -2
  2. package/lerna.json +6 -0
  3. package/package.json +7 -8
  4. package/api-docs/AcmManager.html +0 -622
  5. package/api-docs/AcmProps.html +0 -238
  6. package/api-docs/AlarmProps.html +0 -238
  7. package/api-docs/AlarmStatusWidgetProps.html +0 -238
  8. package/api-docs/ApiDestinationEvent.html +0 -297
  9. package/api-docs/ApiDestinationEventType.html +0 -238
  10. package/api-docs/ApiDestinedLambda.html +0 -297
  11. package/api-docs/ApiDestinedLambdaEnvironment.html +0 -238
  12. package/api-docs/ApiDestinedLambdaType.html +0 -238
  13. package/api-docs/ApiDestinedRestApi.html +0 -297
  14. package/api-docs/ApiDestinedRestApiType.html +0 -238
  15. package/api-docs/ApiManager.html +0 -766
  16. package/api-docs/ApiToEventBridgeTarget.html +0 -1877
  17. package/api-docs/ApiToEventBridgeTarget.jpg +0 -0
  18. package/api-docs/ApiToEventBridgeTargetEventProps.html +0 -238
  19. package/api-docs/ApiToEventBridgeTargetLambdaProps.html +0 -238
  20. package/api-docs/ApiToEventBridgeTargetProps.html +0 -238
  21. package/api-docs/ApiToEventBridgeTargetRestApiProps.html +0 -238
  22. package/api-docs/AppConfigManager.html +0 -1203
  23. package/api-docs/AppConfigProps.html +0 -238
  24. package/api-docs/CloudFrontManager.html +0 -2402
  25. package/api-docs/CloudFrontProps.html +0 -238
  26. package/api-docs/CloudTrailManager.html +0 -637
  27. package/api-docs/CloudTrailProps.html +0 -238
  28. package/api-docs/CloudWatchManager.html +0 -2986
  29. package/api-docs/CloudfrontFunctionProps.html +0 -238
  30. package/api-docs/CodeBuildManager.html +0 -736
  31. package/api-docs/CommonConstruct.html +0 -1299
  32. package/api-docs/CommonStack.html +0 -813
  33. package/api-docs/CommonStackProps.html +0 -238
  34. package/api-docs/DashboardProps.html +0 -238
  35. package/api-docs/DistributionProps.html +0 -238
  36. package/api-docs/DynamodbManager.html +0 -530
  37. package/api-docs/EcrManager.html +0 -530
  38. package/api-docs/EcsClusterProps.html +0 -238
  39. package/api-docs/EcsManager.html +0 -880
  40. package/api-docs/EcsTaskProps.html +0 -238
  41. package/api-docs/EksClusterProps.html +0 -238
  42. package/api-docs/EksManager.html +0 -580
  43. package/api-docs/EventBusProps.html +0 -238
  44. package/api-docs/EventManager.html +0 -1454
  45. package/api-docs/EventRuleProps.html +0 -238
  46. package/api-docs/GraphQLApiLambda.html +0 -1671
  47. package/api-docs/GraphQLApiLambda.jpg +0 -0
  48. package/api-docs/GraphQlApiLambdaEnvironment.html +0 -238
  49. package/api-docs/GraphQlApiLambdaProps.html +0 -238
  50. package/api-docs/GraphWidgetProps.html +0 -238
  51. package/api-docs/HealthCheck.html +0 -238
  52. package/api-docs/IamManager.html +0 -3821
  53. package/api-docs/LambdaEdgeProps.html +0 -238
  54. package/api-docs/LambdaEnvironment.html +0 -238
  55. package/api-docs/LambdaManager.html +0 -2378
  56. package/api-docs/LambdaProps.html +0 -238
  57. package/api-docs/LifecycleRule.html +0 -238
  58. package/api-docs/LogManager.html +0 -955
  59. package/api-docs/LogProps.html +0 -238
  60. package/api-docs/LogQueryWidgetProps.html +0 -238
  61. package/api-docs/MetricFilterProps.html +0 -238
  62. package/api-docs/MetricProps.html +0 -238
  63. package/api-docs/NumericWidgetProps.html +0 -238
  64. package/api-docs/Route53Manager.html +0 -1460
  65. package/api-docs/Route53Props.html +0 -238
  66. package/api-docs/RuleProps.html +0 -238
  67. package/api-docs/S3BucketProps.html +0 -238
  68. package/api-docs/S3Manager.html +0 -1546
  69. package/api-docs/SSMParameterReader.html +0 -431
  70. package/api-docs/SSMParameterReaderProps.html +0 -238
  71. package/api-docs/SecretsManager.html +0 -1140
  72. package/api-docs/SiteWithEcsBackend.html +0 -2391
  73. package/api-docs/SiteWithEcsBackendProps.html +0 -238
  74. package/api-docs/SnsManager.html +0 -780
  75. package/api-docs/SsmManager.html +0 -955
  76. package/api-docs/StaticSite.html +0 -1358
  77. package/api-docs/StaticSiteProps.html +0 -238
  78. package/api-docs/SubscriptionProps.html +0 -238
  79. package/api-docs/TableProps.html +0 -238
  80. package/api-docs/TextWidgetProps.html +0 -238
  81. package/api-docs/VpcManager.html +0 -986
  82. package/api-docs/WafIPSetProps.html +0 -238
  83. package/api-docs/WafManager.html +0 -730
  84. package/api-docs/WafWebACLProps.html +0 -238
  85. package/api-docs/common_construct.ts.html +0 -279
  86. package/api-docs/common_stack.ts.html +0 -303
  87. package/api-docs/construct_api-to-eventbridge-target_api-destination-event.ts.html +0 -175
  88. package/api-docs/construct_api-to-eventbridge-target_api-destined-lambda.ts.html +0 -178
  89. package/api-docs/construct_api-to-eventbridge-target_api-destined-rest-api.ts.html +0 -190
  90. package/api-docs/construct_api-to-eventbridge-target_main.ts.html +0 -751
  91. package/api-docs/construct_graphql-api-lambda_main.ts.html +0 -408
  92. package/api-docs/construct_site-with-ecs-backend_main.ts.html +0 -544
  93. package/api-docs/construct_static-site_main.ts.html +0 -374
  94. package/api-docs/global.html +0 -1530
  95. package/api-docs/index.html +0 -208
  96. package/api-docs/logo.png +0 -0
  97. package/api-docs/manager_aws_acm-manager.ts.html +0 -236
  98. package/api-docs/manager_aws_api-manager.ts.html +0 -260
  99. package/api-docs/manager_aws_app-config-manager.ts.html +0 -310
  100. package/api-docs/manager_aws_cloudfront-manager.ts.html +0 -491
  101. package/api-docs/manager_aws_cloudtrail-manager.ts.html +0 -251
  102. package/api-docs/manager_aws_cloudwatch-manager.ts.html +0 -553
  103. package/api-docs/manager_aws_codebuild-manager.ts.html +0 -240
  104. package/api-docs/manager_aws_dynamodb-manager.ts.html +0 -219
  105. package/api-docs/manager_aws_ecr-manager.ts.html +0 -199
  106. package/api-docs/manager_aws_ecs-manager.ts.html +0 -259
  107. package/api-docs/manager_aws_eks-manager.ts.html +0 -260
  108. package/api-docs/manager_aws_event-manager.ts.html +0 -336
  109. package/api-docs/manager_aws_iam-manager.ts.html +0 -573
  110. package/api-docs/manager_aws_lambda-manager.ts.html +0 -400
  111. package/api-docs/manager_aws_log-manager.ts.html +0 -259
  112. package/api-docs/manager_aws_route53-manager.ts.html +0 -333
  113. package/api-docs/manager_aws_s3-manager.ts.html +0 -361
  114. package/api-docs/manager_aws_secrets-manager.ts.html +0 -274
  115. package/api-docs/manager_aws_sns-manager.ts.html +0 -246
  116. package/api-docs/manager_aws_ssm-manager.ts.html +0 -273
  117. package/api-docs/manager_aws_vpc-manager.ts.html +0 -244
  118. package/api-docs/manager_aws_waf-manager.ts.html +0 -232
  119. package/api-docs/scripts/app.min.js +0 -1
  120. package/api-docs/scripts/linenumber.js +0 -26
  121. package/api-docs/scripts/search.js +0 -39
  122. package/api-docs/styles/app.min.css +0 -1
  123. package/api-docs/styles/iframe.css +0 -13
  124. package/api-docs/styles/prettify-jsdoc.css +0 -111
  125. package/api-docs/styles/prettify-tomorrow.css +0 -132
  126. package/api-docs/styles/reset.css +0 -44
  127. package/api-docs/styles.css +0 -113
  128. package/api-docs/tutorial-Architecture.html +0 -151
  129. package/api-docs/tutorial-Build.html +0 -150
  130. package/api-docs/tutorial-CI-CD.html +0 -154
  131. package/api-docs/tutorial-Development.html +0 -227
  132. package/api-docs/types_aws_index.ts.html +0 -665
  133. package/api-docs/utils_aws_index.ts.html +0 -192
  134. package/api-docs/utils_index.ts.html +0 -227
  135. package/app/api-destined-function/node_modules/uuid/dist/bin/uuid +0 -2
  136. package/app/api-destined-function/node_modules/uuid/dist/esm-browser/index.js +0 -9
  137. package/app/api-destined-function/node_modules/uuid/dist/esm-browser/md5.js +0 -215
  138. package/app/api-destined-function/node_modules/uuid/dist/esm-browser/nil.js +0 -1
  139. package/app/api-destined-function/node_modules/uuid/dist/esm-browser/parse.js +0 -35
  140. package/app/api-destined-function/node_modules/uuid/dist/esm-browser/regex.js +0 -1
  141. package/app/api-destined-function/node_modules/uuid/dist/esm-browser/rng.js +0 -19
  142. package/app/api-destined-function/node_modules/uuid/dist/esm-browser/sha1.js +0 -96
  143. package/app/api-destined-function/node_modules/uuid/dist/esm-browser/stringify.js +0 -30
  144. package/app/api-destined-function/node_modules/uuid/dist/esm-browser/v1.js +0 -95
  145. package/app/api-destined-function/node_modules/uuid/dist/esm-browser/v3.js +0 -4
  146. package/app/api-destined-function/node_modules/uuid/dist/esm-browser/v35.js +0 -64
  147. package/app/api-destined-function/node_modules/uuid/dist/esm-browser/v4.js +0 -24
  148. package/app/api-destined-function/node_modules/uuid/dist/esm-browser/v5.js +0 -4
  149. package/app/api-destined-function/node_modules/uuid/dist/esm-browser/validate.js +0 -7
  150. package/app/api-destined-function/node_modules/uuid/dist/esm-browser/version.js +0 -11
  151. package/app/api-destined-function/node_modules/uuid/dist/esm-node/index.js +0 -9
  152. package/app/api-destined-function/node_modules/uuid/dist/esm-node/md5.js +0 -13
  153. package/app/api-destined-function/node_modules/uuid/dist/esm-node/nil.js +0 -1
  154. package/app/api-destined-function/node_modules/uuid/dist/esm-node/parse.js +0 -35
  155. package/app/api-destined-function/node_modules/uuid/dist/esm-node/regex.js +0 -1
  156. package/app/api-destined-function/node_modules/uuid/dist/esm-node/rng.js +0 -12
  157. package/app/api-destined-function/node_modules/uuid/dist/esm-node/sha1.js +0 -13
  158. package/app/api-destined-function/node_modules/uuid/dist/esm-node/stringify.js +0 -29
  159. package/app/api-destined-function/node_modules/uuid/dist/esm-node/v1.js +0 -95
  160. package/app/api-destined-function/node_modules/uuid/dist/esm-node/v3.js +0 -4
  161. package/app/api-destined-function/node_modules/uuid/dist/esm-node/v35.js +0 -64
  162. package/app/api-destined-function/node_modules/uuid/dist/esm-node/v4.js +0 -24
  163. package/app/api-destined-function/node_modules/uuid/dist/esm-node/v5.js +0 -4
  164. package/app/api-destined-function/node_modules/uuid/dist/esm-node/validate.js +0 -7
  165. package/app/api-destined-function/node_modules/uuid/dist/esm-node/version.js +0 -11
  166. package/app/api-destined-function/node_modules/uuid/dist/index.js +0 -79
  167. package/app/api-destined-function/node_modules/uuid/dist/md5-browser.js +0 -223
  168. package/app/api-destined-function/node_modules/uuid/dist/md5.js +0 -23
  169. package/app/api-destined-function/node_modules/uuid/dist/nil.js +0 -8
  170. package/app/api-destined-function/node_modules/uuid/dist/parse.js +0 -45
  171. package/app/api-destined-function/node_modules/uuid/dist/regex.js +0 -8
  172. package/app/api-destined-function/node_modules/uuid/dist/rng-browser.js +0 -26
  173. package/app/api-destined-function/node_modules/uuid/dist/rng.js +0 -24
  174. package/app/api-destined-function/node_modules/uuid/dist/sha1-browser.js +0 -104
  175. package/app/api-destined-function/node_modules/uuid/dist/sha1.js +0 -23
  176. package/app/api-destined-function/node_modules/uuid/dist/stringify.js +0 -39
  177. package/app/api-destined-function/node_modules/uuid/dist/umd/uuid.min.js +0 -1
  178. package/app/api-destined-function/node_modules/uuid/dist/umd/uuidNIL.min.js +0 -1
  179. package/app/api-destined-function/node_modules/uuid/dist/umd/uuidParse.min.js +0 -1
  180. package/app/api-destined-function/node_modules/uuid/dist/umd/uuidStringify.min.js +0 -1
  181. package/app/api-destined-function/node_modules/uuid/dist/umd/uuidValidate.min.js +0 -1
  182. package/app/api-destined-function/node_modules/uuid/dist/umd/uuidVersion.min.js +0 -1
  183. package/app/api-destined-function/node_modules/uuid/dist/umd/uuidv1.min.js +0 -1
  184. package/app/api-destined-function/node_modules/uuid/dist/umd/uuidv3.min.js +0 -1
  185. package/app/api-destined-function/node_modules/uuid/dist/umd/uuidv4.min.js +0 -1
  186. package/app/api-destined-function/node_modules/uuid/dist/umd/uuidv5.min.js +0 -1
  187. package/app/api-destined-function/node_modules/uuid/dist/uuid-bin.js +0 -85
  188. package/app/api-destined-function/node_modules/uuid/dist/v1.js +0 -107
  189. package/app/api-destined-function/node_modules/uuid/dist/v3.js +0 -16
  190. package/app/api-destined-function/node_modules/uuid/dist/v35.js +0 -78
  191. package/app/api-destined-function/node_modules/uuid/dist/v4.js +0 -37
  192. package/app/api-destined-function/node_modules/uuid/dist/v5.js +0 -16
  193. package/app/api-destined-function/node_modules/uuid/dist/validate.js +0 -17
  194. package/app/api-destined-function/node_modules/uuid/dist/version.js +0 -21
  195. package/dist/app/api-destined-function/layers/nodejs/node_modules/.bin/uuid +0 -2
  196. package/dist/app/api-destined-function/layers/nodejs/node_modules/.yarn-integrity +0 -109
  197. package/dist/app/api-destined-function/layers/nodejs/node_modules/@types/uuid/LICENSE +0 -21
  198. package/dist/app/api-destined-function/layers/nodejs/node_modules/@types/uuid/README.md +0 -16
  199. package/dist/app/api-destined-function/layers/nodejs/node_modules/@types/uuid/index.d.mts +0 -10
  200. package/dist/app/api-destined-function/layers/nodejs/node_modules/@types/uuid/index.d.ts +0 -80
  201. package/dist/app/api-destined-function/layers/nodejs/node_modules/@types/uuid/package.json +0 -54
  202. package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/LICENSE.md +0 -9
  203. package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/README.md +0 -505
  204. package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/bin/uuid +0 -2
  205. package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/esm-browser/index.js +0 -9
  206. package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/esm-browser/md5.js +0 -215
  207. package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/esm-browser/nil.js +0 -1
  208. package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/esm-browser/parse.js +0 -35
  209. package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/esm-browser/regex.js +0 -1
  210. package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/esm-browser/rng.js +0 -19
  211. package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/esm-browser/sha1.js +0 -96
  212. package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/esm-browser/stringify.js +0 -30
  213. package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/esm-browser/v1.js +0 -95
  214. package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/esm-browser/v3.js +0 -4
  215. package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/esm-browser/v35.js +0 -64
  216. package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/esm-browser/v4.js +0 -24
  217. package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/esm-browser/v5.js +0 -4
  218. package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/esm-browser/validate.js +0 -7
  219. package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/esm-browser/version.js +0 -11
  220. package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/esm-node/index.js +0 -9
  221. package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/esm-node/md5.js +0 -13
  222. package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/esm-node/nil.js +0 -1
  223. package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/esm-node/parse.js +0 -35
  224. package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/esm-node/regex.js +0 -1
  225. package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/esm-node/rng.js +0 -12
  226. package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/esm-node/sha1.js +0 -13
  227. package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/esm-node/stringify.js +0 -29
  228. package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/esm-node/v1.js +0 -95
  229. package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/esm-node/v3.js +0 -4
  230. package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/esm-node/v35.js +0 -64
  231. package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/esm-node/v4.js +0 -24
  232. package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/esm-node/v5.js +0 -4
  233. package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/esm-node/validate.js +0 -7
  234. package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/esm-node/version.js +0 -11
  235. package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/index.js +0 -79
  236. package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/md5-browser.js +0 -223
  237. package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/md5.js +0 -23
  238. package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/nil.js +0 -8
  239. package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/parse.js +0 -45
  240. package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/regex.js +0 -8
  241. package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/rng-browser.js +0 -26
  242. package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/rng.js +0 -24
  243. package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/sha1-browser.js +0 -104
  244. package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/sha1.js +0 -23
  245. package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/stringify.js +0 -39
  246. package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/umd/uuid.min.js +0 -1
  247. package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/umd/uuidNIL.min.js +0 -1
  248. package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/umd/uuidParse.min.js +0 -1
  249. package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/umd/uuidStringify.min.js +0 -1
  250. package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/umd/uuidValidate.min.js +0 -1
  251. package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/umd/uuidVersion.min.js +0 -1
  252. package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/umd/uuidv1.min.js +0 -1
  253. package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/umd/uuidv3.min.js +0 -1
  254. package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/umd/uuidv4.min.js +0 -1
  255. package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/umd/uuidv5.min.js +0 -1
  256. package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/uuid-bin.js +0 -85
  257. package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/v1.js +0 -107
  258. package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/v3.js +0 -16
  259. package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/v35.js +0 -78
  260. package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/v4.js +0 -37
  261. package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/v5.js +0 -16
  262. package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/validate.js +0 -17
  263. package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/version.js +0 -21
  264. package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/package.json +0 -135
  265. package/dist/app/api-destined-function/layers/nodejs/node_modules/uuid/wrapper.mjs +0 -10
  266. package/dist/app/api-destined-function/layers/nodejs/package.json +0 -30
  267. package/dist/app/api-destined-function/src/lib/lambda.d.ts +0 -19
  268. package/dist/app/api-destined-function/src/lib/lambda.d.ts.map +0 -1
  269. package/dist/app/api-destined-function/src/lib/lambda.js +0 -34
  270. package/dist/app/api-destined-function/src/lib/lambda.js.map +0 -1
  271. package/dist/index.d.ts +0 -6
  272. package/dist/index.d.ts.map +0 -1
  273. package/dist/index.js.map +0 -1
  274. package/dist/src/lib/common/construct.d.ts +0 -80
  275. package/dist/src/lib/common/construct.d.ts.map +0 -1
  276. package/dist/src/lib/common/construct.js +0 -134
  277. package/dist/src/lib/common/construct.js.map +0 -1
  278. package/dist/src/lib/common/index.d.ts +0 -3
  279. package/dist/src/lib/common/index.d.ts.map +0 -1
  280. package/dist/src/lib/common/index.js +0 -15
  281. package/dist/src/lib/common/index.js.map +0 -1
  282. package/dist/src/lib/common/stack.d.ts +0 -55
  283. package/dist/src/lib/common/stack.d.ts.map +0 -1
  284. package/dist/src/lib/common/stack.js +0 -148
  285. package/dist/src/lib/common/stack.js.map +0 -1
  286. package/dist/src/lib/construct/api-to-eventbridge-target/api-destination-event.d.ts +0 -17
  287. package/dist/src/lib/construct/api-to-eventbridge-target/api-destination-event.d.ts.map +0 -1
  288. package/dist/src/lib/construct/api-to-eventbridge-target/api-destination-event.js +0 -18
  289. package/dist/src/lib/construct/api-to-eventbridge-target/api-destination-event.js.map +0 -1
  290. package/dist/src/lib/construct/api-to-eventbridge-target/api-destined-lambda.d.ts +0 -20
  291. package/dist/src/lib/construct/api-to-eventbridge-target/api-destined-lambda.d.ts.map +0 -1
  292. package/dist/src/lib/construct/api-to-eventbridge-target/api-destined-lambda.js +0 -20
  293. package/dist/src/lib/construct/api-to-eventbridge-target/api-destined-lambda.js.map +0 -1
  294. package/dist/src/lib/construct/api-to-eventbridge-target/api-destined-rest-api.d.ts +0 -36
  295. package/dist/src/lib/construct/api-to-eventbridge-target/api-destined-rest-api.d.ts.map +0 -1
  296. package/dist/src/lib/construct/api-to-eventbridge-target/api-destined-rest-api.js +0 -30
  297. package/dist/src/lib/construct/api-to-eventbridge-target/api-destined-rest-api.js.map +0 -1
  298. package/dist/src/lib/construct/api-to-eventbridge-target/index.d.ts +0 -5
  299. package/dist/src/lib/construct/api-to-eventbridge-target/index.d.ts.map +0 -1
  300. package/dist/src/lib/construct/api-to-eventbridge-target/index.js +0 -17
  301. package/dist/src/lib/construct/api-to-eventbridge-target/index.js.map +0 -1
  302. package/dist/src/lib/construct/api-to-eventbridge-target/main.d.ts +0 -135
  303. package/dist/src/lib/construct/api-to-eventbridge-target/main.d.ts.map +0 -1
  304. package/dist/src/lib/construct/api-to-eventbridge-target/main.js +0 -488
  305. package/dist/src/lib/construct/api-to-eventbridge-target/main.js.map +0 -1
  306. package/dist/src/lib/construct/graphql-api-lambda/index.d.ts +0 -2
  307. package/dist/src/lib/construct/graphql-api-lambda/index.d.ts.map +0 -1
  308. package/dist/src/lib/construct/graphql-api-lambda/index.js +0 -14
  309. package/dist/src/lib/construct/graphql-api-lambda/index.js.map +0 -1
  310. package/dist/src/lib/construct/graphql-api-lambda/main.d.ts +0 -113
  311. package/dist/src/lib/construct/graphql-api-lambda/main.d.ts.map +0 -1
  312. package/dist/src/lib/construct/graphql-api-lambda/main.js +0 -202
  313. package/dist/src/lib/construct/graphql-api-lambda/main.js.map +0 -1
  314. package/dist/src/lib/construct/index.d.ts +0 -5
  315. package/dist/src/lib/construct/index.d.ts.map +0 -1
  316. package/dist/src/lib/construct/index.js +0 -17
  317. package/dist/src/lib/construct/index.js.map +0 -1
  318. package/dist/src/lib/construct/site-with-ecs-backend/index.d.ts +0 -2
  319. package/dist/src/lib/construct/site-with-ecs-backend/index.d.ts.map +0 -1
  320. package/dist/src/lib/construct/site-with-ecs-backend/index.js +0 -14
  321. package/dist/src/lib/construct/site-with-ecs-backend/index.js.map +0 -1
  322. package/dist/src/lib/construct/site-with-ecs-backend/main.d.ts +0 -168
  323. package/dist/src/lib/construct/site-with-ecs-backend/main.d.ts.map +0 -1
  324. package/dist/src/lib/construct/site-with-ecs-backend/main.js +0 -328
  325. package/dist/src/lib/construct/site-with-ecs-backend/main.js.map +0 -1
  326. package/dist/src/lib/construct/static-site/index.d.ts +0 -2
  327. package/dist/src/lib/construct/static-site/index.d.ts.map +0 -1
  328. package/dist/src/lib/construct/static-site/index.js +0 -14
  329. package/dist/src/lib/construct/static-site/index.js.map +0 -1
  330. package/dist/src/lib/construct/static-site/main.d.ts +0 -95
  331. package/dist/src/lib/construct/static-site/main.d.ts.map +0 -1
  332. package/dist/src/lib/construct/static-site/main.js +0 -169
  333. package/dist/src/lib/construct/static-site/main.js.map +0 -1
  334. package/dist/src/lib/manager/aws/acm-manager.d.ts +0 -47
  335. package/dist/src/lib/manager/aws/acm-manager.d.ts.map +0 -1
  336. package/dist/src/lib/manager/aws/acm-manager.js +0 -91
  337. package/dist/src/lib/manager/aws/acm-manager.js.map +0 -1
  338. package/dist/src/lib/manager/aws/api-manager.d.ts +0 -44
  339. package/dist/src/lib/manager/aws/api-manager.d.ts.map +0 -1
  340. package/dist/src/lib/manager/aws/api-manager.js +0 -112
  341. package/dist/src/lib/manager/aws/api-manager.js.map +0 -1
  342. package/dist/src/lib/manager/aws/app-config-manager.d.ts +0 -66
  343. package/dist/src/lib/manager/aws/app-config-manager.d.ts.map +0 -1
  344. package/dist/src/lib/manager/aws/app-config-manager.js +0 -149
  345. package/dist/src/lib/manager/aws/app-config-manager.js.map +0 -1
  346. package/dist/src/lib/manager/aws/cloudfront-manager.d.ts +0 -113
  347. package/dist/src/lib/manager/aws/cloudfront-manager.d.ts.map +0 -1
  348. package/dist/src/lib/manager/aws/cloudfront-manager.js +0 -283
  349. package/dist/src/lib/manager/aws/cloudfront-manager.js.map +0 -1
  350. package/dist/src/lib/manager/aws/cloudtrail-manager.d.ts +0 -49
  351. package/dist/src/lib/manager/aws/cloudtrail-manager.d.ts.map +0 -1
  352. package/dist/src/lib/manager/aws/cloudtrail-manager.js +0 -100
  353. package/dist/src/lib/manager/aws/cloudtrail-manager.js.map +0 -1
  354. package/dist/src/lib/manager/aws/cloudwatch-manager.d.ts +0 -122
  355. package/dist/src/lib/manager/aws/cloudwatch-manager.d.ts.map +0 -1
  356. package/dist/src/lib/manager/aws/cloudwatch-manager.js +0 -353
  357. package/dist/src/lib/manager/aws/cloudwatch-manager.js.map +0 -1
  358. package/dist/src/lib/manager/aws/codebuild-manager.d.ts +0 -41
  359. package/dist/src/lib/manager/aws/codebuild-manager.d.ts.map +0 -1
  360. package/dist/src/lib/manager/aws/codebuild-manager.js +0 -95
  361. package/dist/src/lib/manager/aws/codebuild-manager.js.map +0 -1
  362. package/dist/src/lib/manager/aws/dynamodb-manager.d.ts +0 -33
  363. package/dist/src/lib/manager/aws/dynamodb-manager.d.ts.map +0 -1
  364. package/dist/src/lib/manager/aws/dynamodb-manager.js +0 -80
  365. package/dist/src/lib/manager/aws/dynamodb-manager.js.map +0 -1
  366. package/dist/src/lib/manager/aws/ecr-manager.d.ts +0 -32
  367. package/dist/src/lib/manager/aws/ecr-manager.d.ts.map +0 -1
  368. package/dist/src/lib/manager/aws/ecr-manager.js +0 -61
  369. package/dist/src/lib/manager/aws/ecr-manager.js.map +0 -1
  370. package/dist/src/lib/manager/aws/ecs-manager.d.ts +0 -49
  371. package/dist/src/lib/manager/aws/ecs-manager.d.ts.map +0 -1
  372. package/dist/src/lib/manager/aws/ecs-manager.js +0 -104
  373. package/dist/src/lib/manager/aws/ecs-manager.js.map +0 -1
  374. package/dist/src/lib/manager/aws/eks-manager.d.ts +0 -37
  375. package/dist/src/lib/manager/aws/eks-manager.d.ts.map +0 -1
  376. package/dist/src/lib/manager/aws/eks-manager.js +0 -110
  377. package/dist/src/lib/manager/aws/eks-manager.js.map +0 -1
  378. package/dist/src/lib/manager/aws/event-manager.d.ts +0 -68
  379. package/dist/src/lib/manager/aws/event-manager.d.ts.map +0 -1
  380. package/dist/src/lib/manager/aws/event-manager.js +0 -163
  381. package/dist/src/lib/manager/aws/event-manager.js.map +0 -1
  382. package/dist/src/lib/manager/aws/iam-manager.d.ts +0 -155
  383. package/dist/src/lib/manager/aws/iam-manager.d.ts.map +0 -1
  384. package/dist/src/lib/manager/aws/iam-manager.js +0 -381
  385. package/dist/src/lib/manager/aws/iam-manager.js.map +0 -1
  386. package/dist/src/lib/manager/aws/index.d.ts +0 -23
  387. package/dist/src/lib/manager/aws/index.d.ts.map +0 -1
  388. package/dist/src/lib/manager/aws/index.js +0 -35
  389. package/dist/src/lib/manager/aws/index.js.map +0 -1
  390. package/dist/src/lib/manager/aws/lambda-manager.d.ts +0 -95
  391. package/dist/src/lib/manager/aws/lambda-manager.d.ts.map +0 -1
  392. package/dist/src/lib/manager/aws/lambda-manager.js +0 -197
  393. package/dist/src/lib/manager/aws/lambda-manager.js.map +0 -1
  394. package/dist/src/lib/manager/aws/log-manager.d.ts +0 -52
  395. package/dist/src/lib/manager/aws/log-manager.d.ts.map +0 -1
  396. package/dist/src/lib/manager/aws/log-manager.js +0 -109
  397. package/dist/src/lib/manager/aws/log-manager.js.map +0 -1
  398. package/dist/src/lib/manager/aws/route53-manager.d.ts +0 -69
  399. package/dist/src/lib/manager/aws/route53-manager.d.ts.map +0 -1
  400. package/dist/src/lib/manager/aws/route53-manager.js +0 -159
  401. package/dist/src/lib/manager/aws/route53-manager.js.map +0 -1
  402. package/dist/src/lib/manager/aws/s3-manager.d.ts +0 -74
  403. package/dist/src/lib/manager/aws/s3-manager.d.ts.map +0 -1
  404. package/dist/src/lib/manager/aws/s3-manager.js +0 -203
  405. package/dist/src/lib/manager/aws/s3-manager.js.map +0 -1
  406. package/dist/src/lib/manager/aws/secrets-manager.d.ts +0 -58
  407. package/dist/src/lib/manager/aws/secrets-manager.d.ts.map +0 -1
  408. package/dist/src/lib/manager/aws/secrets-manager.js +0 -117
  409. package/dist/src/lib/manager/aws/secrets-manager.js.map +0 -1
  410. package/dist/src/lib/manager/aws/sns-manager.d.ts +0 -43
  411. package/dist/src/lib/manager/aws/sns-manager.d.ts.map +0 -1
  412. package/dist/src/lib/manager/aws/sns-manager.js +0 -91
  413. package/dist/src/lib/manager/aws/sns-manager.js.map +0 -1
  414. package/dist/src/lib/manager/aws/ssm-manager.d.ts +0 -61
  415. package/dist/src/lib/manager/aws/ssm-manager.d.ts.map +0 -1
  416. package/dist/src/lib/manager/aws/ssm-manager.js +0 -125
  417. package/dist/src/lib/manager/aws/ssm-manager.js.map +0 -1
  418. package/dist/src/lib/manager/aws/vpc-manager.d.ts +0 -46
  419. package/dist/src/lib/manager/aws/vpc-manager.d.ts.map +0 -1
  420. package/dist/src/lib/manager/aws/vpc-manager.js +0 -95
  421. package/dist/src/lib/manager/aws/vpc-manager.js.map +0 -1
  422. package/dist/src/lib/manager/aws/waf-manager.d.ts +0 -40
  423. package/dist/src/lib/manager/aws/waf-manager.d.ts.map +0 -1
  424. package/dist/src/lib/manager/aws/waf-manager.js +0 -90
  425. package/dist/src/lib/manager/aws/waf-manager.js.map +0 -1
  426. package/dist/src/lib/manager/index.d.ts +0 -2
  427. package/dist/src/lib/manager/index.d.ts.map +0 -1
  428. package/dist/src/lib/manager/index.js +0 -14
  429. package/dist/src/lib/manager/index.js.map +0 -1
  430. package/dist/src/lib/types/aws/index.d.ts +0 -480
  431. package/dist/src/lib/types/aws/index.d.ts.map +0 -1
  432. package/dist/src/lib/types/aws/index.js +0 -3
  433. package/dist/src/lib/types/aws/index.js.map +0 -1
  434. package/dist/src/lib/types/index.d.ts +0 -2
  435. package/dist/src/lib/types/index.d.ts.map +0 -1
  436. package/dist/src/lib/types/index.js +0 -14
  437. package/dist/src/lib/types/index.js.map +0 -1
  438. package/dist/src/lib/utils/aws/index.d.ts +0 -16
  439. package/dist/src/lib/utils/aws/index.d.ts.map +0 -1
  440. package/dist/src/lib/utils/aws/index.js +0 -50
  441. package/dist/src/lib/utils/aws/index.js.map +0 -1
  442. package/dist/src/lib/utils/index.d.ts +0 -63
  443. package/dist/src/lib/utils/index.d.ts.map +0 -1
  444. package/dist/src/lib/utils/index.js +0 -85
  445. package/dist/src/lib/utils/index.js.map +0 -1
  446. package/img/ApiToEventBridgeTarget.jpg +0 -0
  447. package/img/GraphQLApiLambda.jpg +0 -0
  448. package/img/logo.png +0 -0
  449. package/theme/styles.css +0 -113
@@ -1,159 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
5
- }) : (function(o, m, k, k2) {
6
- if (k2 === undefined) k2 = k;
7
- o[k2] = m[k];
8
- }));
9
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
10
- Object.defineProperty(o, "default", { enumerable: true, value: v });
11
- }) : function(o, v) {
12
- o["default"] = v;
13
- });
14
- var __importStar = (this && this.__importStar) || function (mod) {
15
- if (mod && mod.__esModule) return mod;
16
- var result = {};
17
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
18
- __setModuleDefault(result, mod);
19
- return result;
20
- };
21
- Object.defineProperty(exports, "__esModule", { value: true });
22
- exports.Route53Manager = void 0;
23
- const route53 = __importStar(require("aws-cdk-lib/aws-route53"));
24
- const route53Targets = __importStar(require("aws-cdk-lib/aws-route53-targets"));
25
- const utils = __importStar(require("../../utils"));
26
- /**
27
- * @stability stable
28
- * @category cdk-utils.route53-manager
29
- * @subcategory Construct
30
- * @classdesc Provides operations on AWS Route53.
31
- * - A new instance of this class is injected into {@link common.CommonConstruct} constructor.
32
- * - If a custom construct extends {@link common.CommonConstruct}, an instance is available within the context.
33
- * @example
34
- * import * as common from '@gradientedge/cdk-utils'
35
- *
36
- * class CustomConstruct extends common.common.CommonConstruct {
37
- * constructor(parent: cdk.Construct, id: string, props: common.CommonStackProps) {
38
- * super(parent, id, props)
39
- * this.props = props
40
- * this.route53Manager.createHostedZone('MyHostedZone', this)
41
- * }
42
- * }
43
- *
44
- * @see [CDK Route53 Module]{@link https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_route53-readme.html}
45
- */
46
- class Route53Manager {
47
- /**
48
- * @summary Method to create a hosted zone
49
- * @param {string} id scoped id of the resource
50
- * @param {common.CommonConstruct} scope scope in which this resource is defined
51
- * @param {types.Route53Props} props
52
- */
53
- createHostedZone(id, scope, props) {
54
- let hostedZone;
55
- if (!props)
56
- throw `Route53 props undefined`;
57
- if (props.useExistingHostedZone) {
58
- hostedZone = route53.HostedZone.fromLookup(scope, `${id}`, {
59
- domainName: scope.props.domainName,
60
- });
61
- }
62
- else {
63
- hostedZone = new route53.HostedZone(scope, `${id}`, {
64
- zoneName: scope.props.domainName,
65
- comment: `Hosted zone for ${scope.props.domainName}`,
66
- });
67
- }
68
- utils.createCfnOutput(`${id}-hostedZoneId`, scope, hostedZone.hostedZoneId);
69
- utils.createCfnOutput(`${id}-hostedZoneArn`, scope, hostedZone.hostedZoneArn);
70
- return hostedZone;
71
- }
72
- /**
73
- * @summary Method to create/lookup a hosted zone
74
- * @param {string} id scoped id of the resource
75
- * @param {common.CommonConstruct} scope scope in which this resource is defined
76
- * @param useExistingHostedZone Flag to indicate whether to lookup vs create new hosted zone
77
- */
78
- withHostedZoneFromFullyQualifiedDomainName(id, scope, useExistingHostedZone) {
79
- let hostedZone;
80
- if (useExistingHostedZone) {
81
- hostedZone = route53.HostedZone.fromLookup(scope, `${id}`, {
82
- domainName: scope.fullyQualifiedDomainName,
83
- });
84
- }
85
- else {
86
- hostedZone = new route53.HostedZone(scope, `${id}`, {
87
- zoneName: scope.fullyQualifiedDomainName,
88
- comment: `Hosted zone for ${scope.fullyQualifiedDomainName}`,
89
- });
90
- }
91
- utils.createCfnOutput(`${id}-hostedZoneId`, scope, hostedZone.hostedZoneId);
92
- utils.createCfnOutput(`${id}-hostedZoneArn`, scope, hostedZone.hostedZoneArn);
93
- return hostedZone;
94
- }
95
- /**
96
- * @summary Method to create a-record for cloudfront target
97
- * @param {string} id scoped id of the resource
98
- * @param {common.CommonConstruct} scope scope in which this resource is defined
99
- * @param {cloudfront.IDistribution} distribution
100
- * @param {route53.IHostedZone} hostedZone
101
- * @param {string} recordName
102
- */
103
- createCloudFrontTargetARecord(id, scope, distribution, hostedZone, recordName) {
104
- if (!distribution)
105
- throw `Distribution undefined`;
106
- if (!hostedZone)
107
- throw `HostedZone undefined`;
108
- const aRecord = new route53.ARecord(scope, `${id}`, {
109
- recordName: recordName && scope.isProductionStage() ? `${recordName}` : `${recordName}-${scope.props.stage}`,
110
- target: route53.RecordTarget.fromAlias(new route53Targets.CloudFrontTarget(distribution)),
111
- zone: hostedZone,
112
- });
113
- utils.createCfnOutput(`${id}-aRecordDomainName`, scope, aRecord.domainName);
114
- return aRecord;
115
- }
116
- /**
117
- * @summary Method to create a-record for cloudfront target
118
- * @param {string} id scoped id of the resource
119
- * @param {common.CommonConstruct} scope scope in which this resource is defined
120
- * @param {cloudfront.IDistribution} distribution
121
- * @param {route53.IHostedZone} hostedZone
122
- * @param {string} recordName
123
- */
124
- createCloudFrontTargetARecordV2(id, scope, distribution, hostedZone, recordName) {
125
- if (!distribution)
126
- throw `Distribution undefined`;
127
- if (!hostedZone)
128
- throw `HostedZone undefined`;
129
- const aRecord = new route53.ARecord(scope, `${id}`, {
130
- recordName: recordName,
131
- target: route53.RecordTarget.fromAlias(new route53Targets.CloudFrontTarget(distribution)),
132
- zone: hostedZone,
133
- });
134
- utils.createCfnOutput(`${id}-aRecordDomainName`, scope, aRecord.domainName);
135
- return aRecord;
136
- }
137
- /**
138
- * @summary Method to create a-record for restApi gateway target
139
- * @param {string} id scoped id of the resource
140
- * @param {common.CommonConstruct} scope scope in which this resource is defined
141
- * @param recordName
142
- * @param apiDomain
143
- * @param hostedZone
144
- */
145
- createApiGatewayARecord(id, scope, recordName, apiDomain, hostedZone) {
146
- let apiRecordName = '';
147
- if (recordName && recordName !== '')
148
- apiRecordName = scope.isProductionStage() ? `${recordName}` : `${recordName}-${scope.props.stage}`;
149
- const apiARecord = new route53.ARecord(scope, `${id}`, {
150
- recordName: apiRecordName,
151
- target: route53.RecordTarget.fromAlias(new route53Targets.ApiGatewayDomain(apiDomain)),
152
- zone: hostedZone,
153
- });
154
- utils.createCfnOutput(`${id}-a-record-domain-name`, scope, apiARecord.domainName);
155
- return apiARecord;
156
- }
157
- }
158
- exports.Route53Manager = Route53Manager;
159
- //# sourceMappingURL=route53-manager.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"route53-manager.js","sourceRoot":"","sources":["../../../../../src/lib/manager/aws/route53-manager.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAEA,iEAAkD;AAClD,gFAAiE;AAGjE,mDAAoC;AAEpC;;;;;;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-cdk-lib';
2
- import * as cloudfront from 'aws-cdk-lib/aws-cloudfront';
3
- import * as s3 from 'aws-cdk-lib/aws-s3';
4
- import * as s3deploy from 'aws-cdk-lib/aws-s3-deployment';
5
- import * as common from '../../common';
6
- import * as types from '../../types';
7
- /**
8
- * @stability stable
9
- * @category cdk-utils.s3-manager
10
- * @subcategory Construct
11
- * @classdesc Provides operations on AWS S3.
12
- * - A new instance of this class is injected into {@link common.CommonConstruct} constructor.
13
- * - If a custom construct extends {@link common.CommonConstruct}, an instance is available within the context.
14
- * @example
15
- * import * as common from '@gradientedge/cdk-utils'
16
- *
17
- * class CustomConstruct extends common.common.CommonConstruct {
18
- * constructor(parent: cdk.Construct, id: string, props: common.CommonStackProps) {
19
- * super(parent, id, props)
20
- * this.props = props
21
- * this.s3Manager.createS3Bucket('MyBucket', this)
22
- * }
23
- * }
24
- *
25
- * @see [CDK S3 Module]{@link https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_s3-readme.html}
26
- */
27
- export declare class S3Manager {
28
- /**
29
- * @summary Method to determine S3 Bucket lifecycle properties
30
- * @param {types.S3BucketProps} props bucket properties
31
- * @private
32
- */
33
- protected determineBucketLifecycleRules(props: types.S3BucketProps): types.LifecycleRule[] | undefined;
34
- /**
35
- * @summary Method to determine the bucket name
36
- * @param {common.CommonConstruct} scope scope in which this resource is defined
37
- * @param {types.S3BucketProps} props bucket properties
38
- * @private
39
- */
40
- protected static determineBucketName(scope: common.CommonConstruct, props: types.S3BucketProps): string;
41
- /**
42
- * @summary Method to determine the log bucket name
43
- * @param {common.CommonConstruct} scope scope in which this resource is defined
44
- * @param {types.S3BucketProps} props bucket properties
45
- * @private
46
- */
47
- protected static determineLogBucketName(scope: common.CommonConstruct, props: types.S3BucketProps): string;
48
- /**
49
- * @summary Method to create a s3 bucket
50
- * @param {string} id scoped id of the resource
51
- * @param {common.CommonConstruct} scope scope in which this resource is defined
52
- * @param {types.S3BucketProps} props bucket properties
53
- */
54
- createS3Bucket(id: string, scope: common.CommonConstruct, props: types.S3BucketProps): cdk.aws_s3.IBucket;
55
- /**
56
- * @summary Method to create an iam bucket policy for cloudtrail
57
- * @param {string} id scoped id of the resource
58
- * @param {common.CommonConstruct} scope scope in which this resource is defined
59
- * @param {s3.IBucket} bucket
60
- */
61
- createBucketPolicyForCloudTrail(id: string, scope: common.CommonConstruct, bucket: s3.IBucket): cdk.aws_s3.CfnBucketPolicy;
62
- /**
63
- * @summary Method to create a s3 bucket deployment
64
- * @param {string} id scoped id of the resource
65
- * @param {common.CommonConstruct} scope scope in which this resource is defined
66
- * @param {s3.IBucket} siteBucket
67
- * @param {cloudfront.IDistribution} distribution
68
- * @param {s3deploy.ISource[]} sources
69
- * @param {string} prefix
70
- * @param {boolean} prune
71
- */
72
- doBucketDeployment(id: string, scope: common.CommonConstruct, siteBucket: s3.IBucket, distribution: cloudfront.IDistribution, sources: s3deploy.ISource[], prefix: string, prune?: boolean): void;
73
- }
74
- //# sourceMappingURL=s3-manager.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"s3-manager.d.ts","sourceRoot":"","sources":["../../../../../src/lib/manager/aws/s3-manager.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,GAAG,MAAM,aAAa,CAAA;AAClC,OAAO,KAAK,UAAU,MAAM,4BAA4B,CAAA;AAExD,OAAO,KAAK,EAAE,MAAM,oBAAoB,CAAA;AACxC,OAAO,KAAK,QAAQ,MAAM,+BAA+B,CAAA;AACzD,OAAO,KAAK,MAAM,MAAM,cAAc,CAAA;AACtC,OAAO,KAAK,KAAK,MAAM,aAAa,CAAA;AAGpC;;;;;;;;;;;;;;;;;;;GAmBG;AACH,qBAAa,SAAS;IACpB;;;;OAIG;IACH,SAAS,CAAC,6BAA6B,CAAC,KAAK,EAAE,KAAK,CAAC,aAAa;IAyBlE;;;;;OAKG;IACH,SAAS,CAAC,MAAM,CAAC,mBAAmB,CAAC,KAAK,EAAE,MAAM,CAAC,eAAe,EAAE,KAAK,EAAE,KAAK,CAAC,aAAa;IAM9F;;;;;OAKG;IACH,SAAS,CAAC,MAAM,CAAC,sBAAsB,CAAC,KAAK,EAAE,MAAM,CAAC,eAAe,EAAE,KAAK,EAAE,KAAK,CAAC,aAAa;IAMjG;;;;;OAKG;IACI,cAAc,CAAC,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,CAAC,eAAe,EAAE,KAAK,EAAE,KAAK,CAAC,aAAa;IAkD3F;;;;;OAKG;IACI,+BAA+B,CAAC,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,CAAC,eAAe,EAAE,MAAM,EAAE,EAAE,CAAC,OAAO;IA0BpG;;;;;;;;;OASG;IACI,kBAAkB,CACvB,EAAE,EAAE,MAAM,EACV,KAAK,EAAE,MAAM,CAAC,eAAe,EAC7B,UAAU,EAAE,EAAE,CAAC,OAAO,EACtB,YAAY,EAAE,UAAU,CAAC,aAAa,EACtC,OAAO,EAAE,QAAQ,CAAC,OAAO,EAAE,EAC3B,MAAM,EAAE,MAAM,EACd,KAAK,CAAC,EAAE,OAAO;CAalB"}
@@ -1,203 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
5
- }) : (function(o, m, k, k2) {
6
- if (k2 === undefined) k2 = k;
7
- o[k2] = m[k];
8
- }));
9
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
10
- Object.defineProperty(o, "default", { enumerable: true, value: v });
11
- }) : function(o, v) {
12
- o["default"] = v;
13
- });
14
- var __importStar = (this && this.__importStar) || function (mod) {
15
- if (mod && mod.__esModule) return mod;
16
- var result = {};
17
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
18
- __setModuleDefault(result, mod);
19
- return result;
20
- };
21
- Object.defineProperty(exports, "__esModule", { value: true });
22
- exports.S3Manager = void 0;
23
- const cdk = __importStar(require("aws-cdk-lib"));
24
- const iam = __importStar(require("aws-cdk-lib/aws-iam"));
25
- const s3 = __importStar(require("aws-cdk-lib/aws-s3"));
26
- const s3deploy = __importStar(require("aws-cdk-lib/aws-s3-deployment"));
27
- const utils = __importStar(require("../../utils"));
28
- /**
29
- * @stability stable
30
- * @category cdk-utils.s3-manager
31
- * @subcategory Construct
32
- * @classdesc Provides operations on AWS S3.
33
- * - A new instance of this class is injected into {@link common.CommonConstruct} constructor.
34
- * - If a custom construct extends {@link common.CommonConstruct}, an instance is available within the context.
35
- * @example
36
- * import * as common from '@gradientedge/cdk-utils'
37
- *
38
- * class CustomConstruct extends common.common.CommonConstruct {
39
- * constructor(parent: cdk.Construct, id: string, props: common.CommonStackProps) {
40
- * super(parent, id, props)
41
- * this.props = props
42
- * this.s3Manager.createS3Bucket('MyBucket', this)
43
- * }
44
- * }
45
- *
46
- * @see [CDK S3 Module]{@link https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_s3-readme.html}
47
- */
48
- class S3Manager {
49
- /**
50
- * @summary Method to determine S3 Bucket lifecycle properties
51
- * @param {types.S3BucketProps} props bucket properties
52
- * @private
53
- */
54
- determineBucketLifecycleRules(props) {
55
- if (!props.lifecycleRules)
56
- return undefined;
57
- const bucketLifecycleRules = [];
58
- props.lifecycleRules.forEach(lifecycleRule => {
59
- bucketLifecycleRules.push({
60
- id: lifecycleRule.id,
61
- enabled: lifecycleRule.enabled,
62
- abortIncompleteMultipartUploadAfter: lifecycleRule.abortIncompleteMultipartUploadAfter,
63
- expirationDate: lifecycleRule.expirationDate,
64
- expiration: lifecycleRule.expirationInDays ? cdk.Duration.days(lifecycleRule.expirationInDays) : undefined,
65
- noncurrentVersionExpiration: lifecycleRule.noncurrentVersionExpirationInDays
66
- ? cdk.Duration.days(lifecycleRule.noncurrentVersionExpirationInDays)
67
- : undefined,
68
- noncurrentVersionTransitions: lifecycleRule.noncurrentVersionTransitions,
69
- transitions: lifecycleRule.transitions,
70
- prefix: lifecycleRule.prefix,
71
- tagFilters: lifecycleRule.tagFilters,
72
- expiredObjectDeleteMarker: lifecycleRule.expiredObjectDeleteMarker,
73
- });
74
- });
75
- return bucketLifecycleRules;
76
- }
77
- /**
78
- * @summary Method to determine the bucket name
79
- * @param {common.CommonConstruct} scope scope in which this resource is defined
80
- * @param {types.S3BucketProps} props bucket properties
81
- * @private
82
- */
83
- static determineBucketName(scope, props) {
84
- return scope.isProductionStage()
85
- ? `${props.bucketName}.${scope.fullyQualifiedDomainName}`
86
- : `${props.bucketName}-${scope.props.stage}.${scope.fullyQualifiedDomainName}`;
87
- }
88
- /**
89
- * @summary Method to determine the log bucket name
90
- * @param {common.CommonConstruct} scope scope in which this resource is defined
91
- * @param {types.S3BucketProps} props bucket properties
92
- * @private
93
- */
94
- static determineLogBucketName(scope, props) {
95
- return scope.isProductionStage()
96
- ? `${props.logBucketName}.${scope.fullyQualifiedDomainName}`
97
- : `${props.logBucketName}-${scope.props.stage}.${scope.fullyQualifiedDomainName}`;
98
- }
99
- /**
100
- * @summary Method to create a s3 bucket
101
- * @param {string} id scoped id of the resource
102
- * @param {common.CommonConstruct} scope scope in which this resource is defined
103
- * @param {types.S3BucketProps} props bucket properties
104
- */
105
- createS3Bucket(id, scope, props) {
106
- if (!props)
107
- throw `S3 props undefined`;
108
- let bucket;
109
- const bucketName = S3Manager.determineBucketName(scope, props);
110
- if (props.existingBucket && props.bucketName) {
111
- bucket = s3.Bucket.fromBucketName(scope, `${id}`, bucketName);
112
- }
113
- else {
114
- let logBucket;
115
- if (props.logBucketName) {
116
- const logBucketName = S3Manager.determineLogBucketName(scope, props);
117
- logBucket = s3.Bucket.fromBucketName(scope, `${id}-logs`, logBucketName);
118
- }
119
- bucket = new s3.Bucket(scope, `${id}-bucket`, {
120
- accessControl: props.accessControl,
121
- autoDeleteObjects: props.autoDeleteObjects,
122
- blockPublicAccess: props.blockPublicAccess || s3.BlockPublicAccess.BLOCK_ALL,
123
- bucketName: bucketName,
124
- cors: props.cors,
125
- encryption: props.encryption || s3.BucketEncryption.S3_MANAGED,
126
- encryptionKey: props.encryptionKey,
127
- lifecycleRules: this.determineBucketLifecycleRules(props),
128
- metrics: props.metrics,
129
- publicReadAccess: props.publicReadAccess,
130
- removalPolicy: props.removalPolicy || cdk.RemovalPolicy.RETAIN,
131
- serverAccessLogsBucket: logBucket,
132
- serverAccessLogsPrefix: props.serverAccessLogsPrefix,
133
- websiteIndexDocument: props.websiteIndexDocument,
134
- websiteErrorDocument: props.websiteErrorDocument,
135
- websiteRoutingRules: props.websiteRoutingRules,
136
- versioned: props.versioned,
137
- });
138
- const cfnBucket = bucket.node.defaultChild;
139
- cfnBucket.notificationConfiguration = {
140
- eventBridgeConfiguration: {
141
- eventBridgeEnabled: props.enableEventBridge ?? false,
142
- },
143
- };
144
- }
145
- utils.createCfnOutput(`${id}-bucketName`, scope, bucket.bucketName);
146
- utils.createCfnOutput(`${id}-bucketArn`, scope, bucket.bucketArn);
147
- return bucket;
148
- }
149
- /**
150
- * @summary Method to create an iam bucket policy for cloudtrail
151
- * @param {string} id scoped id of the resource
152
- * @param {common.CommonConstruct} scope scope in which this resource is defined
153
- * @param {s3.IBucket} bucket
154
- */
155
- createBucketPolicyForCloudTrail(id, scope, bucket) {
156
- const bucketPolicyDocument = new iam.PolicyDocument({
157
- statements: [
158
- new iam.PolicyStatement({
159
- actions: ['s3:GetBucketAcl'],
160
- effect: iam.Effect.ALLOW,
161
- principals: [new iam.ServicePrincipal('cloudtrail.amazonaws.com')],
162
- resources: [bucket.bucketArn],
163
- sid: 'AWSCloudTrailAclCheck20150319',
164
- }),
165
- new iam.PolicyStatement({
166
- actions: ['s3:PutObject'],
167
- effect: iam.Effect.ALLOW,
168
- principals: [new iam.ServicePrincipal('cloudtrail.amazonaws.com')],
169
- resources: [bucket.arnForObjects('*')],
170
- sid: 'AWSCloudTrailWrite20150319',
171
- }),
172
- ],
173
- });
174
- return new s3.CfnBucketPolicy(scope, `${id}`, {
175
- bucket: bucket.bucketName,
176
- policyDocument: bucketPolicyDocument,
177
- });
178
- }
179
- /**
180
- * @summary Method to create a s3 bucket deployment
181
- * @param {string} id scoped id of the resource
182
- * @param {common.CommonConstruct} scope scope in which this resource is defined
183
- * @param {s3.IBucket} siteBucket
184
- * @param {cloudfront.IDistribution} distribution
185
- * @param {s3deploy.ISource[]} sources
186
- * @param {string} prefix
187
- * @param {boolean} prune
188
- */
189
- doBucketDeployment(id, scope, siteBucket, distribution, sources, prefix, prune) {
190
- new s3deploy.BucketDeployment(scope, `${id}`, {
191
- destinationBucket: siteBucket,
192
- destinationKeyPrefix: prefix,
193
- distribution: distribution,
194
- distributionPaths: ['/*'],
195
- memoryLimit: 1024,
196
- prune: !!prune,
197
- serverSideEncryption: s3deploy.ServerSideEncryption.AES_256,
198
- sources: sources,
199
- });
200
- }
201
- }
202
- exports.S3Manager = S3Manager;
203
- //# sourceMappingURL=s3-manager.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"s3-manager.js","sourceRoot":"","sources":["../../../../../src/lib/manager/aws/s3-manager.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA,iDAAkC;AAElC,yDAA0C;AAC1C,uDAAwC;AACxC,wEAAyD;AAGzD,mDAAoC;AAEpC;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAa,SAAS;IACpB;;;;OAIG;IACO,6BAA6B,CAAC,KAA0B;QAChE,IAAI,CAAC,KAAK,CAAC,cAAc;YAAE,OAAO,SAAS,CAAA;QAE3C,MAAM,oBAAoB,GAA0B,EAAE,CAAA;QACtD,KAAK,CAAC,cAAc,CAAC,OAAO,CAAC,aAAa,CAAC,EAAE;YAC3C,oBAAoB,CAAC,IAAI,CAAC;gBACxB,EAAE,EAAE,aAAa,CAAC,EAAE;gBACpB,OAAO,EAAE,aAAa,CAAC,OAAO;gBAC9B,mCAAmC,EAAE,aAAa,CAAC,mCAAm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OAAO,EAAE,CAAC,cAAc,CAAC;oBACzB,MAAM,EAAE,GAAG,CAAC,MAAM,CAAC,KAAK;oBACxB,UAAU,EAAE,CAAC,IAAI,GAAG,CAAC,gBAAgB,CAAC,0BAA0B,CAAC,CAAC;oBAClE,SAAS,EAAE,CAAC,MAAM,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC;oBACtC,GAAG,EAAE,4BAA4B;iBAClC,CAAC;aACH;SACF,CAAC,CAAA;QAEF,OAAO,IAAI,EAAE,CAAC,eAAe,CAAC,KAAK,EAAE,GAAG,EAAE,EAAE,EAAE;YAC5C,MAAM,EAAE,MAAM,CAAC,UAAU;YACzB,cAAc,EAAE,oBAAoB;SACrC,CAAC,CAAA;IACJ,CAAC;IAED;;;;;;;;;OASG;IACI,kBAAkB,CACvB,EAAU,EACV,KAA6B,EAC7B,UAAsB,EACtB,YAAsC,EACtC,OAA2B,EAC3B,MAAc,EACd,KAAe;QAEf,IAAI,QAAQ,CAAC,gBAAgB,CAAC,KAAK,EAAE,GAAG,EAAE,EAAE,EAAE;YAC5C,iBAAiB,EAAE,UAAU;YAC7B,oBAAoB,EAAE,MAAM;YAC5B,YAAY,EAAE,YAAY;YAC1B,iBAAiB,EAAE,CAAC,IAAI,CAAC;YACzB,WAAW,EAAE,IAAI;YACjB,KAAK,EAAE,CAAC,CAAC,KAAK;YACd,oBAAoB,EAAE,QAAQ,CAAC,oBAAoB,CAAC,OAAO;YAC3D,OAAO,EAAE,OAAO;SACjB,CAAC,CAAA;IACJ,CAAC;CACF;AA7KD,8BA6KC"}
@@ -1,58 +0,0 @@
1
- import * as cdk from 'aws-cdk-lib';
2
- import * as common from '../../common';
3
- /**
4
- * @stability experimental
5
- * @category cdk-utils.secrets-manager
6
- * @subcategory Construct
7
- * @classdesc Provides operations on AWS Secrets Manager.
8
- * - A new instance of this class is injected into {@link common.CommonConstruct} constructor.
9
- * - If a custom construct extends {@link common.CommonConstruct}, an instance is available within the context.
10
- * @example
11
- * import * as common from '@gradientedge/cdk-utils'
12
- *
13
- * class CustomConstruct extends common.common.CommonConstruct {
14
- * constructor(parent: cdk.Construct, id: string, props: common.CommonStackProps) {
15
- * super(parent, id, props)
16
- * this.props = props
17
- * this.secretsManager.loadSecret('MySecretName', 'eu-west-1')
18
- * }
19
- * }
20
- *
21
- * @see [CDK Secrets Manager Module]{@link https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_secretsmanager-readme.html}
22
- */
23
- export declare class SecretsManager {
24
- /**
25
- *
26
- * @param {string} region
27
- */
28
- getAwsSecretsManager(region: string): any;
29
- /**
30
- * @stability experimental
31
- * @summary Method to load a secret from secrets manager
32
- * @param {string} secretName
33
- * @param {string} region
34
- */
35
- loadSecret(secretName: string, region: string): Promise<any>;
36
- /**
37
- * @stability experimental
38
- * @summary Method to load secrets from secrets manager
39
- * @param {string} secretNames
40
- * @param {string} region
41
- */
42
- loadSecrets(secretNames: string, region: string): Promise<{}>;
43
- /**
44
- * @stability experimental
45
- * @summary Method to export secrets from secrets manager to a dot env format
46
- */
47
- exportToDotEnv(): void;
48
- /**
49
- * @stability stable
50
- * @summary Method to retrieve a secret from secrets manager with a cloudformation export
51
- * @param id
52
- * @param scope
53
- * @param stackName
54
- * @param exportName
55
- */
56
- retrieveSecretFromSecretsManager(id: string, scope: common.CommonConstruct, stackName: string, exportName: string): cdk.aws_secretsmanager.ISecret;
57
- }
58
- //# sourceMappingURL=secrets-manager.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"secrets-manager.d.ts","sourceRoot":"","sources":["../../../../../src/lib/manager/aws/secrets-manager.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,GAAG,MAAM,aAAa,CAAA;AAElC,OAAO,KAAK,MAAM,MAAM,cAAc,CAAA;AAKtC;;;;;;;;;;;;;;;;;;;GAmBG;AACH,qBAAa,cAAc;IACzB;;;OAGG;IACI,oBAAoB,CAAC,MAAM,EAAE,MAAM;IAI1C;;;;;OAKG;IACU,UAAU,CAAC,UAAU,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM;IAO1D;;;;;OAKG;IACU,WAAW,CAAC,WAAW,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM;IAS5D;;;OAGG;IACI,cAAc;IA2BrB;;;;;;;OAOG;IACI,gCAAgC,CACrC,EAAE,EAAE,MAAM,EACV,KAAK,EAAE,MAAM,CAAC,eAAe,EAC7B,SAAS,EAAE,MAAM,EACjB,UAAU,EAAE,MAAM;CAQrB"}
@@ -1,117 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
5
- }) : (function(o, m, k, k2) {
6
- if (k2 === undefined) k2 = k;
7
- o[k2] = m[k];
8
- }));
9
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
10
- Object.defineProperty(o, "default", { enumerable: true, value: v });
11
- }) : function(o, v) {
12
- o["default"] = v;
13
- });
14
- var __importStar = (this && this.__importStar) || function (mod) {
15
- if (mod && mod.__esModule) return mod;
16
- var result = {};
17
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
18
- __setModuleDefault(result, mod);
19
- return result;
20
- };
21
- Object.defineProperty(exports, "__esModule", { value: true });
22
- exports.SecretsManager = void 0;
23
- const cdk = __importStar(require("aws-cdk-lib"));
24
- const secretsManager = __importStar(require("aws-cdk-lib/aws-secretsmanager"));
25
- const AWS = require('aws-sdk');
26
- const fs = require('fs');
27
- /**
28
- * @stability experimental
29
- * @category cdk-utils.secrets-manager
30
- * @subcategory Construct
31
- * @classdesc Provides operations on AWS Secrets Manager.
32
- * - A new instance of this class is injected into {@link common.CommonConstruct} constructor.
33
- * - If a custom construct extends {@link common.CommonConstruct}, an instance is available within the context.
34
- * @example
35
- * import * as common from '@gradientedge/cdk-utils'
36
- *
37
- * class CustomConstruct extends common.common.CommonConstruct {
38
- * constructor(parent: cdk.Construct, id: string, props: common.CommonStackProps) {
39
- * super(parent, id, props)
40
- * this.props = props
41
- * this.secretsManager.loadSecret('MySecretName', 'eu-west-1')
42
- * }
43
- * }
44
- *
45
- * @see [CDK Secrets Manager Module]{@link https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_secretsmanager-readme.html}
46
- */
47
- class SecretsManager {
48
- /**
49
- *
50
- * @param {string} region
51
- */
52
- getAwsSecretsManager(region) {
53
- return new AWS.SecretsManager({ region: region });
54
- }
55
- /**
56
- * @stability experimental
57
- * @summary Method to load a secret from secrets manager
58
- * @param {string} secretName
59
- * @param {string} region
60
- */
61
- async loadSecret(secretName, region) {
62
- const secretsManager = this.getAwsSecretsManager(region);
63
- const secret = await Promise.all([secretsManager.getSecretValue({ SecretId: secretName }).promise()]);
64
- return secret ? JSON.parse(secret[0].SecretString) : {};
65
- }
66
- /**
67
- * @stability experimental
68
- * @summary Method to load secrets from secrets manager
69
- * @param {string} secretNames
70
- * @param {string} region
71
- */
72
- async loadSecrets(secretNames, region) {
73
- let secrets = {};
74
- for (const secretName of secretNames.split(',')) {
75
- secrets = { ...secrets, ...(await this.loadSecret(secretName, region)) };
76
- }
77
- return secrets;
78
- }
79
- /**
80
- * @stability experimental
81
- * @summary Method to export secrets from secrets manager to a dot env format
82
- */
83
- exportToDotEnv() {
84
- let nconf = require('nconf');
85
- nconf.argv().env();
86
- const appRoot = require('app-root-path');
87
- if (nconf.get('profile')) {
88
- console.log(`Using named aws profile ${nconf.get('profile')}`);
89
- AWS.config.credentials = new AWS.SharedIniFileCredentials({ profile: nconf.get('profile') });
90
- }
91
- const region = nconf.get('region');
92
- AWS.config.update({ region: nconf.get('region') });
93
- const outFileName = nconf.get('out') ? nconf.get('out') : '.env';
94
- this.loadSecret(nconf.get('name'), region).then((secretString) => {
95
- if (nconf.get('overwrite')) {
96
- fs.writeFileSync(`${appRoot.path}/.env`, '');
97
- }
98
- Object.keys(secretString).forEach(function (key) {
99
- console.log(`Adding environment variable for key: ${key}`);
100
- fs.appendFileSync(`${appRoot.path}/${outFileName}`, `${key}=${secretString[key]}\r\n`);
101
- });
102
- });
103
- }
104
- /**
105
- * @stability stable
106
- * @summary Method to retrieve a secret from secrets manager with a cloudformation export
107
- * @param id
108
- * @param scope
109
- * @param stackName
110
- * @param exportName
111
- */
112
- retrieveSecretFromSecretsManager(id, scope, stackName, exportName) {
113
- return secretsManager.Secret.fromSecretNameV2(scope, `${id}`, cdk.Fn.importValue(`${stackName}-${scope.props.stage}-${exportName}`));
114
- }
115
- }
116
- exports.SecretsManager = SecretsManager;
117
- //# sourceMappingURL=secrets-manager.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"secrets-manager.js","sourceRoot":"","sources":["../../../../../src/lib/manager/aws/secrets-manager.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA,iDAAkC;AAClC,+EAAgE;AAGhE,MAAM,GAAG,GAAG,OAAO,CAAC,SAAS,CAAC,CAAA;AAC9B,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;AAExB;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAa,cAAc;IACzB;;;OAGG;IACI,oBAAoB,CAAC,MAAc;QACxC,OAAO,IAAI,GAAG,CAAC,cAAc,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC,CAAA;IACnD,CAAC;IAED;;;;;OAKG;IACI,KAAK,CAAC,UAAU,CAAC,UAAkB,EAAE,MAAc;QACxD,MAAM,cAAc,GAAG,IAAI,CAAC,oBAAoB,CAAC,MAAM,CAAC,CAAA;QACxD,MAAM,MAAM,GAAQ,MAAM,OAAO,CAAC,GAAG,CAAC,CAAC,cAAc,CAAC,cAAc,CAAC,EAAE,QAAQ,EAAE,UAAU,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC,CAAA;QAE1G,OAAO,MAAM,CAAC,CAAC,CAAC,IAAI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