terraconstructs 0.0.11 → 0.0.12

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 (410) hide show
  1. package/.jsii +104486 -34582
  2. package/lib/aws/arn.js +1 -1
  3. package/lib/aws/aws-construct.d.ts +1 -1
  4. package/lib/aws/aws-construct.js +28 -2
  5. package/lib/aws/aws-stack.d.ts +2 -4
  6. package/lib/aws/aws-stack.js +21 -8
  7. package/lib/aws/aws-tags.d.ts +58 -0
  8. package/lib/aws/aws-tags.js +77 -0
  9. package/lib/aws/cloudwatch/actions/ec2.js +1 -1
  10. package/lib/aws/cloudwatch/actions/lambda.js +1 -1
  11. package/lib/aws/cloudwatch/alarm-base.js +1 -1
  12. package/lib/aws/cloudwatch/alarm-rule.js +1 -1
  13. package/lib/aws/cloudwatch/alarm-status-widget.js +1 -1
  14. package/lib/aws/cloudwatch/alarm.js +1 -1
  15. package/lib/aws/cloudwatch/composite-alarm.js +1 -1
  16. package/lib/aws/cloudwatch/dashboard.js +1 -1
  17. package/lib/aws/cloudwatch/data-protection-policy.js +3 -3
  18. package/lib/aws/cloudwatch/graph.js +8 -8
  19. package/lib/aws/cloudwatch/layout.js +3 -3
  20. package/lib/aws/cloudwatch/log-destinations/kinesis.js +1 -1
  21. package/lib/aws/cloudwatch/log-destinations/lambda.js +1 -1
  22. package/lib/aws/cloudwatch/log-group.js +1 -1
  23. package/lib/aws/cloudwatch/log-query.js +1 -1
  24. package/lib/aws/cloudwatch/log-stream.js +1 -1
  25. package/lib/aws/cloudwatch/metric-filter.d.ts +1 -1
  26. package/lib/aws/cloudwatch/metric-filter.js +4 -4
  27. package/lib/aws/cloudwatch/metric.js +2 -2
  28. package/lib/aws/cloudwatch/pattern.js +3 -3
  29. package/lib/aws/cloudwatch/policy.js +1 -1
  30. package/lib/aws/cloudwatch/private/env-tokens.js +5 -6
  31. package/lib/aws/cloudwatch/private/metric-util.js +4 -5
  32. package/lib/aws/cloudwatch/private/object.js +2 -3
  33. package/lib/aws/cloudwatch/private/rendering.js +3 -3
  34. package/lib/aws/cloudwatch/private/statistic.js +6 -7
  35. package/lib/aws/cloudwatch/query-definition.js +2 -2
  36. package/lib/aws/cloudwatch/stats.js +1 -1
  37. package/lib/aws/cloudwatch/subscription-filter.d.ts +1 -1
  38. package/lib/aws/cloudwatch/subscription-filter.js +4 -4
  39. package/lib/aws/cloudwatch/text.js +1 -1
  40. package/lib/aws/cloudwatch/variable.js +3 -3
  41. package/lib/aws/cloudwatch/widget.d.ts +1 -1
  42. package/lib/aws/cloudwatch/widget.js +4 -4
  43. package/lib/aws/compute/activity.js +3 -2
  44. package/lib/aws/compute/alb/application-listener-action.d.ts +334 -0
  45. package/lib/aws/compute/alb/application-listener-action.js +281 -0
  46. package/lib/aws/compute/alb/application-listener-certificate.d.ts +35 -0
  47. package/lib/aws/compute/alb/application-listener-certificate.js +35 -0
  48. package/lib/aws/compute/alb/application-listener-rule.d.ts +233 -0
  49. package/lib/aws/compute/alb/application-listener-rule.js +220 -0
  50. package/lib/aws/compute/alb/application-listener.d.ts +574 -0
  51. package/lib/aws/compute/alb/application-listener.js +538 -0
  52. package/lib/aws/compute/alb/application-load-balancer.d.ts +715 -0
  53. package/lib/aws/compute/alb/application-load-balancer.js +780 -0
  54. package/lib/aws/compute/alb/application-target-group.d.ts +339 -0
  55. package/lib/aws/compute/alb/application-target-group.js +427 -0
  56. package/lib/aws/compute/alb/conditions.d.ts +61 -0
  57. package/lib/aws/compute/alb/conditions.js +164 -0
  58. package/lib/aws/compute/alb/trust-store-revocation.d.ts +59 -0
  59. package/lib/aws/compute/alb/trust-store-revocation.js +46 -0
  60. package/lib/aws/compute/alb/trust-store.d.ts +86 -0
  61. package/lib/aws/compute/alb/trust-store.js +79 -0
  62. package/lib/aws/compute/architecture.js +1 -1
  63. package/lib/aws/compute/aspects/require-imdsv2-aspect.d.ts +75 -0
  64. package/lib/aws/compute/aspects/require-imdsv2-aspect.js +106 -0
  65. package/lib/aws/compute/bastion-host.d.ts +172 -0
  66. package/lib/aws/compute/bastion-host.js +114 -0
  67. package/lib/aws/compute/chain.js +1 -1
  68. package/lib/aws/compute/cidr-splits.d.ts +49 -0
  69. package/lib/aws/compute/cidr-splits.js +59 -0
  70. package/lib/aws/compute/client-vpn-authorization-rule.d.ts +43 -0
  71. package/lib/aws/compute/client-vpn-authorization-rule.js +30 -0
  72. package/lib/aws/compute/client-vpn-endpoint-types.d.ts +62 -0
  73. package/lib/aws/compute/client-vpn-endpoint-types.js +25 -0
  74. package/lib/aws/compute/client-vpn-endpoint.d.ts +239 -0
  75. package/lib/aws/compute/client-vpn-endpoint.js +259 -0
  76. package/lib/aws/compute/client-vpn-route.d.ts +67 -0
  77. package/lib/aws/compute/client-vpn-route.js +57 -0
  78. package/lib/aws/compute/condition.js +1 -1
  79. package/lib/aws/compute/connections.d.ts +137 -0
  80. package/lib/aws/compute/connections.js +208 -0
  81. package/lib/aws/compute/ec2-augmentations.generated.d.ts +53 -0
  82. package/lib/aws/compute/ec2-augmentations.generated.js +35 -0
  83. package/lib/aws/compute/ec2-canned-metrics.generated.d.ts +555 -0
  84. package/lib/aws/compute/ec2-canned-metrics.generated.js +681 -0
  85. package/lib/aws/compute/ec2-util-v2.d.ts +141 -0
  86. package/lib/aws/compute/ec2-util-v2.js +286 -0
  87. package/lib/aws/compute/ec2-util.d.ts +52 -0
  88. package/lib/aws/compute/ec2-util.js +138 -0
  89. package/lib/aws/compute/elasticloadbalancing-canned-metrics.generated.d.ts +176 -0
  90. package/lib/aws/compute/elasticloadbalancing-canned-metrics.generated.js +119 -0
  91. package/lib/aws/compute/elasticloadbalancingv2-canned-metrics.generated.d.ts +860 -0
  92. package/lib/aws/compute/elasticloadbalancingv2-canned-metrics.generated.js +597 -0
  93. package/lib/aws/compute/event-invoke-config.js +1 -1
  94. package/lib/aws/compute/event-source-filter.js +2 -2
  95. package/lib/aws/compute/event-source-mapping.js +1 -1
  96. package/lib/aws/compute/event-sources/s3-onfailure-destination.js +1 -1
  97. package/lib/aws/compute/event-sources/s3.js +1 -1
  98. package/lib/aws/compute/event-sources/sqs-dlq.js +1 -1
  99. package/lib/aws/compute/event-sources/sqs.js +1 -1
  100. package/lib/aws/compute/fields.js +4 -4
  101. package/lib/aws/compute/function-alias.js +1 -1
  102. package/lib/aws/compute/function-base.js +2 -2
  103. package/lib/aws/compute/function-destinations/event-bridge.js +1 -1
  104. package/lib/aws/compute/function-destinations/function.js +1 -1
  105. package/lib/aws/compute/function-destinations/sqs.js +1 -1
  106. package/lib/aws/compute/function-nodejs.js +1 -1
  107. package/lib/aws/compute/function-url.js +1 -1
  108. package/lib/aws/compute/function-vpc-config.generated.d.ts +3 -3
  109. package/lib/aws/compute/function-vpc-config.generated.js +1 -1
  110. package/lib/aws/compute/function.d.ts +1 -1
  111. package/lib/aws/compute/function.js +5 -5
  112. package/lib/aws/compute/index-alpha.d.ts +5 -0
  113. package/lib/aws/compute/index-alpha.js +22 -0
  114. package/lib/aws/compute/index.d.ts +60 -0
  115. package/lib/aws/compute/index.js +70 -2
  116. package/lib/aws/compute/instance-types.d.ts +1354 -0
  117. package/lib/aws/compute/instance-types.js +1683 -0
  118. package/lib/aws/compute/instance.d.ts +436 -0
  119. package/lib/aws/compute/instance.js +262 -0
  120. package/lib/aws/compute/ip-addresses.d.ts +249 -0
  121. package/lib/aws/compute/ip-addresses.js +248 -0
  122. package/lib/aws/compute/ipam.d.ts +309 -0
  123. package/lib/aws/compute/ipam.js +306 -0
  124. package/lib/aws/compute/key-pair.d.ts +178 -0
  125. package/lib/aws/compute/key-pair.js +194 -0
  126. package/lib/aws/compute/lambda-augmentations.generated.d.ts +65 -0
  127. package/lib/aws/compute/lambda-augmentations.generated.js +41 -0
  128. package/lib/aws/compute/lambda-canned-metrics.generated.d.ts +316 -0
  129. package/lib/aws/compute/lambda-canned-metrics.generated.js +119 -0
  130. package/lib/aws/compute/launch-template.d.ts +540 -0
  131. package/lib/aws/compute/launch-template.js +468 -0
  132. package/lib/aws/compute/lb-shared/access-logs-accounts.d.ts +7 -0
  133. package/lib/aws/compute/lb-shared/access-logs-accounts.js +46 -0
  134. package/lib/aws/compute/lb-shared/base-listener.d.ts +113 -0
  135. package/lib/aws/compute/lb-shared/base-listener.js +181 -0
  136. package/lib/aws/compute/lb-shared/base-load-balancer.d.ts +212 -0
  137. package/lib/aws/compute/lb-shared/base-load-balancer.js +290 -0
  138. package/lib/aws/compute/lb-shared/base-target-group.d.ts +382 -0
  139. package/lib/aws/compute/lb-shared/base-target-group.js +364 -0
  140. package/lib/aws/compute/lb-shared/enums.d.ts +282 -0
  141. package/lib/aws/compute/lb-shared/enums.js +301 -0
  142. package/lib/aws/compute/lb-shared/grid-lookup-types.d.ts +42 -0
  143. package/lib/aws/compute/lb-shared/grid-lookup-types.js +53 -0
  144. package/lib/aws/compute/lb-shared/imported.d.ts +24 -0
  145. package/lib/aws/compute/lb-shared/imported.js +27 -0
  146. package/lib/aws/compute/lb-shared/lb-listener-config.generated.d.ts +194 -0
  147. package/lib/aws/compute/lb-shared/lb-listener-config.generated.js +3 -0
  148. package/lib/aws/compute/lb-shared/lb-target-group-attachment-config.generated.d.ts +56 -0
  149. package/lib/aws/compute/lb-shared/lb-target-group-attachment-config.generated.js +3 -0
  150. package/lib/aws/compute/lb-shared/listener-action.d.ts +14 -0
  151. package/lib/aws/compute/lb-shared/listener-action.js +4 -0
  152. package/lib/aws/compute/lb-shared/listener-certificate.d.ts +28 -0
  153. package/lib/aws/compute/lb-shared/listener-certificate.js +29 -0
  154. package/lib/aws/compute/lb-shared/load-balancer-targets.d.ts +93 -0
  155. package/lib/aws/compute/lb-shared/load-balancer-targets.js +127 -0
  156. package/lib/aws/compute/lb-shared/util.d.ts +113 -0
  157. package/lib/aws/compute/lb-shared/util.js +264 -0
  158. package/lib/aws/compute/lb-targets/alb-target.d.ts +67 -0
  159. package/lib/aws/compute/lb-targets/alb-target.js +100 -0
  160. package/lib/aws/compute/lb-targets/index.d.ts +4 -0
  161. package/lib/aws/compute/lb-targets/index.js +22 -0
  162. package/lib/aws/compute/lb-targets/instance-target.d.ts +42 -0
  163. package/lib/aws/compute/lb-targets/instance-target.js +67 -0
  164. package/lib/aws/compute/lb-targets/ip-target.d.ts +55 -0
  165. package/lib/aws/compute/lb-targets/ip-target.js +79 -0
  166. package/lib/aws/compute/lb-targets/lambda-target.d.ts +25 -0
  167. package/lib/aws/compute/lb-targets/lambda-target.js +50 -0
  168. package/lib/aws/compute/load-balancer.d.ts +336 -0
  169. package/lib/aws/compute/load-balancer.js +287 -0
  170. package/lib/aws/compute/machine-image/amazon-linux-2022.d.ts +63 -0
  171. package/lib/aws/compute/machine-image/amazon-linux-2022.js +84 -0
  172. package/lib/aws/compute/machine-image/amazon-linux-2023.d.ts +63 -0
  173. package/lib/aws/compute/machine-image/amazon-linux-2023.js +84 -0
  174. package/lib/aws/compute/machine-image/amazon-linux2.d.ts +76 -0
  175. package/lib/aws/compute/machine-image/amazon-linux2.js +87 -0
  176. package/lib/aws/compute/machine-image/common.d.ts +181 -0
  177. package/lib/aws/compute/machine-image/common.js +122 -0
  178. package/lib/aws/compute/machine-image/index.d.ts +5 -0
  179. package/lib/aws/compute/machine-image/index.js +22 -0
  180. package/lib/aws/compute/machine-image/machine-image.d.ts +463 -0
  181. package/lib/aws/compute/machine-image/machine-image.js +566 -0
  182. package/lib/aws/compute/machine-image/utils.d.ts +2 -0
  183. package/lib/aws/compute/machine-image/utils.js +17 -0
  184. package/lib/aws/compute/nat.d.ts +325 -0
  185. package/lib/aws/compute/nat.js +455 -0
  186. package/lib/aws/compute/network-acl-types.d.ts +152 -0
  187. package/lib/aws/compute/network-acl-types.js +156 -0
  188. package/lib/aws/compute/network-acl.d.ts +285 -0
  189. package/lib/aws/compute/network-acl.js +207 -0
  190. package/lib/aws/compute/network-util.d.ts +116 -0
  191. package/lib/aws/compute/network-util.js +241 -0
  192. package/lib/aws/compute/nlb/network-listener-action.d.ts +92 -0
  193. package/lib/aws/compute/nlb/network-listener-action.js +146 -0
  194. package/lib/aws/compute/nlb/network-listener-certificate.d.ts +24 -0
  195. package/lib/aws/compute/nlb/network-listener-certificate.js +25 -0
  196. package/lib/aws/compute/nlb/network-listener.d.ts +248 -0
  197. package/lib/aws/compute/nlb/network-listener.js +217 -0
  198. package/lib/aws/compute/nlb/network-load-balancer.d.ts +315 -0
  199. package/lib/aws/compute/nlb/network-load-balancer.js +360 -0
  200. package/lib/aws/compute/nlb/network-target-group.d.ts +153 -0
  201. package/lib/aws/compute/nlb/network-target-group.js +223 -0
  202. package/lib/aws/compute/peer.d.ts +64 -0
  203. package/lib/aws/compute/peer.js +235 -0
  204. package/lib/aws/compute/placement-group.d.ts +161 -0
  205. package/lib/aws/compute/placement-group.js +133 -0
  206. package/lib/aws/compute/port.d.ts +287 -0
  207. package/lib/aws/compute/port.js +390 -0
  208. package/lib/aws/compute/prefix-list.d.ts +131 -0
  209. package/lib/aws/compute/prefix-list.js +114 -0
  210. package/lib/aws/compute/private/context-stub.d.ts +7 -0
  211. package/lib/aws/compute/private/context-stub.js +43 -0
  212. package/lib/aws/compute/private/ebs-util.d.ts +14 -0
  213. package/lib/aws/compute/private/ebs-util.js +145 -0
  214. package/lib/aws/compute/private/intrinstics.js +2 -1
  215. package/lib/aws/compute/private/json-path.js +8 -8
  216. package/lib/aws/compute/private/util.js +2 -3
  217. package/lib/aws/compute/route.d.ts +547 -0
  218. package/lib/aws/compute/route.js +469 -0
  219. package/lib/aws/compute/security-group.d.ts +414 -0
  220. package/lib/aws/compute/security-group.js +538 -0
  221. package/lib/aws/compute/state-graph.js +1 -1
  222. package/lib/aws/compute/state-machine-fragment.js +1 -1
  223. package/lib/aws/compute/state-machine.d.ts +2 -2
  224. package/lib/aws/compute/state-machine.js +14 -12
  225. package/lib/aws/compute/states/choice.js +1 -1
  226. package/lib/aws/compute/states/custom-state.js +1 -1
  227. package/lib/aws/compute/states/distributed-map/item-batcher.js +1 -1
  228. package/lib/aws/compute/states/distributed-map/item-reader.js +5 -5
  229. package/lib/aws/compute/states/distributed-map/result-writer.js +1 -1
  230. package/lib/aws/compute/states/distributed-map.js +1 -1
  231. package/lib/aws/compute/states/fail.js +1 -1
  232. package/lib/aws/compute/states/map-base.js +1 -1
  233. package/lib/aws/compute/states/map.js +1 -1
  234. package/lib/aws/compute/states/parallel.js +1 -1
  235. package/lib/aws/compute/states/pass.js +2 -2
  236. package/lib/aws/compute/states/state.js +5 -5
  237. package/lib/aws/compute/states/succeed.js +1 -1
  238. package/lib/aws/compute/states/task-base.js +2 -2
  239. package/lib/aws/compute/states/task.js +1 -1
  240. package/lib/aws/compute/states/wait.js +2 -2
  241. package/lib/aws/compute/stepfunctions-canned-metrics.generated.d.ts +83 -0
  242. package/lib/aws/compute/stepfunctions-canned-metrics.generated.js +127 -0
  243. package/lib/aws/compute/subnet-v2.d.ts +213 -0
  244. package/lib/aws/compute/subnet-v2.js +405 -0
  245. package/lib/aws/compute/subnet.d.ts +37 -0
  246. package/lib/aws/compute/subnet.js +181 -0
  247. package/lib/aws/compute/task-credentials.js +1 -1
  248. package/lib/aws/compute/task-input.js +1 -1
  249. package/lib/aws/compute/tasks/aws-sdk/call-aws-service.js +1 -1
  250. package/lib/aws/compute/tasks/eventbridge/put-events.js +1 -1
  251. package/lib/aws/compute/tasks/http/invoke.js +1 -1
  252. package/lib/aws/compute/tasks/lambda/invoke.js +1 -1
  253. package/lib/aws/compute/tasks/private/task-utils.js +3 -4
  254. package/lib/aws/compute/tasks/resource-arn-suffix.js +2 -3
  255. package/lib/aws/compute/tasks/sqs/send-message.js +1 -1
  256. package/lib/aws/compute/tasks/stepfunctions/invoke-activity.js +1 -1
  257. package/lib/aws/compute/tasks/stepfunctions/start-execution.js +1 -1
  258. package/lib/aws/compute/types.js +2 -2
  259. package/lib/aws/compute/user-data.d.ts +270 -0
  260. package/lib/aws/compute/user-data.js +487 -0
  261. package/lib/aws/compute/util.d.ts +1 -1
  262. package/lib/aws/compute/util.js +4 -5
  263. package/lib/aws/compute/volume.d.ts +480 -0
  264. package/lib/aws/compute/volume.js +426 -0
  265. package/lib/aws/compute/vpc-endpoint-service.d.ts +149 -0
  266. package/lib/aws/compute/vpc-endpoint-service.js +90 -0
  267. package/lib/aws/compute/vpc-endpoint.d.ts +742 -0
  268. package/lib/aws/compute/vpc-endpoint.js +811 -0
  269. package/lib/aws/compute/vpc-flow-logs.d.ts +551 -0
  270. package/lib/aws/compute/vpc-flow-logs.js +693 -0
  271. package/lib/aws/compute/vpc-lookup.d.ts +73 -0
  272. package/lib/aws/compute/vpc-lookup.js +3 -0
  273. package/lib/aws/compute/vpc-v2-base.d.ts +353 -0
  274. package/lib/aws/compute/vpc-v2-base.js +493 -0
  275. package/lib/aws/compute/vpc-v2.d.ts +385 -0
  276. package/lib/aws/compute/vpc-v2.js +408 -0
  277. package/lib/aws/compute/vpc.d.ts +1448 -0
  278. package/lib/aws/compute/vpc.js +1495 -0
  279. package/lib/aws/compute/vpn.d.ts +443 -0
  280. package/lib/aws/compute/vpn.js +397 -0
  281. package/lib/aws/compute/windows-versions.d.ts +418 -0
  282. package/lib/aws/compute/windows-versions.js +426 -0
  283. package/lib/aws/edge/certificate-base.d.ts +20 -0
  284. package/lib/aws/edge/certificate-base.js +28 -0
  285. package/lib/aws/edge/certificate.d.ts +23 -2
  286. package/lib/aws/edge/certificate.js +54 -4
  287. package/lib/aws/edge/distribution.js +3 -3
  288. package/lib/aws/edge/dns-alias-record-targets.js +2 -2
  289. package/lib/aws/edge/dns-record.js +16 -16
  290. package/lib/aws/edge/dns-zone.d.ts +20 -2
  291. package/lib/aws/edge/dns-zone.js +25 -10
  292. package/lib/aws/edge/function.js +2 -2
  293. package/lib/aws/edge/index.d.ts +1 -0
  294. package/lib/aws/edge/index.js +2 -1
  295. package/lib/aws/edge/key-value-store.js +4 -4
  296. package/lib/aws/edge/origin.js +7 -5
  297. package/lib/aws/edge/response-headers-policy.js +1 -1
  298. package/lib/aws/encryption/alias.js +1 -1
  299. package/lib/aws/encryption/key.js +1 -1
  300. package/lib/aws/encryption/via-service-principal.js +1 -1
  301. package/lib/aws/iam/grant.js +2 -2
  302. package/lib/aws/iam/index.d.ts +1 -0
  303. package/lib/aws/iam/index.js +2 -1
  304. package/lib/aws/iam/instance-profile.d.ts +155 -0
  305. package/lib/aws/iam/instance-profile.js +124 -0
  306. package/lib/aws/iam/managed-policy.js +1 -1
  307. package/lib/aws/iam/oidc-provider.js +1 -1
  308. package/lib/aws/iam/policy-document-config.generated.d.ts +8 -8
  309. package/lib/aws/iam/policy-document-config.generated.js +1 -1
  310. package/lib/aws/iam/policy-document.js +1 -1
  311. package/lib/aws/iam/policy-statement-props.generated.d.ts +8 -8
  312. package/lib/aws/iam/policy-statement-props.generated.js +1 -1
  313. package/lib/aws/iam/policy-statement.js +9 -9
  314. package/lib/aws/iam/policy.js +1 -1
  315. package/lib/aws/iam/principals.js +26 -26
  316. package/lib/aws/iam/private/assume-role-policy.js +2 -3
  317. package/lib/aws/iam/private/comparable-principal.js +2 -3
  318. package/lib/aws/iam/private/immutable-role.d.ts +2 -1
  319. package/lib/aws/iam/private/immutable-role.js +3 -3
  320. package/lib/aws/iam/private/imported-role.d.ts +1 -1
  321. package/lib/aws/iam/private/imported-role.js +3 -3
  322. package/lib/aws/iam/private/merge-statements.js +2 -3
  323. package/lib/aws/iam/private/util.js +4 -4
  324. package/lib/aws/iam/role.js +1 -1
  325. package/lib/aws/iam/saml-provider.d.ts +1 -1
  326. package/lib/aws/iam/saml-provider.js +6 -6
  327. package/lib/aws/iam/unknown-principal.js +1 -1
  328. package/lib/aws/iam/utils.js +2 -3
  329. package/lib/aws/index.d.ts +1 -0
  330. package/lib/aws/index.js +4 -1
  331. package/lib/aws/network/simple-ipv4-vpc.js +5 -5
  332. package/lib/aws/network/subnet-group.js +3 -3
  333. package/lib/aws/network/subnet.d.ts +1 -1
  334. package/lib/aws/network/subnet.js +7 -7
  335. package/lib/aws/notify/archive.js +3 -2
  336. package/lib/aws/notify/connection.js +5 -4
  337. package/lib/aws/notify/event-bus.js +5 -4
  338. package/lib/aws/notify/event-pattern.js +3 -3
  339. package/lib/aws/notify/index.js +3 -1
  340. package/lib/aws/notify/input.js +4 -3
  341. package/lib/aws/notify/kinesis-stream.js +3 -2
  342. package/lib/aws/notify/on-event-options.js +2 -1
  343. package/lib/aws/notify/queue-config.generated.d.ts +18 -11
  344. package/lib/aws/notify/queue-config.generated.js +1 -1
  345. package/lib/aws/notify/queue-policy.js +1 -1
  346. package/lib/aws/notify/queue.js +1 -1
  347. package/lib/aws/notify/resource-policy.js +1 -1
  348. package/lib/aws/notify/rule.js +3 -2
  349. package/lib/aws/notify/schedule.js +2 -2
  350. package/lib/aws/notify/sqs-augmentations.generated.d.ts +125 -0
  351. package/lib/aws/notify/sqs-augmentations.generated.js +74 -0
  352. package/lib/aws/notify/target.js +2 -1
  353. package/lib/aws/notify/targets/event-bus.js +1 -1
  354. package/lib/aws/notify/targets/function.js +1 -1
  355. package/lib/aws/notify/targets/log-group.js +2 -2
  356. package/lib/aws/notify/targets/sqs.js +1 -1
  357. package/lib/aws/notify/targets/state-machine.js +1 -1
  358. package/lib/aws/notify/targets/util.d.ts +1 -1
  359. package/lib/aws/notify/targets/util.js +10 -11
  360. package/lib/aws/notify/util.js +4 -4
  361. package/lib/aws/provider-config.generated.d.ts +33 -33
  362. package/lib/aws/provider-config.generated.js +1 -1
  363. package/lib/aws/storage/bucket-notifications.js +1 -1
  364. package/lib/aws/storage/bucket-policy.js +1 -1
  365. package/lib/aws/storage/bucket-source.js +1 -1
  366. package/lib/aws/storage/bucket.d.ts +298 -65
  367. package/lib/aws/storage/bucket.js +548 -225
  368. package/lib/aws/storage/cors-config.generated.d.ts +3 -3
  369. package/lib/aws/storage/cors-config.generated.js +1 -1
  370. package/lib/aws/storage/cors-rule-config.generated.d.ts +5 -5
  371. package/lib/aws/storage/cors-rule-config.generated.js +1 -1
  372. package/lib/aws/storage/index.d.ts +1 -0
  373. package/lib/aws/storage/index.js +2 -1
  374. package/lib/aws/storage/lifecycle-config.generated.d.ts +11 -11
  375. package/lib/aws/storage/lifecycle-config.generated.js +1 -1
  376. package/lib/aws/storage/notification-targets/function.js +6 -6
  377. package/lib/aws/storage/notification-targets/queue.js +1 -1
  378. package/lib/aws/storage/origin-access-identity.d.ts +1 -1
  379. package/lib/aws/storage/origin-access-identity.js +5 -4
  380. package/lib/aws/storage/parameter-util.d.ts +12 -0
  381. package/lib/aws/storage/parameter-util.js +65 -0
  382. package/lib/aws/storage/parameter.d.ts +526 -0
  383. package/lib/aws/storage/parameter.js +606 -0
  384. package/lib/aws/storage/s3-canned-metrics.generated.d.ts +22 -0
  385. package/lib/aws/storage/s3-canned-metrics.generated.js +23 -0
  386. package/lib/aws/storage/util.d.ts +25 -3
  387. package/lib/aws/storage/util.js +84 -17
  388. package/lib/aws/storage/website-config.generated.d.ts +5 -5
  389. package/lib/aws/storage/website-config.generated.js +1 -1
  390. package/lib/aws/util.js +2 -3
  391. package/lib/construct-base.d.ts +10 -1
  392. package/lib/construct-base.js +9 -6
  393. package/lib/duration.js +1 -1
  394. package/lib/expiration.d.ts +48 -0
  395. package/lib/expiration.js +68 -0
  396. package/lib/helpers-internal/index.d.ts +1 -0
  397. package/lib/helpers-internal/index.js +7 -0
  398. package/lib/index.d.ts +2 -0
  399. package/lib/index.js +3 -1
  400. package/lib/private/md5.d.ts +4 -0
  401. package/lib/private/md5.js +14 -0
  402. package/lib/private/unique-resource-name.js +3 -4
  403. package/lib/size.js +2 -2
  404. package/lib/stack-base.d.ts +4 -23
  405. package/lib/stack-base.js +9 -30
  406. package/lib/terra-func.d.ts +103 -0
  407. package/lib/terra-func.js +170 -0
  408. package/lib/token.js +5 -5
  409. package/package.json +15 -8
  410. package/bun.lockb +0 -0
