@epilot360/icons 0.0.2 → 0.1.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.
Files changed (479) hide show
  1. package/dist/bundle.js +1 -1
  2. package/dist/bundle.js.map +1 -1
  3. package/index.js.map +1 -1
  4. package/package.json +35 -8
  5. package/react/Close/index.d.ts +4 -0
  6. package/react/Close/index.js +28 -0
  7. package/react/Close/index.js.map +1 -0
  8. package/react/ContentCopy/index.d.ts +4 -0
  9. package/react/ContentCopy/index.js +28 -0
  10. package/react/ContentCopy/index.js.map +1 -0
  11. package/react/DataObject/index.d.ts +4 -0
  12. package/react/DataObject/index.js +28 -0
  13. package/react/DataObject/index.js.map +1 -0
  14. package/react/Edit/index.d.ts +4 -0
  15. package/react/Edit/index.js +28 -0
  16. package/react/Edit/index.js.map +1 -0
  17. package/react/EpilotIcon.d.ts +21 -0
  18. package/react/EpilotIcon.js +41 -0
  19. package/react/EpilotIcon.js.map +1 -0
  20. package/react/OpenInNew/index.d.ts +4 -0
  21. package/react/OpenInNew/index.js +28 -0
  22. package/react/OpenInNew/index.js.map +1 -0
  23. package/react/Share/index.d.ts +4 -0
  24. package/react/Share/index.js +28 -0
  25. package/react/Share/index.js.map +1 -0
  26. package/react/index.d.ts +6 -0
  27. package/react/index.js +6 -0
  28. package/react/index.js.map +1 -1
  29. package/react/types.d.ts +7 -0
  30. package/react/types.js +9 -0
  31. package/react/types.js.map +1 -0
  32. package/src/stories/Readme.mdx +53 -0
  33. package/iac/node_modules/@balena/dockerignore/LICENSE.md +0 -206
  34. package/iac/node_modules/@balena/dockerignore/README.md +0 -261
  35. package/iac/node_modules/@cspotcode/source-map-support/LICENSE.md +0 -21
  36. package/iac/node_modules/@cspotcode/source-map-support/README.md +0 -289
  37. package/iac/node_modules/@jridgewell/resolve-uri/LICENSE +0 -19
  38. package/iac/node_modules/@jridgewell/resolve-uri/README.md +0 -40
  39. package/iac/node_modules/@jridgewell/resolve-uri/dist/resolve-uri.mjs.map +0 -1
  40. package/iac/node_modules/@jridgewell/resolve-uri/dist/resolve-uri.umd.js.map +0 -1
  41. package/iac/node_modules/@jridgewell/sourcemap-codec/LICENSE +0 -21
  42. package/iac/node_modules/@jridgewell/sourcemap-codec/README.md +0 -200
  43. package/iac/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.mjs.map +0 -1
  44. package/iac/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.umd.js.map +0 -1
  45. package/iac/node_modules/@jridgewell/trace-mapping/LICENSE +0 -19
  46. package/iac/node_modules/@jridgewell/trace-mapping/README.md +0 -193
  47. package/iac/node_modules/@jridgewell/trace-mapping/dist/trace-mapping.mjs.map +0 -1
  48. package/iac/node_modules/@jridgewell/trace-mapping/dist/trace-mapping.umd.js.map +0 -1
  49. package/iac/node_modules/@tsconfig/node10/LICENSE +0 -21
  50. package/iac/node_modules/@tsconfig/node10/README.md +0 -40
  51. package/iac/node_modules/@tsconfig/node12/LICENSE +0 -21
  52. package/iac/node_modules/@tsconfig/node12/README.md +0 -40
  53. package/iac/node_modules/@tsconfig/node14/LICENSE +0 -21
  54. package/iac/node_modules/@tsconfig/node14/README.md +0 -40
  55. package/iac/node_modules/@tsconfig/node16/LICENSE +0 -21
  56. package/iac/node_modules/@tsconfig/node16/README.md +0 -40
  57. package/iac/node_modules/@types/jest/LICENSE +0 -21
  58. package/iac/node_modules/@types/jest/README.md +0 -17
  59. package/iac/node_modules/@types/node/LICENSE +0 -21
  60. package/iac/node_modules/@types/node/README.md +0 -16
  61. package/iac/node_modules/@types/prettier/LICENSE +0 -21
  62. package/iac/node_modules/@types/prettier/README.md +0 -16
  63. package/iac/node_modules/acorn/LICENSE +0 -21
  64. package/iac/node_modules/acorn/README.md +0 -273
  65. package/iac/node_modules/acorn-walk/LICENSE +0 -21
  66. package/iac/node_modules/acorn-walk/README.md +0 -126
  67. package/iac/node_modules/ansi-regex/license +0 -9
  68. package/iac/node_modules/ansi-regex/readme.md +0 -78
  69. package/iac/node_modules/ansi-styles/license +0 -9
  70. package/iac/node_modules/ansi-styles/readme.md +0 -144
  71. package/iac/node_modules/arg/LICENSE.md +0 -21
  72. package/iac/node_modules/arg/README.md +0 -280
  73. package/iac/node_modules/at-least-node/LICENSE +0 -6
  74. package/iac/node_modules/at-least-node/README.md +0 -25
  75. package/iac/node_modules/aws-cdk/LICENSE +0 -201
  76. package/iac/node_modules/aws-cdk/README.md +0 -742
  77. package/iac/node_modules/aws-cdk/lib/init-templates/LICENSE +0 -16
  78. package/iac/node_modules/aws-cdk/lib/init-templates/app/csharp/README.md +0 -14
  79. package/iac/node_modules/aws-cdk/lib/init-templates/app/fsharp/README.md +0 -18
  80. package/iac/node_modules/aws-cdk/lib/init-templates/app/go/README.md +0 -12
  81. package/iac/node_modules/aws-cdk/lib/init-templates/app/java/README.md +0 -18
  82. package/iac/node_modules/aws-cdk/lib/init-templates/app/javascript/README.md +0 -12
  83. package/iac/node_modules/aws-cdk/lib/init-templates/app/python/README.template.md +0 -58
  84. package/iac/node_modules/aws-cdk/lib/init-templates/app/typescript/README.md +0 -14
  85. package/iac/node_modules/aws-cdk/lib/init-templates/lib/typescript/README.template.md +0 -12
  86. package/iac/node_modules/aws-cdk/lib/init-templates/sample-app/csharp/README.template.md +0 -19
  87. package/iac/node_modules/aws-cdk/lib/init-templates/sample-app/fsharp/README.template.md +0 -20
  88. package/iac/node_modules/aws-cdk/lib/init-templates/sample-app/go/README.md +0 -12
  89. package/iac/node_modules/aws-cdk/lib/init-templates/sample-app/java/README.template.md +0 -19
  90. package/iac/node_modules/aws-cdk/lib/init-templates/sample-app/javascript/README.template.md +0 -13
  91. package/iac/node_modules/aws-cdk/lib/init-templates/sample-app/python/README.template.md +0 -65
  92. package/iac/node_modules/aws-cdk/lib/init-templates/sample-app/typescript/README.template.md +0 -15
  93. package/iac/node_modules/aws-cdk/test/integ/cli/README.md +0 -48
  94. package/iac/node_modules/aws-cdk/test/integ/cli-regression-patches/README.md +0 -54
  95. package/iac/node_modules/aws-cdk-lib/LICENSE +0 -201
  96. package/iac/node_modules/aws-cdk-lib/README.md +0 -1119
  97. package/iac/node_modules/aws-cdk-lib/alexa-ask/README.md +0 -27
  98. package/iac/node_modules/aws-cdk-lib/assertions/README.md +0 -571
  99. package/iac/node_modules/aws-cdk-lib/assets/README.md +0 -4
  100. package/iac/node_modules/aws-cdk-lib/aws-accessanalyzer/README.md +0 -27
  101. package/iac/node_modules/aws-cdk-lib/aws-acmpca/README.md +0 -59
  102. package/iac/node_modules/aws-cdk-lib/aws-amazonmq/README.md +0 -27
  103. package/iac/node_modules/aws-cdk-lib/aws-amplify/README.md +0 -32
  104. package/iac/node_modules/aws-cdk-lib/aws-amplifyuibuilder/README.md +0 -27
  105. package/iac/node_modules/aws-cdk-lib/aws-apigateway/README.md +0 -1335
  106. package/iac/node_modules/aws-cdk-lib/aws-apigatewayv2/README.md +0 -32
  107. package/iac/node_modules/aws-cdk-lib/aws-appconfig/README.md +0 -27
  108. package/iac/node_modules/aws-cdk-lib/aws-appflow/README.md +0 -27
  109. package/iac/node_modules/aws-cdk-lib/aws-appintegrations/README.md +0 -27
  110. package/iac/node_modules/aws-cdk-lib/aws-applicationautoscaling/README.md +0 -246
  111. package/iac/node_modules/aws-cdk-lib/aws-applicationinsights/README.md +0 -27
  112. package/iac/node_modules/aws-cdk-lib/aws-appmesh/README.md +0 -883
  113. package/iac/node_modules/aws-cdk-lib/aws-apprunner/README.md +0 -32
  114. package/iac/node_modules/aws-cdk-lib/aws-appstream/README.md +0 -27
  115. package/iac/node_modules/aws-cdk-lib/aws-appsync/README.md +0 -32
  116. package/iac/node_modules/aws-cdk-lib/aws-aps/README.md +0 -27
  117. package/iac/node_modules/aws-cdk-lib/aws-athena/README.md +0 -27
  118. package/iac/node_modules/aws-cdk-lib/aws-auditmanager/README.md +0 -27
  119. package/iac/node_modules/aws-cdk-lib/aws-autoscaling/README.md +0 -540
  120. package/iac/node_modules/aws-cdk-lib/aws-autoscaling-common/README.md +0 -8
  121. package/iac/node_modules/aws-cdk-lib/aws-autoscaling-hooktargets/README.md +0 -18
  122. package/iac/node_modules/aws-cdk-lib/aws-autoscalingplans/README.md +0 -27
  123. package/iac/node_modules/aws-cdk-lib/aws-backup/README.md +0 -210
  124. package/iac/node_modules/aws-cdk-lib/aws-batch/README.md +0 -32
  125. package/iac/node_modules/aws-cdk-lib/aws-billingconductor/README.md +0 -27
  126. package/iac/node_modules/aws-cdk-lib/aws-budgets/README.md +0 -27
  127. package/iac/node_modules/aws-cdk-lib/aws-cassandra/README.md +0 -27
  128. package/iac/node_modules/aws-cdk-lib/aws-ce/README.md +0 -27
  129. package/iac/node_modules/aws-cdk-lib/aws-certificatemanager/README.md +0 -166
  130. package/iac/node_modules/aws-cdk-lib/aws-certificatemanager/lambda-packages/dns_validated_certificate_handler/README.md +0 -2
  131. package/iac/node_modules/aws-cdk-lib/aws-certificatemanager/suffixes/README.txt +0 -8
  132. package/iac/node_modules/aws-cdk-lib/aws-chatbot/README.md +0 -44
  133. package/iac/node_modules/aws-cdk-lib/aws-cloud9/README.md +0 -32
  134. package/iac/node_modules/aws-cdk-lib/aws-cloudformation/README.md +0 -4
  135. package/iac/node_modules/aws-cdk-lib/aws-cloudfront/README.md +0 -973
  136. package/iac/node_modules/aws-cdk-lib/aws-cloudfront-origins/README.md +0 -126
  137. package/iac/node_modules/aws-cdk-lib/aws-cloudtrail/README.md +0 -189
  138. package/iac/node_modules/aws-cdk-lib/aws-cloudwatch/README.md +0 -579
  139. package/iac/node_modules/aws-cdk-lib/aws-cloudwatch-actions/README.md +0 -43
  140. package/iac/node_modules/aws-cdk-lib/aws-codeartifact/README.md +0 -27
  141. package/iac/node_modules/aws-cdk-lib/aws-codebuild/README.md +0 -759
  142. package/iac/node_modules/aws-cdk-lib/aws-codecommit/README.md +0 -85
  143. package/iac/node_modules/aws-cdk-lib/aws-codedeploy/README.md +0 -319
  144. package/iac/node_modules/aws-cdk-lib/aws-codeguruprofiler/README.md +0 -37
  145. package/iac/node_modules/aws-cdk-lib/aws-codegurureviewer/README.md +0 -27
  146. package/iac/node_modules/aws-cdk-lib/aws-codepipeline/README.md +0 -481
  147. package/iac/node_modules/aws-cdk-lib/aws-codepipeline-actions/README.md +0 -1203
  148. package/iac/node_modules/aws-cdk-lib/aws-codestar/README.md +0 -32
  149. package/iac/node_modules/aws-cdk-lib/aws-codestarconnections/README.md +0 -27
  150. package/iac/node_modules/aws-cdk-lib/aws-codestarnotifications/README.md +0 -68
  151. package/iac/node_modules/aws-cdk-lib/aws-cognito/README.md +0 -843
  152. package/iac/node_modules/aws-cdk-lib/aws-config/README.md +0 -218
  153. package/iac/node_modules/aws-cdk-lib/aws-connect/README.md +0 -27
  154. package/iac/node_modules/aws-cdk-lib/aws-controltower/README.md +0 -27
  155. package/iac/node_modules/aws-cdk-lib/aws-cur/README.md +0 -27
  156. package/iac/node_modules/aws-cdk-lib/aws-customerprofiles/README.md +0 -27
  157. package/iac/node_modules/aws-cdk-lib/aws-databrew/README.md +0 -27
  158. package/iac/node_modules/aws-cdk-lib/aws-datapipeline/README.md +0 -27
  159. package/iac/node_modules/aws-cdk-lib/aws-datasync/README.md +0 -27
  160. package/iac/node_modules/aws-cdk-lib/aws-dax/README.md +0 -27
  161. package/iac/node_modules/aws-cdk-lib/aws-detective/README.md +0 -27
  162. package/iac/node_modules/aws-cdk-lib/aws-devopsguru/README.md +0 -27
  163. package/iac/node_modules/aws-cdk-lib/aws-directoryservice/README.md +0 -27
  164. package/iac/node_modules/aws-cdk-lib/aws-dlm/README.md +0 -27
  165. package/iac/node_modules/aws-cdk-lib/aws-dms/README.md +0 -27
  166. package/iac/node_modules/aws-cdk-lib/aws-docdb/README.md +0 -153
  167. package/iac/node_modules/aws-cdk-lib/aws-dynamodb/README.md +0 -200
  168. package/iac/node_modules/aws-cdk-lib/aws-ec2/README.md +0 -1514
  169. package/iac/node_modules/aws-cdk-lib/aws-ecr/README.md +0 -110
  170. package/iac/node_modules/aws-cdk-lib/aws-ecr-assets/README.md +0 -167
  171. package/iac/node_modules/aws-cdk-lib/aws-ecs/README.md +0 -1225
  172. package/iac/node_modules/aws-cdk-lib/aws-ecs-patterns/README.md +0 -980
  173. package/iac/node_modules/aws-cdk-lib/aws-efs/README.md +0 -154
  174. package/iac/node_modules/aws-cdk-lib/aws-eks/README.md +0 -1450
  175. package/iac/node_modules/aws-cdk-lib/aws-elasticache/README.md +0 -27
  176. package/iac/node_modules/aws-cdk-lib/aws-elasticbeanstalk/README.md +0 -27
  177. package/iac/node_modules/aws-cdk-lib/aws-elasticloadbalancing/README.md +0 -40
  178. package/iac/node_modules/aws-cdk-lib/aws-elasticloadbalancingv2/README.md +0 -569
  179. package/iac/node_modules/aws-cdk-lib/aws-elasticloadbalancingv2-actions/README.md +0 -68
  180. package/iac/node_modules/aws-cdk-lib/aws-elasticloadbalancingv2-targets/README.md +0 -4
  181. package/iac/node_modules/aws-cdk-lib/aws-elasticsearch/README.md +0 -441
  182. package/iac/node_modules/aws-cdk-lib/aws-emr/README.md +0 -27
  183. package/iac/node_modules/aws-cdk-lib/aws-emrcontainers/README.md +0 -27
  184. package/iac/node_modules/aws-cdk-lib/aws-emrserverless/README.md +0 -27
  185. package/iac/node_modules/aws-cdk-lib/aws-events/README.md +0 -249
  186. package/iac/node_modules/aws-cdk-lib/aws-events-targets/README.md +0 -339
  187. package/iac/node_modules/aws-cdk-lib/aws-eventschemas/README.md +0 -27
  188. package/iac/node_modules/aws-cdk-lib/aws-evidently/README.md +0 -27
  189. package/iac/node_modules/aws-cdk-lib/aws-finspace/README.md +0 -27
  190. package/iac/node_modules/aws-cdk-lib/aws-fis/README.md +0 -27
  191. package/iac/node_modules/aws-cdk-lib/aws-fms/README.md +0 -27
  192. package/iac/node_modules/aws-cdk-lib/aws-forecast/README.md +0 -27
  193. package/iac/node_modules/aws-cdk-lib/aws-frauddetector/README.md +0 -27
  194. package/iac/node_modules/aws-cdk-lib/aws-fsx/README.md +0 -200
  195. package/iac/node_modules/aws-cdk-lib/aws-gamelift/README.md +0 -27
  196. package/iac/node_modules/aws-cdk-lib/aws-globalaccelerator/README.md +0 -182
  197. package/iac/node_modules/aws-cdk-lib/aws-globalaccelerator-endpoints/README.md +0 -10
  198. package/iac/node_modules/aws-cdk-lib/aws-glue/README.md +0 -32
  199. package/iac/node_modules/aws-cdk-lib/aws-greengrass/README.md +0 -27
  200. package/iac/node_modules/aws-cdk-lib/aws-greengrassv2/README.md +0 -27
  201. package/iac/node_modules/aws-cdk-lib/aws-groundstation/README.md +0 -27
  202. package/iac/node_modules/aws-cdk-lib/aws-guardduty/README.md +0 -27
  203. package/iac/node_modules/aws-cdk-lib/aws-healthlake/README.md +0 -27
  204. package/iac/node_modules/aws-cdk-lib/aws-iam/README.md +0 -509
  205. package/iac/node_modules/aws-cdk-lib/aws-imagebuilder/README.md +0 -27
  206. package/iac/node_modules/aws-cdk-lib/aws-inspector/README.md +0 -27
  207. package/iac/node_modules/aws-cdk-lib/aws-inspectorv2/README.md +0 -27
  208. package/iac/node_modules/aws-cdk-lib/aws-iot/README.md +0 -32
  209. package/iac/node_modules/aws-cdk-lib/aws-iot1click/README.md +0 -27
  210. package/iac/node_modules/aws-cdk-lib/aws-iotanalytics/README.md +0 -27
  211. package/iac/node_modules/aws-cdk-lib/aws-iotcoredeviceadvisor/README.md +0 -27
  212. package/iac/node_modules/aws-cdk-lib/aws-iotevents/README.md +0 -32
  213. package/iac/node_modules/aws-cdk-lib/aws-iotfleethub/README.md +0 -27
  214. package/iac/node_modules/aws-cdk-lib/aws-iotsitewise/README.md +0 -27
  215. package/iac/node_modules/aws-cdk-lib/aws-iotthingsgraph/README.md +0 -27
  216. package/iac/node_modules/aws-cdk-lib/aws-iottwinmaker/README.md +0 -27
  217. package/iac/node_modules/aws-cdk-lib/aws-iotwireless/README.md +0 -27
  218. package/iac/node_modules/aws-cdk-lib/aws-ivs/README.md +0 -32
  219. package/iac/node_modules/aws-cdk-lib/aws-kafkaconnect/README.md +0 -27
  220. package/iac/node_modules/aws-cdk-lib/aws-kendra/README.md +0 -27
  221. package/iac/node_modules/aws-cdk-lib/aws-kinesis/README.md +0 -188
  222. package/iac/node_modules/aws-cdk-lib/aws-kinesisanalytics/README.md +0 -27
  223. package/iac/node_modules/aws-cdk-lib/aws-kinesisanalyticsv2/README.md +0 -27
  224. package/iac/node_modules/aws-cdk-lib/aws-kinesisfirehose/README.md +0 -32
  225. package/iac/node_modules/aws-cdk-lib/aws-kinesisvideo/README.md +0 -27
  226. package/iac/node_modules/aws-cdk-lib/aws-kms/README.md +0 -209
  227. package/iac/node_modules/aws-cdk-lib/aws-lakeformation/README.md +0 -27
  228. package/iac/node_modules/aws-cdk-lib/aws-lambda/README.md +0 -985
  229. package/iac/node_modules/aws-cdk-lib/aws-lambda-destinations/README.md +0 -147
  230. package/iac/node_modules/aws-cdk-lib/aws-lambda-event-sources/README.md +0 -281
  231. package/iac/node_modules/aws-cdk-lib/aws-lambda-nodejs/README.md +0 -317
  232. package/iac/node_modules/aws-cdk-lib/aws-lex/README.md +0 -27
  233. package/iac/node_modules/aws-cdk-lib/aws-licensemanager/README.md +0 -27
  234. package/iac/node_modules/aws-cdk-lib/aws-lightsail/README.md +0 -27
  235. package/iac/node_modules/aws-cdk-lib/aws-location/README.md +0 -27
  236. package/iac/node_modules/aws-cdk-lib/aws-logs/README.md +0 -322
  237. package/iac/node_modules/aws-cdk-lib/aws-logs-destinations/README.md +0 -7
  238. package/iac/node_modules/aws-cdk-lib/aws-lookoutequipment/README.md +0 -27
  239. package/iac/node_modules/aws-cdk-lib/aws-lookoutmetrics/README.md +0 -27
  240. package/iac/node_modules/aws-cdk-lib/aws-lookoutvision/README.md +0 -27
  241. package/iac/node_modules/aws-cdk-lib/aws-m2/README.md +0 -27
  242. package/iac/node_modules/aws-cdk-lib/aws-macie/README.md +0 -27
  243. package/iac/node_modules/aws-cdk-lib/aws-managedblockchain/README.md +0 -27
  244. package/iac/node_modules/aws-cdk-lib/aws-mediaconnect/README.md +0 -27
  245. package/iac/node_modules/aws-cdk-lib/aws-mediaconvert/README.md +0 -27
  246. package/iac/node_modules/aws-cdk-lib/aws-medialive/README.md +0 -27
  247. package/iac/node_modules/aws-cdk-lib/aws-mediapackage/README.md +0 -27
  248. package/iac/node_modules/aws-cdk-lib/aws-mediastore/README.md +0 -27
  249. package/iac/node_modules/aws-cdk-lib/aws-mediatailor/README.md +0 -27
  250. package/iac/node_modules/aws-cdk-lib/aws-memorydb/README.md +0 -27
  251. package/iac/node_modules/aws-cdk-lib/aws-msk/README.md +0 -32
  252. package/iac/node_modules/aws-cdk-lib/aws-mwaa/README.md +0 -27
  253. package/iac/node_modules/aws-cdk-lib/aws-neptune/README.md +0 -32
  254. package/iac/node_modules/aws-cdk-lib/aws-networkfirewall/README.md +0 -27
  255. package/iac/node_modules/aws-cdk-lib/aws-networkmanager/README.md +0 -27
  256. package/iac/node_modules/aws-cdk-lib/aws-nimblestudio/README.md +0 -27
  257. package/iac/node_modules/aws-cdk-lib/aws-opensearchservice/README.md +0 -378
  258. package/iac/node_modules/aws-cdk-lib/aws-opsworks/README.md +0 -27
  259. package/iac/node_modules/aws-cdk-lib/aws-opsworkscm/README.md +0 -27
  260. package/iac/node_modules/aws-cdk-lib/aws-panorama/README.md +0 -27
  261. package/iac/node_modules/aws-cdk-lib/aws-personalize/README.md +0 -27
  262. package/iac/node_modules/aws-cdk-lib/aws-pinpoint/README.md +0 -27
  263. package/iac/node_modules/aws-cdk-lib/aws-pinpointemail/README.md +0 -27
  264. package/iac/node_modules/aws-cdk-lib/aws-qldb/README.md +0 -27
  265. package/iac/node_modules/aws-cdk-lib/aws-quicksight/README.md +0 -27
  266. package/iac/node_modules/aws-cdk-lib/aws-ram/README.md +0 -27
  267. package/iac/node_modules/aws-cdk-lib/aws-rds/README.md +0 -704
  268. package/iac/node_modules/aws-cdk-lib/aws-redshift/README.md +0 -32
  269. package/iac/node_modules/aws-cdk-lib/aws-redshiftserverless/README.md +0 -27
  270. package/iac/node_modules/aws-cdk-lib/aws-refactorspaces/README.md +0 -27
  271. package/iac/node_modules/aws-cdk-lib/aws-rekognition/README.md +0 -27
  272. package/iac/node_modules/aws-cdk-lib/aws-resiliencehub/README.md +0 -27
  273. package/iac/node_modules/aws-cdk-lib/aws-resourcegroups/README.md +0 -27
  274. package/iac/node_modules/aws-cdk-lib/aws-robomaker/README.md +0 -27
  275. package/iac/node_modules/aws-cdk-lib/aws-route53/README.md +0 -281
  276. package/iac/node_modules/aws-cdk-lib/aws-route53-patterns/README.md +0 -45
  277. package/iac/node_modules/aws-cdk-lib/aws-route53-targets/README.md +0 -181
  278. package/iac/node_modules/aws-cdk-lib/aws-route53recoverycontrol/README.md +0 -27
  279. package/iac/node_modules/aws-cdk-lib/aws-route53recoveryreadiness/README.md +0 -27
  280. package/iac/node_modules/aws-cdk-lib/aws-route53resolver/README.md +0 -32
  281. package/iac/node_modules/aws-cdk-lib/aws-rum/README.md +0 -27
  282. package/iac/node_modules/aws-cdk-lib/aws-s3/README.md +0 -581
  283. package/iac/node_modules/aws-cdk-lib/aws-s3-assets/README.md +0 -179
  284. package/iac/node_modules/aws-cdk-lib/aws-s3-deployment/README.md +0 -349
  285. package/iac/node_modules/aws-cdk-lib/aws-s3-notifications/README.md +0 -46
  286. package/iac/node_modules/aws-cdk-lib/aws-s3objectlambda/README.md +0 -32
  287. package/iac/node_modules/aws-cdk-lib/aws-s3outposts/README.md +0 -27
  288. package/iac/node_modules/aws-cdk-lib/aws-sagemaker/README.md +0 -27
  289. package/iac/node_modules/aws-cdk-lib/aws-sam/README.md +0 -27
  290. package/iac/node_modules/aws-cdk-lib/aws-sdb/README.md +0 -27
  291. package/iac/node_modules/aws-cdk-lib/aws-secretsmanager/README.md +0 -285
  292. package/iac/node_modules/aws-cdk-lib/aws-securityhub/README.md +0 -27
  293. package/iac/node_modules/aws-cdk-lib/aws-servicecatalog/README.md +0 -491
  294. package/iac/node_modules/aws-cdk-lib/aws-servicecatalogappregistry/README.md +0 -32
  295. package/iac/node_modules/aws-cdk-lib/aws-servicediscovery/README.md +0 -45
  296. package/iac/node_modules/aws-cdk-lib/aws-ses/README.md +0 -194
  297. package/iac/node_modules/aws-cdk-lib/aws-ses-actions/README.md +0 -16
  298. package/iac/node_modules/aws-cdk-lib/aws-signer/README.md +0 -41
  299. package/iac/node_modules/aws-cdk-lib/aws-sns/README.md +0 -184
  300. package/iac/node_modules/aws-cdk-lib/aws-sns-subscriptions/README.md +0 -120
  301. package/iac/node_modules/aws-cdk-lib/aws-sqs/README.md +0 -57
  302. package/iac/node_modules/aws-cdk-lib/aws-ssm/README.md +0 -99
  303. package/iac/node_modules/aws-cdk-lib/aws-ssmcontacts/README.md +0 -27
  304. package/iac/node_modules/aws-cdk-lib/aws-ssmincidents/README.md +0 -27
  305. package/iac/node_modules/aws-cdk-lib/aws-sso/README.md +0 -27
  306. package/iac/node_modules/aws-cdk-lib/aws-stepfunctions/README.md +0 -884
  307. package/iac/node_modules/aws-cdk-lib/aws-stepfunctions-tasks/README.md +0 -1288
  308. package/iac/node_modules/aws-cdk-lib/aws-supportapp/README.md +0 -27
  309. package/iac/node_modules/aws-cdk-lib/aws-synthetics/README.md +0 -32
  310. package/iac/node_modules/aws-cdk-lib/aws-timestream/README.md +0 -27
  311. package/iac/node_modules/aws-cdk-lib/aws-transfer/README.md +0 -27
  312. package/iac/node_modules/aws-cdk-lib/aws-voiceid/README.md +0 -27
  313. package/iac/node_modules/aws-cdk-lib/aws-waf/README.md +0 -27
  314. package/iac/node_modules/aws-cdk-lib/aws-wafregional/README.md +0 -27
  315. package/iac/node_modules/aws-cdk-lib/aws-wafv2/README.md +0 -27
  316. package/iac/node_modules/aws-cdk-lib/aws-wisdom/README.md +0 -27
  317. package/iac/node_modules/aws-cdk-lib/aws-workspaces/README.md +0 -27
  318. package/iac/node_modules/aws-cdk-lib/aws-xray/README.md +0 -27
  319. package/iac/node_modules/aws-cdk-lib/cloud-assembly-schema/README.md +0 -55
  320. package/iac/node_modules/aws-cdk-lib/cloud-assembly-schema/schema/README.md +0 -5
  321. package/iac/node_modules/aws-cdk-lib/cloudformation-include/README.md +0 -466
  322. package/iac/node_modules/aws-cdk-lib/core/README.md +0 -1078
  323. package/iac/node_modules/aws-cdk-lib/custom-resources/README.md +0 -624
  324. package/iac/node_modules/aws-cdk-lib/cx-api/README.md +0 -98
  325. package/iac/node_modules/aws-cdk-lib/lambda-layer-awscli/README.md +0 -19
  326. package/iac/node_modules/aws-cdk-lib/lambda-layer-kubectl/README.md +0 -20
  327. package/iac/node_modules/aws-cdk-lib/lambda-layer-node-proxy-agent/README.md +0 -18
  328. package/iac/node_modules/aws-cdk-lib/node_modules/@balena/dockerignore/LICENSE.md +0 -206
  329. package/iac/node_modules/aws-cdk-lib/node_modules/@balena/dockerignore/README.md +0 -261
  330. package/iac/node_modules/aws-cdk-lib/node_modules/at-least-node/LICENSE +0 -6
  331. package/iac/node_modules/aws-cdk-lib/node_modules/at-least-node/README.md +0 -25
  332. package/iac/node_modules/aws-cdk-lib/node_modules/balanced-match/LICENSE.md +0 -21
  333. package/iac/node_modules/aws-cdk-lib/node_modules/balanced-match/README.md +0 -97
  334. package/iac/node_modules/aws-cdk-lib/node_modules/brace-expansion/LICENSE +0 -21
  335. package/iac/node_modules/aws-cdk-lib/node_modules/brace-expansion/README.md +0 -129
  336. package/iac/node_modules/aws-cdk-lib/node_modules/case/LICENSE +0 -22
  337. package/iac/node_modules/aws-cdk-lib/node_modules/case/README.md +0 -139
  338. package/iac/node_modules/aws-cdk-lib/node_modules/case/dist/Case.min.js.map +0 -1
  339. package/iac/node_modules/aws-cdk-lib/node_modules/case/dist/Case.plus.min.js.map +0 -1
  340. package/iac/node_modules/aws-cdk-lib/node_modules/concat-map/LICENSE +0 -18
  341. package/iac/node_modules/aws-cdk-lib/node_modules/concat-map/README.markdown +0 -62
  342. package/iac/node_modules/aws-cdk-lib/node_modules/fs-extra/LICENSE +0 -15
  343. package/iac/node_modules/aws-cdk-lib/node_modules/fs-extra/README.md +0 -264
  344. package/iac/node_modules/aws-cdk-lib/node_modules/graceful-fs/LICENSE +0 -15
  345. package/iac/node_modules/aws-cdk-lib/node_modules/graceful-fs/README.md +0 -143
  346. package/iac/node_modules/aws-cdk-lib/node_modules/ignore/README.md +0 -412
  347. package/iac/node_modules/aws-cdk-lib/node_modules/jsonfile/LICENSE +0 -15
  348. package/iac/node_modules/aws-cdk-lib/node_modules/jsonfile/README.md +0 -230
  349. package/iac/node_modules/aws-cdk-lib/node_modules/jsonschema/LICENSE +0 -21
  350. package/iac/node_modules/aws-cdk-lib/node_modules/jsonschema/README.md +0 -421
  351. package/iac/node_modules/aws-cdk-lib/node_modules/lru-cache/LICENSE +0 -15
  352. package/iac/node_modules/aws-cdk-lib/node_modules/lru-cache/README.md +0 -166
  353. package/iac/node_modules/aws-cdk-lib/node_modules/minimatch/LICENSE +0 -15
  354. package/iac/node_modules/aws-cdk-lib/node_modules/minimatch/README.md +0 -230
  355. package/iac/node_modules/aws-cdk-lib/node_modules/punycode/README.md +0 -122
  356. package/iac/node_modules/aws-cdk-lib/node_modules/semver/LICENSE +0 -15
  357. package/iac/node_modules/aws-cdk-lib/node_modules/semver/README.md +0 -568
  358. package/iac/node_modules/aws-cdk-lib/node_modules/universalify/LICENSE +0 -20
  359. package/iac/node_modules/aws-cdk-lib/node_modules/universalify/README.md +0 -76
  360. package/iac/node_modules/aws-cdk-lib/node_modules/yallist/LICENSE +0 -15
  361. package/iac/node_modules/aws-cdk-lib/node_modules/yallist/README.md +0 -204
  362. package/iac/node_modules/aws-cdk-lib/node_modules/yaml/LICENSE +0 -13
  363. package/iac/node_modules/aws-cdk-lib/node_modules/yaml/README.md +0 -127
  364. package/iac/node_modules/aws-cdk-lib/pipelines/README.md +0 -1573
  365. package/iac/node_modules/aws-cdk-lib/region-info/README.md +0 -84
  366. package/iac/node_modules/aws-cdk-lib/triggers/README.md +0 -86
  367. package/iac/node_modules/balanced-match/LICENSE.md +0 -21
  368. package/iac/node_modules/balanced-match/README.md +0 -97
  369. package/iac/node_modules/brace-expansion/LICENSE +0 -21
  370. package/iac/node_modules/brace-expansion/README.md +0 -129
  371. package/iac/node_modules/buffer-from/LICENSE +0 -21
  372. package/iac/node_modules/buffer-from/readme.md +0 -69
  373. package/iac/node_modules/case/LICENSE +0 -22
  374. package/iac/node_modules/case/README.md +0 -139
  375. package/iac/node_modules/case/dist/Case.min.js.map +0 -1
  376. package/iac/node_modules/case/dist/Case.plus.min.js.map +0 -1
  377. package/iac/node_modules/chalk/license +0 -9
  378. package/iac/node_modules/chalk/node_modules/ansi-styles/license +0 -9
  379. package/iac/node_modules/chalk/node_modules/ansi-styles/readme.md +0 -152
  380. package/iac/node_modules/chalk/readme.md +0 -341
  381. package/iac/node_modules/color-convert/LICENSE +0 -21
  382. package/iac/node_modules/color-convert/README.md +0 -68
  383. package/iac/node_modules/color-name/LICENSE +0 -8
  384. package/iac/node_modules/color-name/README.md +0 -11
  385. package/iac/node_modules/concat-map/LICENSE +0 -18
  386. package/iac/node_modules/concat-map/README.markdown +0 -62
  387. package/iac/node_modules/constructs/LICENSE +0 -202
  388. package/iac/node_modules/constructs/README.md +0 -28
  389. package/iac/node_modules/create-require/LICENSE +0 -25
  390. package/iac/node_modules/create-require/README.md +0 -46
  391. package/iac/node_modules/diff/LICENSE +0 -31
  392. package/iac/node_modules/diff/README.md +0 -207
  393. package/iac/node_modules/diff-sequences/LICENSE +0 -21
  394. package/iac/node_modules/diff-sequences/README.md +0 -404
  395. package/iac/node_modules/fs-extra/LICENSE +0 -15
  396. package/iac/node_modules/fs-extra/README.md +0 -264
  397. package/iac/node_modules/fsevents/LICENSE +0 -22
  398. package/iac/node_modules/fsevents/README.md +0 -83
  399. package/iac/node_modules/graceful-fs/LICENSE +0 -15
  400. package/iac/node_modules/graceful-fs/README.md +0 -143
  401. package/iac/node_modules/has-flag/license +0 -9
  402. package/iac/node_modules/has-flag/readme.md +0 -89
  403. package/iac/node_modules/ignore/README.md +0 -412
  404. package/iac/node_modules/jest-diff/LICENSE +0 -21
  405. package/iac/node_modules/jest-diff/README.md +0 -671
  406. package/iac/node_modules/jest-get-type/LICENSE +0 -21
  407. package/iac/node_modules/jest-matcher-utils/LICENSE +0 -21
  408. package/iac/node_modules/jest-matcher-utils/README.md +0 -24
  409. package/iac/node_modules/jsonfile/LICENSE +0 -15
  410. package/iac/node_modules/jsonfile/README.md +0 -230
  411. package/iac/node_modules/jsonschema/LICENSE +0 -21
  412. package/iac/node_modules/jsonschema/README.md +0 -421
  413. package/iac/node_modules/lru-cache/LICENSE +0 -15
  414. package/iac/node_modules/lru-cache/README.md +0 -166
  415. package/iac/node_modules/make-error/LICENSE +0 -5
  416. package/iac/node_modules/make-error/README.md +0 -112
  417. package/iac/node_modules/minimatch/LICENSE +0 -15
  418. package/iac/node_modules/minimatch/README.md +0 -230
  419. package/iac/node_modules/pretty-format/LICENSE +0 -21
  420. package/iac/node_modules/pretty-format/README.md +0 -458
  421. package/iac/node_modules/punycode/README.md +0 -122
  422. package/iac/node_modules/react-is/LICENSE +0 -21
  423. package/iac/node_modules/react-is/README.md +0 -104
  424. package/iac/node_modules/semver/LICENSE +0 -15
  425. package/iac/node_modules/semver/README.md +0 -568
  426. package/iac/node_modules/source-map/LICENSE +0 -28
  427. package/iac/node_modules/source-map/README.md +0 -742
  428. package/iac/node_modules/source-map/dist/source-map.min.js.map +0 -1
  429. package/iac/node_modules/source-map-support/LICENSE.md +0 -21
  430. package/iac/node_modules/source-map-support/README.md +0 -284
  431. package/iac/node_modules/supports-color/license +0 -9
  432. package/iac/node_modules/supports-color/readme.md +0 -76
  433. package/iac/node_modules/ts-node/LICENSE +0 -21
  434. package/iac/node_modules/ts-node/README.md +0 -1442
  435. package/iac/node_modules/ts-node/dist/bin-cwd.js.map +0 -1
  436. package/iac/node_modules/ts-node/dist/bin-esm.js.map +0 -1
  437. package/iac/node_modules/ts-node/dist/bin-script-deprecated.js.map +0 -1
  438. package/iac/node_modules/ts-node/dist/bin-script.js.map +0 -1
  439. package/iac/node_modules/ts-node/dist/bin-transpile.js.map +0 -1
  440. package/iac/node_modules/ts-node/dist/bin.js.map +0 -1
  441. package/iac/node_modules/ts-node/dist/child/argv-payload.js.map +0 -1
  442. package/iac/node_modules/ts-node/dist/child/child-entrypoint.js.map +0 -1
  443. package/iac/node_modules/ts-node/dist/child/child-loader.js.map +0 -1
  444. package/iac/node_modules/ts-node/dist/child/child-require.js.map +0 -1
  445. package/iac/node_modules/ts-node/dist/child/spawn-child.js.map +0 -1
  446. package/iac/node_modules/ts-node/dist/cjs-resolve-hooks.js.map +0 -1
  447. package/iac/node_modules/ts-node/dist/configuration.js.map +0 -1
  448. package/iac/node_modules/ts-node/dist/esm.js.map +0 -1
  449. package/iac/node_modules/ts-node/dist/file-extensions.js.map +0 -1
  450. package/iac/node_modules/ts-node/dist/index.js.map +0 -1
  451. package/iac/node_modules/ts-node/dist/module-type-classifier.js.map +0 -1
  452. package/iac/node_modules/ts-node/dist/node-module-type-classifier.js.map +0 -1
  453. package/iac/node_modules/ts-node/dist/repl.js.map +0 -1
  454. package/iac/node_modules/ts-node/dist/resolver-functions.js.map +0 -1
  455. package/iac/node_modules/ts-node/dist/transpilers/swc.js.map +0 -1
  456. package/iac/node_modules/ts-node/dist/transpilers/types.js.map +0 -1
  457. package/iac/node_modules/ts-node/dist/ts-compiler-types.js.map +0 -1
  458. package/iac/node_modules/ts-node/dist/ts-internals.js.map +0 -1
  459. package/iac/node_modules/ts-node/dist/ts-transpile-module.js.map +0 -1
  460. package/iac/node_modules/ts-node/dist/tsconfig-schema.js.map +0 -1
  461. package/iac/node_modules/ts-node/dist/tsconfigs.js.map +0 -1
  462. package/iac/node_modules/ts-node/dist/util.js.map +0 -1
  463. package/iac/node_modules/ts-node/dist-raw/README.md +0 -36
  464. package/iac/node_modules/typescript/LICENSE.txt +0 -55
  465. package/iac/node_modules/typescript/README.md +0 -104
  466. package/iac/node_modules/typescript/lib/README.md +0 -5
  467. package/iac/node_modules/universalify/LICENSE +0 -20
  468. package/iac/node_modules/universalify/README.md +0 -76
  469. package/iac/node_modules/v8-compile-cache-lib/LICENSE +0 -21
  470. package/iac/node_modules/v8-compile-cache-lib/README.md +0 -60
  471. package/iac/node_modules/yallist/LICENSE +0 -15
  472. package/iac/node_modules/yallist/README.md +0 -204
  473. package/iac/node_modules/yaml/LICENSE +0 -13
  474. package/iac/node_modules/yaml/README.md +0 -127
  475. package/iac/node_modules/yn/license +0 -9
  476. package/iac/node_modules/yn/readme.md +0 -83
  477. package/react/Edit.d.ts +0 -3
  478. package/react/Edit.js +0 -10
  479. package/react/Edit.js.map +0 -1