@@ -0,0 +1,436 @@
1
+ import { instance } from "@cdktf/provider-aws";
2
+ import { Construct } from "constructs";
3
+ import { Duration } from "../../duration";
4
+ import { IAwsConstruct, AwsConstructBase } from "../aws-construct";
5
+ import { Connections, IConnectable } from "./connections";
6
+ import { InstanceType } from "./instance-types";
7
+ import { IKeyPair } from "./key-pair";
8
+ import { CpuCredits, InstanceInitiatedShutdownBehavior } from "./launch-template";
9
+ import { IMachineImage, OperatingSystemType } from "./machine-image";
10
+ import { IPlacementGroup } from "./placement-group";
11
+ import { ISecurityGroup } from "./security-group";
12
+ import { UserData } from "./user-data";
13
+ import { BlockDevice } from "./volume";
14
+ import { IVpc, SubnetSelection } from "./vpc";
15
+ import * as iam from "../iam";
16
+ /**
17
+ * Outputs which may be registered for output via the Grid.
18
+ */
19
+ export interface InstanceOutputs {
20
+ /**
21
+ * The instance's ID
22
+ *
23
+ * @attribute
24
+ */
25
+ readonly instanceId: string;
26
+ }
27
+ export interface IInstance extends IAwsConstruct, IConnectable, iam.IGrantable {
28
+ /** Strongly typed outputs */
29
+ readonly instanceOutputs: InstanceOutputs;
30
+ /**
31
+ * The instance's ID
32
+ *
33
+ * @attribute
34
+ */
35
+ readonly instanceId: string;
36
+ /**
37
+ * The availability zone the instance was launched in
38
+ *
39
+ * @attribute
40
+ */
41
+ readonly instanceAvailabilityZone: string;
42
+ /**
43
+ * Private DNS name for this instance
44
+ * @attribute
45
+ */
46
+ readonly instancePrivateDnsName: string;
47
+ /**
48
+ * Private IP for this instance
49
+ *
50
+ * @attribute
51
+ */
52
+ readonly instancePrivateIp: string;
53
+ /**
54
+ * Publicly-routable DNS name for this instance.
55
+ *
56
+ * (May be an empty string if the instance does not have a public name).
57
+ *
58
+ * @attribute
59
+ */
60
+ readonly instancePublicDnsName: string;
61
+ /**
62
+ * Publicly-routable IP address for this instance.
63
+ *
64
+ * (May be an empty string if the instance does not have a public IP).
65
+ *
66
+ * @attribute
67
+ */
68
+ readonly instancePublicIp: string;
69
+ }
70
+ /**
71
+ * Properties of an EC2 Instance
72
+ */
73
+ export interface InstanceProps {
74
+ /**
75
+ * Name of SSH keypair to grant access to instance
76
+ *
77
+ * @default - No SSH access will be possible.
78
+ * @deprecated - Use `keyPair` instead - https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_ec2-readme.html#using-an-existing-ec2-key-pair
79
+ */
80
+ readonly keyName?: string;
81
+ /**
82
+ * The SSH keypair to grant access to the instance.
83
+ *
84
+ * @default - No SSH access will be possible.
85
+ */
86
+ readonly keyPair?: IKeyPair;
87
+ /**
88
+ * Where to place the instance within the VPC
89
+ *
90
+ * @default - Private subnets.
91
+ */
92
+ readonly vpcSubnets?: SubnetSelection;
93
+ /**
94
+ * In which AZ to place the instance within the VPC
95
+ *
96
+ * @default - Random zone.
97
+ */
98
+ readonly availabilityZone?: string;
99
+ /**
100
+ * Whether the instance could initiate connections to anywhere by default.
101
+ * This property is only used when you do not provide a security group.
102
+ *
103
+ * @default true
104
+ */
105
+ readonly allowAllOutbound?: boolean;
106
+ /**
107
+ * Whether the instance could initiate IPv6 connections to anywhere by default.
108
+ * This property is only used when you do not provide a security group.
109
+ *
110
+ * @default false
111
+ */
112
+ readonly allowAllIpv6Outbound?: boolean;
113
+ /**
114
+ * The length of time to wait for the resourceSignalCount
115
+ *
116
+ * The maximum value is 43200 (12 hours).
117
+ *
118
+ * @default Duration.minutes(5)
119
+ */
120
+ readonly resourceSignalTimeout?: Duration;
121
+ /**
122
+ * VPC to launch the instance in.
123
+ */
124
+ readonly vpc: IVpc;
125
+ /**
126
+ * Security Group to assign to this instance
127
+ *
128
+ * @default - create new security group
129
+ */
130
+ readonly securityGroup?: ISecurityGroup;
131
+ /**
132
+ * Type of instance to launch
133
+ */
134
+ readonly instanceType: InstanceType;
135
+ /**
136
+ * AMI to launch
137
+ */
138
+ readonly machineImage: IMachineImage;
139
+ /**
140
+ * Specific UserData to use
141
+ *
142
+ * The UserData may still be mutated after creation.
143
+ *
144
+ * Updates to this field will trigger a stop/start of the EC2 instance by default.
145
+ *
146
+ * If userDataCausesReplacement is set then updates to this field will trigger
147
+ * a destroy and recreate of the EC2 instance.
148
+ *
149
+ * @default - A UserData object appropriate for the MachineImage's
150
+ * Operating System is created.
151
+ */
152
+ readonly userData?: UserData;
153
+ /**
154
+ * Changes to the UserData force replacement
155
+ *
156
+ * Depending the EC2 instance type, changing UserData either
157
+ * restarts the instance or replaces the instance.
158
+ *
159
+ * - Instance store-backed instances are replaced.
160
+ * - EBS-backed instances are restarted.
161
+ *
162
+ * By default, restarting does not execute the new UserData so you
163
+ * will need a different mechanism to ensure the instance is restarted.
164
+ *
165
+ * default - true
166
+ */
167
+ readonly userDataCausesReplacement?: boolean;
168
+ /**
169
+ * An IAM role to associate with the instance profile assigned to this Auto Scaling Group.
170
+ *
171
+ * The role must be assumable by the service principal `ec2.amazonaws.com`:
172
+ * Note: You can provide an instanceProfile or a role, but not both.
173
+ *
174
+ * @example
175
+ * const role = new iam.Role(this, 'MyRole', {
176
+ * assumedBy: new iam.ServicePrincipal('ec2.amazonaws.com')
177
+ * });
178
+ *
179
+ * @default - A role will automatically be created, it can be accessed via the `role` property
180
+ */
181
+ readonly role?: iam.IRole;
182
+ /**
183
+ * The instance profile used to pass role information to EC2 instances.
184
+ *
185
+ * Note: You can provide an instanceProfile or a role, but not both.
186
+ *
187
+ * @default - No instance profile
188
+ */
189
+ readonly instanceProfile?: iam.IInstanceProfile;
190
+ /**
191
+ * The name of the instance
192
+ *
193
+ * @default - CDK generated name
194
+ */
195
+ readonly instanceName?: string;
196
+ /**
197
+ * Specifies whether to enable an instance launched in a VPC to perform NAT.
198
+ * This controls whether source/destination checking is enabled on the instance.
199
+ * A value of true means that checking is enabled, and false means that checking is disabled.
200
+ * The value must be false for the instance to perform NAT.
201
+ *
202
+ * @default true
203
+ */
204
+ readonly sourceDestCheck?: boolean;
205
+ /**
206
+ * Specifies how block devices are exposed to the instance. You can specify virtual devices and EBS volumes.
207
+ *
208
+ * Each instance that is launched has an associated root device volume,
209
+ * either an Amazon EBS volume or an instance store volume.
210
+ * You can use block device mappings to specify additional EBS volumes or
211
+ * instance store volumes to attach to an instance when it is launched.
212
+ *
213
+ * @see https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/block-device-mapping-concepts.html
214
+ * @see https://registry.terraform.io/providers/hashicorp/aws/5.68.0/docs/resources/instance#ebs-ephemeral-and-root-block-devices
215
+ *
216
+ * @default - Uses the block device mapping of the AMI
217
+ */
218
+ readonly blockDevices?: BlockDevice[];
219
+ /**
220
+ * Defines a private IP address to associate with an instance.
221
+ *
222
+ * Private IP should be available within the VPC that the instance is build within.
223
+ *
224
+ * @default - no association
225
+ */
226
+ readonly privateIpAddress?: string;
227
+ /**
228
+ * Propagate the EC2 instance tags to the EBS volumes.
229
+ *
230
+ * Do not propagate tags if you plan to manage block device tags outside
231
+ * the `aws_instance` configuration, such as using `tags` in an `aws_ebs_volume`
232
+ * resource attached via `aws_volume_attachment`.
233
+ *
234
+ * Doing so will result in resource cycling and inconsistent behavior.
235
+ *
236
+ * @default - false
237
+ */
238
+ readonly propagateTagsToVolumeOnCreation?: boolean;
239
+ /**
240
+ * Whether IMDSv2 should be required on this instance.
241
+ *
242
+ * @default - false
243
+ */
244
+ readonly requireImdsv2?: boolean;
245
+ /**
246
+ * Whether "Detailed Monitoring" is enabled for this instance
247
+ * Keep in mind that Detailed Monitoring results in extra charges
248
+ *
249
+ * @see http://aws.amazon.com/cloudwatch/pricing/
250
+ * @default - false
251
+ */
252
+ readonly detailedMonitoring?: boolean;
253
+ /**
254
+ * Add SSM session permissions to the instance role
255
+ *
256
+ * Setting this to `true` adds the necessary permissions to connect
257
+ * to the instance using SSM Session Manager. You can do this
258
+ * from the AWS Console.
259
+ *
260
+ * NOTE: Setting this flag to `true` may not be enough by itself.
261
+ * You must also use an AMI that comes with the SSM Agent, or install
262
+ * the SSM Agent yourself. See
263
+ * [Working with SSM Agent](https://docs.aws.amazon.com/systems-manager/latest/userguide/ssm-agent.html)
264
+ * in the SSM Developer Guide.
265
+ *
266
+ * @default false
267
+ */
268
+ readonly ssmSessionPermissions?: boolean;
269
+ /**
270
+ * Whether to associate a public IP address to the primary network interface attached to this instance.
271
+ *
272
+ * You cannot specify this property and `ipv6AddressCount` at the same time.
273
+ *
274
+ * @default - public IP address is automatically assigned based on default behavior
275
+ */
276
+ readonly associatePublicIpAddress?: boolean;
277
+ /**
278
+ * Specifying the CPU credit type for burstable EC2 instance types (T2, T3, T3a, etc).
279
+ * The unlimited CPU credit option is not supported for T3 instances with a dedicated host.
280
+ *
281
+ * @default - T2 instances are standard, while T3, T4g, and T3a instances are unlimited.
282
+ */
283
+ readonly creditSpecification?: CpuCredits;
284
+ /**
285
+ * Indicates whether the instance is optimized for Amazon EBS I/O.
286
+ *
287
+ * This optimization provides dedicated throughput to Amazon EBS and an optimized configuration stack to provide optimal Amazon EBS I/O performance.
288
+ * This optimization isn't available with all instance types.
289
+ * Additional usage charges apply when using an EBS-optimized instance.
290
+ *
291
+ * @default false
292
+ */
293
+ readonly ebsOptimized?: boolean;
294
+ /**
295
+ * If true, the instance will not be able to be terminated using the Amazon EC2 console, CLI, or API.
296
+ *
297
+ * To change this attribute after launch, use [ModifyInstanceAttribute](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_ModifyInstanceAttribute.html).
298
+ * Alternatively, if you set InstanceInitiatedShutdownBehavior to terminate, you can terminate the instance
299
+ * by running the shutdown command from the instance.
300
+ *
301
+ * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-instance.html#cfn-ec2-instance-disableapitermination
302
+ *
303
+ * @default false
304
+ */
305
+ readonly disableApiTermination?: boolean;
306
+ /**
307
+ * Indicates whether an instance stops or terminates when you initiate shutdown from the instance
308
+ * (using the operating system command for system shutdown).
309
+ *
310
+ * @see https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/terminating-instances.html#Using_ChangingInstanceInitiatedShutdownBehavior
311
+ *
312
+ * @default InstanceInitiatedShutdownBehavior.STOP
313
+ */
314
+ readonly instanceInitiatedShutdownBehavior?: InstanceInitiatedShutdownBehavior;
315
+ /**
316
+ * The placement group that you want to launch the instance into.
317
+ *
318
+ * @default - no placement group will be used for this instance.
319
+ */
320
+ readonly placementGroup?: IPlacementGroup;
321
+ /**
322
+ * Whether the instance is enabled for AWS Nitro Enclaves.
323
+ *
324
+ * Nitro Enclaves requires a Nitro-based virtualized parent instance with specific Intel/AMD with at least 4 vCPUs
325
+ * or Graviton with at least 2 vCPUs instance types and Linux/Windows host OS,
326
+ * while the enclave itself supports only Linux OS.
327
+ *
328
+ * You can't set both `enclaveEnabled` and `hibernationEnabled` to true on the same instance.
329
+ *
330
+ * @see https://docs.aws.amazon.com/enclaves/latest/user/nitro-enclave.html#nitro-enclave-reqs
331
+ *
332
+ * @default - false
333
+ */
334
+ readonly enclaveEnabled?: boolean;
335
+ /**
336
+ * Whether the instance is enabled for hibernation.
337
+ *
338
+ * You can't set both `enclaveEnabled` and `hibernationEnabled` to true on the same instance.
339
+ *
340
+ * @see https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-instance-hibernationoptions.html
341
+ *
342
+ * @default - false
343
+ */
344
+ readonly hibernationEnabled?: boolean;
345
+ /**
346
+ * The number of IPv6 addresses to associate with the primary network interface.
347
+ *
348
+ * Amazon EC2 chooses the IPv6 addresses from the range of your subnet.
349
+ *
350
+ * You cannot specify this property and `associatePublicIpAddress` at the same time.
351
+ *
352
+ * @default - For instances associated with an IPv6 subnet, use 1; otherwise, use 0.
353
+ */
354
+ readonly ipv6AddressCount?: number;
355
+ }
356
+ /**
357
+ * This represents a single EC2 instance
358
+ */
359
+ export declare class Instance extends AwsConstructBase implements IInstance {
360
+ get instanceOutputs(): InstanceOutputs;
361
+ get outputs(): Record<string, any>;
362
+ /**
363
+ * The type of OS the instance is running.
364
+ */
365
+ readonly osType: OperatingSystemType;
366
+ /**
367
+ * Allows specify security group connections for the instance.
368
+ */
369
+ readonly connections: Connections;
370
+ /**
371
+ * The IAM role assumed by the instance.
372
+ */
373
+ readonly role: iam.IRole;
374
+ /**
375
+ * The principal to grant permissions to
376
+ */
377
+ readonly grantPrincipal: iam.IPrincipal;
378
+ /**
379
+ * UserData for the instance
380
+ */
381
+ readonly userData: UserData;
382
+ /**
383
+ * the underlying instance resource
384
+ */
385
+ readonly instance: instance.Instance;
386
+ /**
387
+ * the primary network inteface (if applicable)
388
+ */
389
+ private readonly primaryNetworkInterface?;
390
+ /**
391
+ * the primary network interface id.
392
+ */
393
+ readonly primaryNetworkInterfaceId: string;
394
+ /**
395
+ * @attribute
396
+ */
397
+ readonly instanceId: string;
398
+ /**
399
+ * @attribute
400
+ */
401
+ readonly instanceAvailabilityZone: string;
402
+ /**
403
+ * @attribute
404
+ */
405
+ readonly instancePrivateDnsName: string;
406
+ /**
407
+ * @attribute
408
+ */
409
+ readonly instancePrivateIp: string;
410
+ /**
411
+ * @attribute
412
+ */
413
+ readonly instancePublicDnsName: string;
414
+ /**
415
+ * @attribute
416
+ */
417
+ readonly instancePublicIp: string;
418
+ private readonly securityGroup;
419
+ private readonly securityGroups;
420
+ constructor(scope: Construct, id: string, props: InstanceProps);
421
+ /**
422
+ * Add the security group to the instance.
423
+ *
424
+ * @param securityGroup: The security group to add
425
+ */
426
+ addSecurityGroup(securityGroup: ISecurityGroup): void;
427
+ /**
428
+ * Add command to the startup script of the instance.
429
+ * The command must be in the scripting language supported by the instance's OS (i.e. Linux/Windows).
430
+ */
431
+ addUserData(...commands: string[]): void;
432
+ /**
433
+ * Adds a statement to the IAM role assumed by the instance.
434
+ */
435
+ addToRolePolicy(statement: iam.PolicyStatement): void;
436
+ }