@@ -1,1078 +0,0 @@
1
- # AWS Cloud Development Kit Core Library
2
-
3
-
4
- This library includes the basic building blocks of the [AWS Cloud Development Kit](https://github.com/aws/aws-cdk) (AWS CDK). It defines the core classes that are used in the rest of the
5
- AWS Construct Library.
6
-
7
- See the [AWS CDK Developer
8
- Guide](https://docs.aws.amazon.com/cdk/latest/guide/home.html) for
9
- information of most of the capabilities of this library. The rest of this
10
- README will only cover topics not already covered in the Developer Guide.
11
-
12
- <!--BEGIN CORE DOCUMENTATION-->
13
-
14
- ## Stacks and Stages
15
-
16
- A `Stack` is the smallest physical unit of deployment, and maps directly onto
17
- a CloudFormation Stack. You define a Stack by defining a subclass of `Stack`
18
- -- let's call it `MyStack` -- and instantiating the constructs that make up
19
- your application in `MyStack`'s constructor. You then instantiate this stack
20
- one or more times to define different instances of your application. For example,
21
- you can instantiate it once using few and cheap EC2 instances for testing,
22
- and once again using more and bigger EC2 instances for production.
23
-
24
- When your application grows, you may decide that it makes more sense to split it
25
- out across multiple `Stack` classes. This can happen for a number of reasons:
26
-
27
- - You could be starting to reach the maximum number of resources allowed in a single
28
- stack (this is currently 500).
29
- - You could decide you want to separate out stateful resources and stateless resources
30
- into separate stacks, so that it becomes easy to tear down and recreate the stacks
31
- that don't have stateful resources.
32
- - There could be a single stack with resources (like a VPC) that are shared
33
- between multiple instances of other stacks containing your applications.
34
-
35
- As soon as your conceptual application starts to encompass multiple stacks,
36
- it is convenient to wrap them in another construct that represents your
37
- logical application. You can then treat that new unit the same way you used
38
- to be able to treat a single stack: by instantiating it multiple times
39
- for different instances of your application.
40
-
41
- You can define a custom subclass of `Stage`, holding one or more
42
- `Stack`s, to represent a single logical instance of your application.
43
-
44
- As a final note: `Stack`s are not a unit of reuse. They describe physical
45
- deployment layouts, and as such are best left to application builders to
46
- organize their deployments with. If you want to vend a reusable construct,
47
- define it as a subclasses of `Construct`: the consumers of your construct
48
- will decide where to place it in their own stacks.
49
-
50
- ## Stack Synthesizers
51
-
52
- Each Stack has a *synthesizer*, an object that determines how and where
53
- the Stack should be synthesized and deployed. The synthesizer controls
54
- aspects like:
55
-
56
- - How does the stack reference assets? (Either through CloudFormation
57
- parameters the CLI supplies, or because the Stack knows a predefined
58
- location where assets will be uploaded).
59
- - What roles are used to deploy the stack? These can be bootstrapped
60
- roles, roles created in some other way, or just the CLI's current
61
- credentials.
62
-
63
- The following synthesizers are available:
64
-
65
- - `DefaultStackSynthesizer`: recommended. Uses predefined asset locations and
66
- roles created by the modern bootstrap template. Access control is done by
67
- controlling who can assume the deploy role. This is the default stack
68
- synthesizer in CDKv2.
69
- - `LegacyStackSynthesizer`: Uses CloudFormation parameters to communicate
70
- asset locations, and the CLI's current permissions to deploy stacks. The
71
- is the default stack synthesizer in CDKv1.
72
- - `CliCredentialsStackSynthesizer`: Uses predefined asset locations, and the
73
- CLI's current permissions.
74
-
75
- Each of these synthesizers takes configuration arguments. To configure
76
- a stack with a synthesizer, pass it as one of its properties:
77
-
78
- ```ts
79
- new MyStack(app, 'MyStack', {
80
- synthesizer: new DefaultStackSynthesizer({
81
- fileAssetsBucketName: 'my-orgs-asset-bucket',
82
- }),
83
- });
84
- ```
85
-
86
- For more information on bootstrapping accounts and customizing synthesis,
87
- see [Bootstrapping in the CDK Developer Guide](https://docs.aws.amazon.com/cdk/latest/guide/bootstrapping.html).
88
-
89
- ## Nested Stacks
90
-
91
- [Nested stacks](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-nested-stacks.html) are stacks created as part of other stacks. You create a nested stack within another stack by using the `NestedStack` construct.
92
-
93
- As your infrastructure grows, common patterns can emerge in which you declare the same components in multiple templates. You can separate out these common components and create dedicated templates for them. Then use the resource in your template to reference other templates, creating nested stacks.
94
-
95
- For example, assume that you have a load balancer configuration that you use for most of your stacks. Instead of copying and pasting the same configurations into your templates, you can create a dedicated template for the load balancer. Then, you just use the resource to reference that template from within other templates.
96
-
97
- The following example will define a single top-level stack that contains two nested stacks: each one with a single Amazon S3 bucket:
98
-
99
- ```ts
100
- class MyNestedStack extends cfn.NestedStack {
101
- constructor(scope: Construct, id: string, props?: cfn.NestedStackProps) {
102
- super(scope, id, props);
103
-
104
- new s3.Bucket(this, 'NestedBucket');
105
- }
106
- }
107
-
108
- class MyParentStack extends Stack {
109
- constructor(scope: Construct, id: string, props?: StackProps) {
110
- super(scope, id, props);
111
-
112
- new MyNestedStack(this, 'Nested1');
113
- new MyNestedStack(this, 'Nested2');
114
- }
115
- }
116
- ```
117
-
118
- Resources references across nested/parent boundaries (even with multiple levels of nesting) will be wired by the AWS CDK
119
- through CloudFormation parameters and outputs. When a resource from a parent stack is referenced by a nested stack,
120
- a CloudFormation parameter will automatically be added to the nested stack and assigned from the parent; when a resource
121
- from a nested stack is referenced by a parent stack, a CloudFormation output will be automatically be added to the
122
- nested stack and referenced using `Fn::GetAtt "Outputs.Xxx"` from the parent.
123
-
124
- Nested stacks also support the use of Docker image and file assets.
125
-
126
- ## Accessing resources in a different stack
127
-
128
- You can access resources in a different stack, as long as they are in the
129
- same account and AWS Region. The following example defines the stack `stack1`,
130
- which defines an Amazon S3 bucket. Then it defines a second stack, `stack2`,
131
- which takes the bucket from stack1 as a constructor property.
132
-
133
- ```ts
134
- const prod = { account: '123456789012', region: 'us-east-1' };
135
-
136
- const stack1 = new StackThatProvidesABucket(app, 'Stack1' , { env: prod });
137
-
138
- // stack2 will take a property { bucket: IBucket }
139
- const stack2 = new StackThatExpectsABucket(app, 'Stack2', {
140
- bucket: stack1.bucket,
141
- env: prod
142
- });
143
- ```
144
-
145
- If the AWS CDK determines that the resource is in the same account and
146
- Region, but in a different stack, it automatically synthesizes AWS
147
- CloudFormation
148
- [Exports](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-stack-exports.html)
149
- in the producing stack and an
150
- [Fn::ImportValue](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/intrinsic-function-reference-importvalue.html)
151
- in the consuming stack to transfer that information from one stack to the
152
- other.
153
-
154
- ### Removing automatic cross-stack references
155
-
156
- The automatic references created by CDK when you use resources across stacks
157
- are convenient, but may block your deployments if you want to remove the
158
- resources that are referenced in this way. You will see an error like:
159
-
160
- ```text
161
- Export Stack1:ExportsOutputFnGetAtt-****** cannot be deleted as it is in use by Stack1
162
- ```
163
-
164
- Let's say there is a Bucket in the `stack1`, and the `stack2` references its
165
- `bucket.bucketName`. You now want to remove the bucket and run into the error above.
166
-
167
- It's not safe to remove `stack1.bucket` while `stack2` is still using it, so
168
- unblocking yourself from this is a two-step process. This is how it works:
169
-
170
- DEPLOYMENT 1: break the relationship
171
-
172
- - Make sure `stack2` no longer references `bucket.bucketName` (maybe the consumer
173
- stack now uses its own bucket, or it writes to an AWS DynamoDB table, or maybe you just
174
- remove the Lambda Function altogether).
175
- - In the `stack1` class, call `this.exportValue(this.bucket.bucketName)`. This
176
- will make sure the CloudFormation Export continues to exist while the relationship
177
- between the two stacks is being broken.
178
- - Deploy (this will effectively only change the `stack2`, but it's safe to deploy both).
179
-
180
- DEPLOYMENT 2: remove the resource
181
-
182
- - You are now free to remove the `bucket` resource from `stack1`.
183
- - Don't forget to remove the `exportValue()` call as well.
184
- - Deploy again (this time only the `stack1` will be changed -- the bucket will be deleted).
185
-
186
- ## Durations
187
-
188
- To make specifications of time intervals unambiguous, a single class called
189
- `Duration` is used throughout the AWS Construct Library by all constructs
190
- that that take a time interval as a parameter (be it for a timeout, a
191
- rate, or something else).
192
-
193
- An instance of Duration is constructed by using one of the static factory
194
- methods on it:
195
-
196
- ```ts
197
- Duration.seconds(300) // 5 minutes
198
- Duration.minutes(5) // 5 minutes
199
- Duration.hours(1) // 1 hour
200
- Duration.days(7) // 7 days
201
- Duration.parse('PT5M') // 5 minutes
202
- ```
203
-
204
- Durations can be added or subtracted together:
205
-
206
- ```ts
207
- Duration.minutes(1).plus(Duration.seconds(60)); // 2 minutes
208
- Duration.minutes(5).minus(Duration.seconds(10)); // 290 secondes
209
- ```
210
-
211
- ## Size (Digital Information Quantity)
212
-
213
- To make specification of digital storage quantities unambiguous, a class called
214
- `Size` is available.
215
-
216
- An instance of `Size` is initialized through one of its static factory methods:
217
-
218
- ```ts
219
- Size.kibibytes(200) // 200 KiB
220
- Size.mebibytes(5) // 5 MiB
221
- Size.gibibytes(40) // 40 GiB
222
- Size.tebibytes(200) // 200 TiB
223
- Size.pebibytes(3) // 3 PiB
224
- ```
225
-
226
- Instances of `Size` created with one of the units can be converted into others.
227
- By default, conversion to a higher unit will fail if the conversion does not produce
228
- a whole number. This can be overridden by unsetting `integral` property.
229
-
230
- ```ts
231
- Size.mebibytes(2).toKibibytes() // yields 2048
232
- Size.kibibytes(2050).toMebibytes({ rounding: SizeRoundingBehavior.FLOOR }) // yields 2
233
- ```
234
-
235
- ## Secrets
236
-
237
- To help avoid accidental storage of secrets as plain text, we use the `SecretValue` type to
238
- represent secrets. Any construct that takes a value that should be a secret (such as
239
- a password or an access key) will take a parameter of type `SecretValue`.
240
-
241
- The best practice is to store secrets in AWS Secrets Manager and reference them using `SecretValue.secretsManager`:
242
-
243
- ```ts
244
- const secret = SecretValue.secretsManager('secretId', {
245
- jsonField: 'password', // optional: key of a JSON field to retrieve (defaults to all content),
246
- versionId: 'id', // optional: id of the version (default AWSCURRENT)
247
- versionStage: 'stage', // optional: version stage name (default AWSCURRENT)
248
- });
249
- ```
250
-
251
- Using AWS Secrets Manager is the recommended way to reference secrets in a CDK app.
252
- `SecretValue` also supports the following secret sources:
253
-
254
- - `SecretValue.unsafePlainText(secret)`: stores the secret as plain text in your app and the resulting template (not recommended).
255
- - `SecretValue.secretsManager(secret)`: refers to a secret stored in Secrets Manager
256
- - `SecretValue.ssmSecure(param, version)`: refers to a secret stored as a SecureString in the SSM
257
- Parameter Store. If you don't specify the exact version, AWS CloudFormation uses the latest
258
- version of the parameter.
259
- - `SecretValue.cfnParameter(param)`: refers to a secret passed through a CloudFormation parameter (must have `NoEcho: true`).
260
- - `SecretValue.cfnDynamicReference(dynref)`: refers to a secret described by a CloudFormation dynamic reference (used by `ssmSecure` and `secretsManager`).
261
- - `SecretValue.resourceAttribute(attr)`: refers to a secret returned from a CloudFormation resource creation.
262
-
263
- `SecretValue`s should only be passed to constructs that accept properties of type
264
- `SecretValue`. These constructs are written to ensure your secrets will not be
265
- exposed where they shouldn't be. If you try to use a `SecretValue` in a
266
- different location, an error about unsafe secret usage will be thrown at
267
- synthesis time.
268
-
269
- If you rotate the secret's value in Secrets Manager, you must also change at
270
- least one property on the resource where you are using the secret, to force
271
- CloudFormation to re-read the secret.
272
-
273
- `SecretValue.ssmSecure()` is only supported for a limited set of resources.
274
- [Click here for a list of supported resources and properties](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/dynamic-references.html#template-parameters-dynamic-patterns-resources).
275
-
276
- ## ARN manipulation
277
-
278
- Sometimes you will need to put together or pick apart Amazon Resource Names
279
- (ARNs). The functions `stack.formatArn()` and `stack.parseArn()` exist for
280
- this purpose.
281
-
282
- `formatArn()` can be used to build an ARN from components. It will automatically
283
- use the region and account of the stack you're calling it on:
284
-
285
- ```ts
286
- declare const stack: Stack;
287
-
288
- // Builds "arn:<PARTITION>:lambda:<REGION>:<ACCOUNT>:function:MyFunction"
289
- stack.formatArn({
290
- service: 'lambda',
291
- resource: 'function',
292
- sep: ':',
293
- resourceName: 'MyFunction'
294
- });
295
- ```
296
-
297
- `parseArn()` can be used to get a single component from an ARN. `parseArn()`
298
- will correctly deal with both literal ARNs and deploy-time values (tokens),
299
- but in case of a deploy-time value be aware that the result will be another
300
- deploy-time value which cannot be inspected in the CDK application.
301
-
302
- ```ts
303
- declare const stack: Stack;
304
-
305
- // Extracts the function name out of an AWS Lambda Function ARN
306
- const arnComponents = stack.parseArn(arn, ':');
307
- const functionName = arnComponents.resourceName;
308
- ```
309
-
310
- Note that depending on the service, the resource separator can be either
311
- `:` or `/`, and the resource name can be either the 6th or 7th
312
- component in the ARN. When using these functions, you will need to know
313
- the format of the ARN you are dealing with.
314
-
315
- For an exhaustive list of ARN formats used in AWS, see [AWS ARNs and
316
- Namespaces](https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html)
317
- in the AWS General Reference.
318
-
319
- ## Dependencies
320
-
321
- ### Construct Dependencies
322
-
323
- Sometimes AWS resources depend on other resources, and the creation of one
324
- resource must be completed before the next one can be started.
325
-
326
- In general, CloudFormation will correctly infer the dependency relationship
327
- between resources based on the property values that are used. In the cases where
328
- it doesn't, the AWS Construct Library will add the dependency relationship for
329
- you.
330
-
331
- If you need to add an ordering dependency that is not automatically inferred,
332
- you do so by adding a dependency relationship using
333
- `constructA.node.addDependency(constructB)`. This will add a dependency
334
- relationship between all resources in the scope of `constructA` and all
335
- resources in the scope of `constructB`.
336
-
337
- If you want a single object to represent a set of constructs that are not
338
- necessarily in the same scope, you can use a `DependencyGroup`. The
339
- following creates a single object that represents a dependency on two
340
- constructs, `constructB` and `constructC`:
341
-
342
- ```ts
343
- // Declare the dependable object
344
- const bAndC = new DependencyGroup();
345
- bAndC.add(constructB);
346
- bAndC.add(constructC);
347
-
348
- // Take the dependency
349
- constructA.node.addDependency(bAndC);
350
- ```
351
-
352
- ### Stack Dependencies
353
-
354
- Two different stack instances can have a dependency on one another. This
355
- happens when an resource from one stack is referenced in another stack. In
356
- that case, CDK records the cross-stack referencing of resources,
357
- automatically produces the right CloudFormation primitives, and adds a
358
- dependency between the two stacks. You can also manually add a dependency
359
- between two stacks by using the `stackA.addDependency(stackB)` method.
360
-
361
- A stack dependency has the following implications:
362
-
363
- - Cyclic dependencies are not allowed, so if `stackA` is using resources from
364
- `stackB`, the reverse is not possible anymore.
365
- - Stacks with dependencies between them are treated specially by the CDK
366
- toolkit:
367
- - If `stackA` depends on `stackB`, running `cdk deploy stackA` will also
368
- automatically deploy `stackB`.
369
- - `stackB`'s deployment will be performed *before* `stackA`'s deployment.
370
-
371
- ## Custom Resources
372
-
373
- Custom Resources are CloudFormation resources that are implemented by arbitrary
374
- user code. They can do arbitrary lookups or modifications during a
375
- CloudFormation deployment.
376
-
377
- Custom resources are backed by *custom resource providers*. Commonly, these are
378
- Lambda Functions that are deployed in the same deployment as the one that
379
- defines the custom resource itself, but they can also be backed by Lambda
380
- Functions deployed previously, or code responding to SNS Topic events running on
381
- EC2 instances in a completely different account. For more information on custom
382
- resource providers, see the next section.
383
-
384
- Once you have a provider, each definition of a `CustomResource` construct
385
- represents one invocation. A single provider can be used for the implementation
386
- of arbitrarily many custom resource definitions. A single definition looks like
387
- this:
388
-
389
- ```ts
390
- new CustomResource(this, 'MyMagicalResource', {
391
- resourceType: 'Custom::MyCustomResource', // must start with 'Custom::'
392
-
393
- // the resource properties
394
- properties: {
395
- Property1: 'foo',
396
- Property2: 'bar'
397
- },
398
-
399
- // the ARN of the provider (SNS/Lambda) which handles
400
- // CREATE, UPDATE or DELETE events for this resource type
401
- // see next section for details
402
- serviceToken: 'ARN'
403
- });
404
- ```
405
-
406
- ### Custom Resource Providers
407
-
408
- Custom resources are backed by a **custom resource provider** which can be
409
- implemented in one of the following ways. The following table compares the
410
- various provider types (ordered from low-level to high-level):
411
-
412
- | Provider | Compute Type | Error Handling | Submit to CloudFormation | Max Timeout | Language | Footprint |
413
- |----------------------------------------------------------------------|:------------:|:--------------:|:------------------------:|:---------------:|:--------:|:---------:|
414
- | [sns.Topic](#amazon-sns-topic) | Self-managed | Manual | Manual | Unlimited | Any | Depends |
415
- | [lambda.Function](#aws-lambda-function) | AWS Lambda | Manual | Manual | 15min | Any | Small |
416
- | [core.CustomResourceProvider](#the-corecustomresourceprovider-class) | AWS Lambda | Auto | Auto | 15min | Node.js | Small |
417
- | [custom-resources.Provider](#the-custom-resource-provider-framework) | AWS Lambda | Auto | Auto | Unlimited Async | Any | Large |
418
-
419
- Legend:
420
-
421
- - **Compute type**: which type of compute can is used to execute the handler.
422
- - **Error Handling**: whether errors thrown by handler code are automatically
423
- trapped and a FAILED response is submitted to CloudFormation. If this is
424
- "Manual", developers must take care of trapping errors. Otherwise, events
425
- could cause stacks to hang.
426
- - **Submit to CloudFormation**: whether the framework takes care of submitting
427
- SUCCESS/FAILED responses to CloudFormation through the event's response URL.
428
- - **Max Timeout**: maximum allows/possible timeout.
429
- - **Language**: which programming languages can be used to implement handlers.
430
- - **Footprint**: how many resources are used by the provider framework itself.
431
-
432
- **A NOTE ABOUT SINGLETONS**
433
-
434
- When defining resources for a custom resource provider, you will likely want to
435
- define them as a *stack singleton* so that only a single instance of the
436
- provider is created in your stack and which is used by all custom resources of
437
- that type.
438
-
439
- Here is a basic pattern for defining stack singletons in the CDK. The following
440
- examples ensures that only a single SNS topic is defined:
441
-
442
- ```ts
443
- function getOrCreate(scope: Construct): sns.Topic {
444
- const stack = Stack.of(scope);
445
- const uniqueid = 'GloballyUniqueIdForSingleton'; // For example, a UUID from `uuidgen`
446
- const existing = stack.node.tryFindChild(uniqueid);
447
- if (existing) {
448
- return existing as sns.Topic;
449
- }
450
- return new sns.Topic(stack, uniqueid);
451
- }
452
- ```
453
-
454
- #### Amazon SNS Topic
455
-
456
- Every time a resource event occurs (CREATE/UPDATE/DELETE), an SNS notification
457
- is sent to the SNS topic. Users must process these notifications (e.g. through a
458
- fleet of worker hosts) and submit success/failure responses to the
459
- CloudFormation service.
460
-
461
- > You only need to use this type of provider if your custom resource cannot run on AWS Lambda, for reasons other than the 15
462
- > minute timeout. If you are considering using this type of provider because you want to write a custom resource provider that may need
463
- > to wait for more than 15 minutes for the API calls to stabilize, have a look at the [`custom-resources`](#the-custom-resource-provider-framework) module first.
464
- >
465
- > Refer to the [CloudFormation Custom Resource documentation](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/template-custom-resources.html) for information on the contract your custom resource needs to adhere to.
466
-
467
- Set `serviceToken` to `topic.topicArn` in order to use this provider:
468
-
469
- ```ts
470
- const topic = new sns.Topic(this, 'MyProvider');
471
-
472
- new CustomResource(this, 'MyResource', {
473
- serviceToken: topic.topicArn
474
- });
475
- ```
476
-
477
- #### AWS Lambda Function
478
-
479
- An AWS lambda function is called *directly* by CloudFormation for all resource
480
- events. The handler must take care of explicitly submitting a success/failure
481
- response to the CloudFormation service and handle various error cases.
482
-
483
- > **We do not recommend you use this provider type.** The CDK has wrappers around Lambda Functions that make them easier to work with.
484
- >
485
- > If you do want to use this provider, refer to the [CloudFormation Custom Resource documentation](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/template-custom-resources.html) for information on the contract your custom resource needs to adhere to.
486
-
487
- Set `serviceToken` to `lambda.functionArn` to use this provider:
488
-
489
- ```ts
490
- const fn = new lambda.Function(this, 'MyProvider', functionProps);
491
-
492
- new CustomResource(this, 'MyResource', {
493
- serviceToken: fn.functionArn,
494
- });
495
- ```
496
-
497
- #### The `core.CustomResourceProvider` class
498
-
499
- The class [`@aws-cdk/core.CustomResourceProvider`] offers a basic low-level
500
- framework designed to implement simple and slim custom resource providers. It
501
- currently only supports Node.js-based user handlers, represents permissions as raw
502
- JSON blobs instead of `iam.PolicyStatement` objects, and it does not have
503
- support for asynchronous waiting (handler cannot exceed the 15min lambda
504
- timeout).
505
-
506
- [`@aws-cdk/core.CustomResourceProvider`]: https://docs.aws.amazon.com/cdk/api/latest/docs/@aws-cdk_core.CustomResourceProvider.html
507
-
508
- > **As an application builder, we do not recommend you use this provider type.** This provider exists purely for custom resources that are part of the AWS Construct Library.
509
- >
510
- > The [`custom-resources`](#the-custom-resource-provider-framework) provider is more convenient to work with and more fully-featured.
511
-
512
- The provider has a built-in singleton method which uses the resource type as a
513
- stack-unique identifier and returns the service token:
514
-
515
- ```ts
516
- const serviceToken = CustomResourceProvider.getOrCreate(this, 'Custom::MyCustomResourceType', {
517
- codeDirectory: `${__dirname}/my-handler`,
518
- runtime: CustomResourceProviderRuntime.NODEJS_14_X,
519
- description: "Lambda function created by the custom resource provider",
520
- });
521
-
522
- new CustomResource(this, 'MyResource', {
523
- resourceType: 'Custom::MyCustomResourceType',
524
- serviceToken: serviceToken
525
- });
526
- ```
527
-
528
- The directory (`my-handler` in the above example) must include an `index.js` file. It cannot import
529
- external dependencies or files outside this directory. It must export an async
530
- function named `handler`. This function accepts the CloudFormation resource
531
- event object and returns an object with the following structure:
532
-
533
- ```js
534
- exports.handler = async function(event) {
535
- const id = event.PhysicalResourceId; // only for "Update" and "Delete"
536
- const props = event.ResourceProperties;
537
- const oldProps = event.OldResourceProperties; // only for "Update"s
538
-
539
- switch (event.RequestType) {
540
- case "Create":
541
- // ...
542
-
543
- case "Update":
544
- // ...
545
-
546
- // if an error is thrown, a FAILED response will be submitted to CFN
547
- throw new Error('Failed!');
548
-
549
- case "Delete":
550
- // ...
551
- }
552
-
553
- return {
554
- // (optional) the value resolved from `resource.ref`
555
- // defaults to "event.PhysicalResourceId" or "event.RequestId"
556
- PhysicalResourceId: "REF",
557
-
558
- // (optional) calling `resource.getAtt("Att1")` on the custom resource in the CDK app
559
- // will return the value "BAR".
560
- Data: {
561
- Att1: "BAR",
562
- Att2: "BAZ"
563
- },
564
-
565
- // (optional) user-visible message
566
- Reason: "User-visible message",
567
-
568
- // (optional) hides values from the console
569
- NoEcho: true
570
- };
571
- }
572
- ```
573
-
574
- Here is an complete example of a custom resource that summarizes two numbers:
575
-
576
- `sum-handler/index.js`:
577
-
578
- ```js
579
- exports.handler = async (e) => {
580
- return {
581
- Data: {
582
- Result: e.ResourceProperties.lhs + e.ResourceProperties.rhs,
583
- },
584
- };
585
- };
586
- ```
587
-
588
- `sum.ts`:
589
-
590
- ```ts nofixture
591
- import {
592
- Construct,
593
- CustomResource,
594
- CustomResourceProvider,
595
- CustomResourceProviderRuntime,
596
- Token,
597
- } from 'aws-cdk-lib';
598
-
599
- export interface SumProps {
600
- readonly lhs: number;
601
- readonly rhs: number;
602
- }
603
-
604
- export class Sum extends Construct {
605
- public readonly result: number;
606
-
607
- constructor(scope: Construct, id: string, props: SumProps) {
608
- super(scope, id);
609
-
610
- const resourceType = 'Custom::Sum';
611
- const serviceToken = CustomResourceProvider.getOrCreate(this, resourceType, {
612
- codeDirectory: `${__dirname}/sum-handler`,
613
- runtime: CustomResourceProviderRuntime.NODEJS_14_X,
614
- });
615
-
616
- const resource = new CustomResource(this, 'Resource', {
617
- resourceType: resourceType,
618
- serviceToken: serviceToken,
619
- properties: {
620
- lhs: props.lhs,
621
- rhs: props.rhs
622
- }
623
- });
624
-
625
- this.result = Token.asNumber(resource.getAtt('Result'));
626
- }
627
- }
628
- ```
629
-
630
- Usage will look like this:
631
-
632
- ```ts fixture=README-custom-resource-provider
633
- const sum = new Sum(this, 'MySum', { lhs: 40, rhs: 2 });
634
- new CfnOutput(this, 'Result', { value: Token.asString(sum.result) });
635
- ```
636
-
637
- To access the ARN of the provider's AWS Lambda function role, use the `getOrCreateProvider()`
638
- built-in singleton method:
639
-
640
- ```ts
641
- const provider = CustomResourceProvider.getOrCreateProvider(this, 'Custom::MyCustomResourceType', {
642
- codeDirectory: `${__dirname}/my-handler`,
643
- runtime: CustomResourceProviderRuntime.NODEJS_14_X,
644
- });
645
-
646
- const roleArn = provider.roleArn;
647
- ```
648
-
649
- This role ARN can then be used in resource-based IAM policies.
650
-
651
- To add IAM policy statements to this role, use `addToRolePolicy()`:
652
-
653
- ```ts
654
- const provider = CustomResourceProvider.getOrCreateProvider(this, 'Custom::MyCustomResourceType', {
655
- codeDirectory: `${__dirname}/my-handler`,
656
- runtime: CustomResourceProviderRuntime.NODEJS_14_X,
657
- });
658
- provider.addToRolePolicy({
659
- Effect: 'Allow',
660
- Action: 's3:GetObject',
661
- Resource: '*',
662
- })
663
- ```
664
-
665
- Note that `addToRolePolicy()` uses direct IAM JSON policy blobs, *not* a
666
- `iam.PolicyStatement` object like you will see in the rest of the CDK.
667
-
668
- #### The Custom Resource Provider Framework
669
-
670
- The [`@aws-cdk/custom-resources`] module includes an advanced framework for
671
- implementing custom resource providers.
672
-
673
- [`@aws-cdk/custom-resources`]: https://docs.aws.amazon.com/cdk/api/latest/docs/custom-resources-readme.html
674
-
675
- Handlers are implemented as AWS Lambda functions, which means that they can be
676
- implemented in any Lambda-supported runtime. Furthermore, this provider has an
677
- asynchronous mode, which means that users can provide an `isComplete` lambda
678
- function which is called periodically until the operation is complete. This
679
- allows implementing providers that can take up to two hours to stabilize.
680
-
681
- Set `serviceToken` to `provider.serviceToken` to use this type of provider:
682
-
683
- ```ts
684
- const provider = new customresources.Provider(this, 'MyProvider', {
685
- onEventHandler,
686
- isCompleteHandler, // optional async waiter
687
- });
688
-
689
- new CustomResource(this, 'MyResource', {
690
- serviceToken: provider.serviceToken
691
- });
692
- ```
693
-
694
- See the [documentation](https://docs.aws.amazon.com/cdk/api/latest/docs/custom-resources-readme.html) for more details.
695
-
696
- ## AWS CloudFormation features
697
-
698
- A CDK stack synthesizes to an AWS CloudFormation Template. This section
699
- explains how this module allows users to access low-level CloudFormation
700
- features when needed.
701
-
702
- ### Stack Outputs
703
-
704
- CloudFormation [stack outputs][cfn-stack-output] and exports are created using
705
- the `CfnOutput` class:
706
-
707
- ```ts
708
- new CfnOutput(this, 'OutputName', {
709
- value: myBucket.bucketName,
710
- description: 'The name of an S3 bucket', // Optional
711
- exportName: 'TheAwesomeBucket', // Registers a CloudFormation export named "TheAwesomeBucket"
712
- });
713
- ```
714
-
715
- [cfn-stack-output]: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/outputs-section-structure.html
716
-
717
- ### Parameters
718
-
719
- CloudFormation templates support the use of [Parameters][cfn-parameters] to
720
- customize a template. They enable CloudFormation users to input custom values to
721
- a template each time a stack is created or updated. While the CDK design
722
- philosophy favors using build-time parameterization, users may need to use
723
- CloudFormation in a number of cases (for example, when migrating an existing
724
- stack to the AWS CDK).
725
-
726
- Template parameters can be added to a stack by using the `CfnParameter` class:
727
-
728
- ```ts
729
- new CfnParameter(this, 'MyParameter', {
730
- type: 'Number',
731
- default: 1337,
732
- // See the API reference for more configuration props
733
- });
734
- ```
735
-
736
- The value of parameters can then be obtained using one of the `value` methods.
737
- As parameters are only resolved at deployment time, the values obtained are
738
- placeholder tokens for the real value (`Token.isUnresolved()` would return `true`
739
- for those):
740
-
741
- ```ts
742
- const param = new CfnParameter(this, 'ParameterName', { /* config */ });
743
-
744
- // If the parameter is a String
745
- param.valueAsString;
746
-
747
- // If the parameter is a Number
748
- param.valueAsNumber;
749
-
750
- // If the parameter is a List
751
- param.valueAsList;
752
- ```
753
-
754
- [cfn-parameters]: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/parameters-section-structure.html
755
-
756
- ### Pseudo Parameters
757
-
758
- CloudFormation supports a number of [pseudo parameters][cfn-pseudo-params],
759
- which resolve to useful values at deployment time. CloudFormation pseudo
760
- parameters can be obtained from static members of the `Aws` class.
761
-
762
- It is generally recommended to access pseudo parameters from the scope's `stack`
763
- instead, which guarantees the values produced are qualifying the designated
764
- stack, which is essential in cases where resources are shared cross-stack:
765
-
766
- ```ts
767
- // "this" is the current construct
768
- const stack = Stack.of(this);
769
-
770
- stack.account; // Returns the AWS::AccountId for this stack (or the literal value if known)
771
- stack.region; // Returns the AWS::Region for this stack (or the literal value if known)
772
- stack.partition; // Returns the AWS::Partition for this stack (or the literal value if known)
773
- ```
774
-
775
- [cfn-pseudo-params]: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/pseudo-parameter-reference.html
776
-
777
- ### Resource Options
778
-
779
- CloudFormation resources can also specify [resource
780
- attributes][cfn-resource-attributes]. The `CfnResource` class allows
781
- accessing those through the `cfnOptions` property:
782
-
783
- ```ts
784
- const rawBucket = new s3.CfnBucket(this, 'Bucket', { /* ... */ });
785
- // -or-
786
- const rawBucketAlt = myBucket.node.defaultChild as s3.CfnBucket;
787
-
788
- // then
789
- rawBucket.cfnOptions.condition = new CfnCondition(this, 'EnableBucket', { /* ... */ });
790
- rawBucket.cfnOptions.metadata = {
791
- metadataKey: 'MetadataValue',
792
- };
793
- ```
794
-
795
- Resource dependencies (the `DependsOn` attribute) is modified using the
796
- `cfnResource.addDependsOn` method:
797
-
798
- ```ts
799
- const resourceA = new CfnResource(this, 'ResourceA', resourceProps);
800
- const resourceB = new CfnResource(this, 'ResourceB', resourceProps);
801
-
802
- resourceB.addDependsOn(resourceA);
803
- ```
804
-
805
- [cfn-resource-attributes]: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-product-attribute-reference.html
806
-
807
- ### Intrinsic Functions and Condition Expressions
808
-
809
- CloudFormation supports [intrinsic functions][cfn-intrinsics]. These functions
810
- can be accessed from the `Fn` class, which provides type-safe methods for each
811
- intrinsic function as well as condition expressions:
812
-
813
- ```ts
814
- declare const myObjectOrArray: any;
815
- declare const myArray: any;
816
-
817
- // To use Fn::Base64
818
- Fn.base64('SGVsbG8gQ0RLIQo=');
819
-
820
- // To compose condition expressions:
821
- const environmentParameter = new CfnParameter(this, 'Environment');
822
- Fn.conditionAnd(
823
- // The "Environment" CloudFormation template parameter evaluates to "Production"
824
- Fn.conditionEquals('Production', environmentParameter),
825
- // The AWS::Region pseudo-parameter value is NOT equal to "us-east-1"
826
- Fn.conditionNot(Fn.conditionEquals('us-east-1', Aws.REGION)),
827
- );
828
-
829
- // To use Fn::ToJsonString
830
- Fn.toJsonString(myObjectOrArray);
831
-
832
- // To use Fn::Length
833
- Fn.len(Fn.split(',', myArray));
834
- ```
835
-
836
- When working with deploy-time values (those for which `Token.isUnresolved`
837
- returns `true`), idiomatic conditionals from the programming language cannot be
838
- used (the value will not be known until deployment time). When conditional logic
839
- needs to be expressed with un-resolved values, it is necessary to use
840
- CloudFormation conditions by means of the `CfnCondition` class:
841
-
842
- ```ts
843
- const environmentParameter = new CfnParameter(this, 'Environment');
844
- const isProd = new CfnCondition(this, 'IsProduction', {
845
- expression: Fn.conditionEquals('Production', environmentParameter),
846
- });
847
-
848
- // Configuration value that is a different string based on IsProduction
849
- const stage = Fn.conditionIf(isProd.logicalId, 'Beta', 'Prod').toString();
850
-
851
- // Make Bucket creation condition to IsProduction by accessing
852
- // and overriding the CloudFormation resource
853
- const bucket = new s3.Bucket(this, 'Bucket');
854
- const cfnBucket = myBucket.node.defaultChild as s3.CfnBucket;
855
- cfnBucket.cfnOptions.condition = isProd;
856
- ```
857
-
858
- [cfn-intrinsics]: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/intrinsic-function-reference.html
859
-
860
- ### Mappings
861
-
862
- CloudFormation [mappings][cfn-mappings] are created and queried using the
863
- `CfnMappings` class:
864
-
865
- ```ts
866
- const regionTable = new CfnMapping(this, 'RegionTable', {
867
- mapping: {
868
- 'us-east-1': {
869
- regionName: 'US East (N. Virginia)',
870
- // ...
871
- },
872
- 'us-east-2': {
873
- regionName: 'US East (Ohio)',
874
- // ...
875
- },
876
- // ...
877
- }
878
- });
879
-
880
- regionTable.findInMap(Aws.REGION, 'regionName')
881
- ```
882
-
883
- This will yield the following template:
884
-
885
- ```yaml
886
- Mappings:
887
- RegionTable:
888
- us-east-1:
889
- regionName: US East (N. Virginia)
890
- us-east-2:
891
- regionName: US East (Ohio)
892
- ```
893
-
894
- Mappings can also be synthesized "lazily"; lazy mappings will only render a "Mappings"
895
- section in the synthesized CloudFormation template if some `findInMap` call is unable to
896
- immediately return a concrete value due to one or both of the keys being unresolved tokens
897
- (some value only available at deploy-time).
898
-
899
- For example, the following code will not produce anything in the "Mappings" section. The
900
- call to `findInMap` will be able to resolve the value during synthesis and simply return
901
- `'US East (Ohio)'`.
902
-
903
- ```ts
904
- const regionTable = new CfnMapping(this, 'RegionTable', {
905
- mapping: {
906
- 'us-east-1': {
907
- regionName: 'US East (N. Virginia)',
908
- },
909
- 'us-east-2': {
910
- regionName: 'US East (Ohio)',
911
- },
912
- },
913
- lazy: true,
914
- });
915
-
916
- regionTable.findInMap('us-east-2', 'regionName');
917
- ```
918
-
919
- On the other hand, the following code will produce the "Mappings" section shown above,
920
- since the top-level key is an unresolved token. The call to `findInMap` will return a token that resolves to
921
- `{ "Fn::FindInMap": [ "RegionTable", { "Ref": "AWS::Region" }, "regionName" ] }`.
922
-
923
- ```ts
924
- declare const regionTable: CfnMapping;
925
-
926
- regionTable.findInMap(Aws.REGION, 'regionName');
927
- ```
928
-
929
- [cfn-mappings]: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/mappings-section-structure.html
930
-
931
- ### Dynamic References
932
-
933
- CloudFormation supports [dynamically resolving][cfn-dynamic-references] values
934
- for SSM parameters (including secure strings) and Secrets Manager. Encoding such
935
- references is done using the `CfnDynamicReference` class:
936
-
937
- ```ts
938
- new CfnDynamicReference(
939
- CfnDynamicReferenceService.SECRETS_MANAGER,
940
- 'secret-id:secret-string:json-key:version-stage:version-id',
941
- );
942
- ```
943
-
944
- [cfn-dynamic-references]: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/dynamic-references.html
945
-
946
- ### Template Options & Transform
947
-
948
- CloudFormation templates support a number of options, including which Macros or
949
- [Transforms][cfn-transform] to use when deploying the stack. Those can be
950
- configured using the `stack.templateOptions` property:
951
-
952
- ```ts
953
- const stack = new Stack(app, 'StackName');
954
-
955
- stack.templateOptions.description = 'This will appear in the AWS console';
956
- stack.templateOptions.transforms = ['AWS::Serverless-2016-10-31'];
957
- stack.templateOptions.metadata = {
958
- metadataKey: 'MetadataValue',
959
- };
960
- ```
961
-
962
- [cfn-transform]: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/transform-section-structure.html
963
-
964
- ### Emitting Raw Resources
965
-
966
- The `CfnResource` class allows emitting arbitrary entries in the
967
- [Resources][cfn-resources] section of the CloudFormation template.
968
-
969
- ```ts
970
- new CfnResource(this, 'ResourceId', {
971
- type: 'AWS::S3::Bucket',
972
- properties: {
973
- BucketName: 'bucket-name'
974
- },
975
- });
976
- ```
977
-
978
- As for any other resource, the logical ID in the CloudFormation template will be
979
- generated by the AWS CDK, but the type and properties will be copied verbatim in
980
- the synthesized template.
981
-
982
- [cfn-resources]: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/resources-section-structure.html
983
-
984
- ### Including raw CloudFormation template fragments
985
-
986
- When migrating a CloudFormation stack to the AWS CDK, it can be useful to
987
- include fragments of an existing template verbatim in the synthesized template.
988
- This can be achieved using the `CfnInclude` class.
989
-
990
- ```ts
991
- new CfnInclude(this, 'ID', {
992
- template: {
993
- Resources: {
994
- Bucket: {
995
- Type: 'AWS::S3::Bucket',
996
- Properties: {
997
- BucketName: 'my-shiny-bucket'
998
- }
999
- }
1000
- }
1001
- },
1002
- });
1003
- ```
1004
-
1005
- ### Termination Protection
1006
-
1007
- You can prevent a stack from being accidentally deleted by enabling termination
1008
- protection on the stack. If a user attempts to delete a stack with termination
1009
- protection enabled, the deletion fails and the stack--including its status--remains
1010
- unchanged. Enabling or disabling termination protection on a stack sets it for any
1011
- nested stacks belonging to that stack as well. You can enable termination protection
1012
- on a stack by setting the `terminationProtection` prop to `true`.
1013
-
1014
- ```ts
1015
- const stack = new Stack(app, 'StackName', {
1016
- terminationProtection: true,
1017
- });
1018
- ```
1019
-
1020
- By default, termination protection is disabled.
1021
-
1022
- ### Description
1023
-
1024
- You can add a description of the stack in the same way as `StackProps`.
1025
-
1026
- ```ts
1027
- const stack = new Stack(app, 'StackName', {
1028
- description: 'This is a description.',
1029
- });
1030
- ```
1031
-
1032
- ### CfnJson
1033
-
1034
- `CfnJson` allows you to postpone the resolution of a JSON blob from
1035
- deployment-time. This is useful in cases where the CloudFormation JSON template
1036
- cannot express a certain value.
1037
-
1038
- A common example is to use `CfnJson` in order to render a JSON map which needs
1039
- to use intrinsic functions in keys. Since JSON map keys must be strings, it is
1040
- impossible to use intrinsics in keys and `CfnJson` can help.
1041
-
1042
- The following example defines an IAM role which can only be assumed by
1043
- principals that are tagged with a specific tag.
1044
-
1045
- ```ts
1046
- const tagParam = new CfnParameter(this, 'TagName');
1047
-
1048
- const stringEquals = new CfnJson(this, 'ConditionJson', {
1049
- value: {
1050
- [`aws:PrincipalTag/${tagParam.valueAsString}`]: true,
1051
- },
1052
- });
1053
-
1054
- const principal = new iam.AccountRootPrincipal().withConditions({
1055
- StringEquals: stringEquals,
1056
- });
1057
-
1058
- new iam.Role(this, 'MyRole', { assumedBy: principal });
1059
- ```
1060
-
1061
- **Explanation**: since in this example we pass the tag name through a parameter, it
1062
- can only be resolved during deployment. The resolved value can be represented in
1063
- the template through a `{ "Ref": "TagName" }`. However, since we want to use
1064
- this value inside a [`aws:PrincipalTag/TAG-NAME`](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_condition-keys.html#condition-keys-principaltag)
1065
- IAM operator, we need it in the *key* of a `StringEquals` condition. JSON keys
1066
- *must be* strings, so to circumvent this limitation, we use `CfnJson`
1067
- to "delay" the rendition of this template section to deploy-time. This means
1068
- that the value of `StringEquals` in the template will be `{ "Fn::GetAtt": [ "ConditionJson", "Value" ] }`, and will only "expand" to the operator we synthesized during deployment.
1069
-
1070
- ### Stack Resource Limit
1071
-
1072
- When deploying to AWS CloudFormation, it needs to keep in check the amount of resources being added inside a Stack. Currently it's possible to check the limits in the [AWS CloudFormation quotas](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/cloudformation-limits.html) page.
1073
-
1074
- It's possible to synthesize the project with more Resources than the allowed (or even reduce the number of Resources).
1075
-
1076
- Set the context key `@aws-cdk/core:stackResourceLimit` with the proper value, being 0 for disable the limit of resources.
1077
-
1078
- <!--END CORE DOCUMENTATION-->