@btc-embedded/cdk-extensions 0.22.3 → 0.22.5

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 (59) hide show
  1. package/.jsii +202 -85
  2. package/API.md +1838 -776
  3. package/CHANGELOG.md +24 -0
  4. package/lib/constructs/EventPipe.js +1 -1
  5. package/lib/constructs/ExportedService.js +1 -1
  6. package/lib/constructs/S3Bucket.js +1 -1
  7. package/lib/constructs/SecureRestApi.js +1 -1
  8. package/lib/constructs/SecureRestApiV2.js +1 -1
  9. package/lib/constructs/api-keys/ApiKeyClientAuthorization.js +1 -1
  10. package/lib/constructs/api-keys/ApiKeyManagement.js +1 -1
  11. package/lib/constructs/api-keys/ApiKeyPreTokenHandler.js +1 -1
  12. package/lib/constructs/api-keys/ApiKeyStore.js +1 -1
  13. package/lib/extensions/ApiGatewayExtension.js +1 -1
  14. package/lib/extensions/ApplicationContainer.d.ts +66 -0
  15. package/lib/extensions/ApplicationContainer.js +107 -0
  16. package/lib/extensions/ApplicationLoadBalancerExtension.js +1 -1
  17. package/lib/extensions/ApplicationLoadBalancerExtensionV2.js +1 -1
  18. package/lib/extensions/CloudMapExtension.js +1 -1
  19. package/lib/extensions/DeactivatableServiceExtension.js +1 -1
  20. package/lib/extensions/DeploymentConfigExtension.js +1 -1
  21. package/lib/extensions/DocumentDbAccessExtension.js +1 -1
  22. package/lib/extensions/DomainEventMessagingExtension.js +1 -1
  23. package/lib/extensions/EfsMountExtension.js +1 -1
  24. package/lib/extensions/ExtraContainerExtension.d.ts +16 -29
  25. package/lib/extensions/ExtraContainerExtension.js +30 -3
  26. package/lib/extensions/HTTPApiExtension.js +1 -1
  27. package/lib/extensions/LogExtension.js +1 -1
  28. package/lib/extensions/ModifyContainerDefinitionExtension.js +1 -1
  29. package/lib/extensions/ModifyTaskDefinitionExtension.js +1 -1
  30. package/lib/extensions/OpenIdExtension.js +1 -1
  31. package/lib/extensions/OpenTelemetryExtension.js +1 -1
  32. package/lib/extensions/PostgresDbAccessExtension.js +1 -1
  33. package/lib/extensions/SharedVolumeExtension.js +1 -1
  34. package/lib/extensions/TcpKeepAliveExtension.js +1 -1
  35. package/lib/extensions/container-common.d.ts +63 -0
  36. package/lib/extensions/container-common.js +3 -0
  37. package/lib/extensions/index.d.ts +2 -0
  38. package/lib/extensions/index.js +3 -1
  39. package/lib/platform/ApiGateway.js +1 -1
  40. package/lib/platform/ApiGatewayVpcLink.js +2 -2
  41. package/lib/platform/ApplicationLoadBalancer.js +1 -1
  42. package/lib/platform/ApplicationLoadBalancerV2.js +2 -2
  43. package/lib/platform/BTCLogGroup.js +1 -1
  44. package/lib/platform/CognitoUserPool.js +2 -2
  45. package/lib/platform/DefaultUserPoolClients.js +1 -1
  46. package/lib/platform/DocumentDB.js +2 -2
  47. package/lib/platform/EcsCluster.js +1 -1
  48. package/lib/platform/EfsFileSystem.js +1 -1
  49. package/lib/platform/HostedZone.js +1 -1
  50. package/lib/platform/PrivateDnsNamespace.js +1 -1
  51. package/lib/platform/ResourceServer.js +1 -1
  52. package/lib/platform/Vpc.js +1 -1
  53. package/lib/platform/VpcV2.js +1 -1
  54. package/lib/stacks/ApplicationStack.js +1 -1
  55. package/lib/utils/BasePlatformStackResolver.js +1 -1
  56. package/lib/utils/StackParameter.js +1 -1
  57. package/lib/utils/healthcheck.d.ts +43 -0
  58. package/lib/utils/healthcheck.js +59 -0
  59. package/package.json +1 -1
package/.jsii CHANGED
@@ -9969,6 +9969,64 @@
9969
9969
  ],
9970
9970
  "symbolId": "src/platform/CognitoUserPool:AppOpenIdParameters"
9971
9971
  },
9972
+ "@btc-embedded/cdk-extensions.ApplicationContainer": {
9973
+ "assembly": "@btc-embedded/cdk-extensions",
9974
+ "base": "@aws-cdk-containers/ecs-service-extensions.Container",
9975
+ "docs": {
9976
+ "example": "// Full health check control (escape hatch)\nnew ApplicationContainer({\n cpu: 1024,\n memoryMiB: 2048,\n image: EcrImage.fromDockerImageAsset(image),\n trafficPort: 3000,\n healthCheck: {\n command: ['CMD-SHELL', 'custom-health-check.sh'],\n interval: Duration.seconds(30),\n },\n});",
9977
+ "remarks": "This extension extends the upstream Container class and provides:\n1. Simplified health check API via `healthCheckEndpoint`\n2. Full access to all ContainerDefinitionOptions (user, privileged, workingDirectory, etc.)\n3. Drop-in replacement for Container with additional features\n\n**Replaces the need for:** Container + ModifyContainerDefinitionExtension",
9978
+ "stability": "experimental",
9979
+ "summary": "An application container with built-in support for simplified health checks and all container definition options."
9980
+ },
9981
+ "fqn": "@btc-embedded/cdk-extensions.ApplicationContainer",
9982
+ "initializer": {
9983
+ "docs": {
9984
+ "stability": "experimental"
9985
+ },
9986
+ "locationInModule": {
9987
+ "filename": "src/extensions/ApplicationContainer.ts",
9988
+ "line": 108
9989
+ },
9990
+ "parameters": [
9991
+ {
9992
+ "docs": {
9993
+ "summary": "The settings for the container."
9994
+ },
9995
+ "name": "props",
9996
+ "type": {
9997
+ "fqn": "@btc-embedded/cdk-extensions.ApplicationContainerProps"
9998
+ }
9999
+ }
10000
+ ]
10001
+ },
10002
+ "kind": "class",
10003
+ "locationInModule": {
10004
+ "filename": "src/extensions/ApplicationContainer.ts",
10005
+ "line": 107
10006
+ },
10007
+ "name": "ApplicationContainer",
10008
+ "symbolId": "src/extensions/ApplicationContainer:ApplicationContainer"
10009
+ },
10010
+ "@btc-embedded/cdk-extensions.ApplicationContainerProps": {
10011
+ "assembly": "@btc-embedded/cdk-extensions",
10012
+ "datatype": true,
10013
+ "docs": {
10014
+ "remarks": "**Required properties:**\n- cpu: How much CPU the container requires\n- memoryMiB: How much memory in megabytes the container requires\n- image: The image to run\n- trafficPort: What port the image listens for traffic on",
10015
+ "stability": "experimental",
10016
+ "summary": "Properties for ApplicationContainer. All properties from EnhancedContainerProps are supported."
10017
+ },
10018
+ "fqn": "@btc-embedded/cdk-extensions.ApplicationContainerProps",
10019
+ "interfaces": [
10020
+ "@btc-embedded/cdk-extensions.EnhancedContainerProps"
10021
+ ],
10022
+ "kind": "interface",
10023
+ "locationInModule": {
10024
+ "filename": "src/extensions/ApplicationContainer.ts",
10025
+ "line": 56
10026
+ },
10027
+ "name": "ApplicationContainerProps",
10028
+ "symbolId": "src/extensions/ApplicationContainer:ApplicationContainerProps"
10029
+ },
9972
10030
  "@btc-embedded/cdk-extensions.ApplicationLoadBalancer": {
9973
10031
  "assembly": "@btc-embedded/cdk-extensions",
9974
10032
  "base": "constructs.Construct",
@@ -12217,8 +12275,8 @@
12217
12275
  "fqn": "@btc-embedded/cdk-extensions.ContainerDependency",
12218
12276
  "kind": "interface",
12219
12277
  "locationInModule": {
12220
- "filename": "src/extensions/ExtraContainerExtension.ts",
12221
- "line": 11
12278
+ "filename": "src/extensions/container-common.ts",
12279
+ "line": 10
12222
12280
  },
12223
12281
  "name": "ContainerDependency",
12224
12282
  "properties": [
@@ -12230,8 +12288,8 @@
12230
12288
  },
12231
12289
  "immutable": true,
12232
12290
  "locationInModule": {
12233
- "filename": "src/extensions/ExtraContainerExtension.ts",
12234
- "line": 15
12291
+ "filename": "src/extensions/container-common.ts",
12292
+ "line": 14
12235
12293
  },
12236
12294
  "name": "ext",
12237
12295
  "type": {
@@ -12248,8 +12306,8 @@
12248
12306
  },
12249
12307
  "immutable": true,
12250
12308
  "locationInModule": {
12251
- "filename": "src/extensions/ExtraContainerExtension.ts",
12252
- "line": 24
12309
+ "filename": "src/extensions/container-common.ts",
12310
+ "line": 23
12253
12311
  },
12254
12312
  "name": "condition",
12255
12313
  "optional": true,
@@ -12258,67 +12316,7 @@
12258
12316
  }
12259
12317
  }
12260
12318
  ],
12261
- "symbolId": "src/extensions/ExtraContainerExtension:ContainerDependency"
12262
- },
12263
- "@btc-embedded/cdk-extensions.ContainerProps": {
12264
- "assembly": "@btc-embedded/cdk-extensions",
12265
- "datatype": true,
12266
- "docs": {
12267
- "stability": "experimental"
12268
- },
12269
- "fqn": "@btc-embedded/cdk-extensions.ContainerProps",
12270
- "interfaces": [
12271
- "aws-cdk-lib.aws_ecs.ContainerDefinitionOptions"
12272
- ],
12273
- "kind": "interface",
12274
- "locationInModule": {
12275
- "filename": "src/extensions/ExtraContainerExtension.ts",
12276
- "line": 27
12277
- },
12278
- "name": "ContainerProps",
12279
- "properties": [
12280
- {
12281
- "abstract": true,
12282
- "docs": {
12283
- "stability": "experimental",
12284
- "summary": "Specify additional container dependencies which should be added after the container has been created in the task definition."
12285
- },
12286
- "immutable": true,
12287
- "locationInModule": {
12288
- "filename": "src/extensions/ExtraContainerExtension.ts",
12289
- "line": 39
12290
- },
12291
- "name": "containerDependencies",
12292
- "optional": true,
12293
- "type": {
12294
- "collection": {
12295
- "elementtype": {
12296
- "fqn": "@btc-embedded/cdk-extensions.ContainerDependency"
12297
- },
12298
- "kind": "array"
12299
- }
12300
- }
12301
- },
12302
- {
12303
- "abstract": true,
12304
- "docs": {
12305
- "default": "- A log group is automatically created for you if the `ECS_SERVICE_EXTENSIONS_ENABLE_DEFAULT_LOG_DRIVER` feature flag is set.",
12306
- "stability": "experimental",
12307
- "summary": "The log group into which application container logs should be routed."
12308
- },
12309
- "immutable": true,
12310
- "locationInModule": {
12311
- "filename": "src/extensions/ExtraContainerExtension.ts",
12312
- "line": 33
12313
- },
12314
- "name": "logGroup",
12315
- "optional": true,
12316
- "type": {
12317
- "fqn": "aws-cdk-lib.aws_logs.ILogGroup"
12318
- }
12319
- }
12320
- ],
12321
- "symbolId": "src/extensions/ExtraContainerExtension:ContainerProps"
12319
+ "symbolId": "src/extensions/container-common:ContainerDependency"
12322
12320
  },
12323
12321
  "@btc-embedded/cdk-extensions.DeactivatableServiceExtension": {
12324
12322
  "assembly": "@btc-embedded/cdk-extensions",
@@ -14432,6 +14430,122 @@
14432
14430
  ],
14433
14431
  "symbolId": "src/extensions/EfsMountExtension:EfsMountExtensionProperties"
14434
14432
  },
14433
+ "@btc-embedded/cdk-extensions.EnhancedContainerProps": {
14434
+ "assembly": "@btc-embedded/cdk-extensions",
14435
+ "datatype": true,
14436
+ "docs": {
14437
+ "remarks": "This interface is used by both ApplicationContainer and ExtraContainerExtension\nto provide a consistent API for container configuration.",
14438
+ "stability": "experimental",
14439
+ "summary": "Enhanced container properties that combine the required props from Container with all options from ContainerDefinitionOptions."
14440
+ },
14441
+ "fqn": "@btc-embedded/cdk-extensions.EnhancedContainerProps",
14442
+ "interfaces": [
14443
+ "aws-cdk-lib.aws_ecs.ContainerDefinitionOptions"
14444
+ ],
14445
+ "kind": "interface",
14446
+ "locationInModule": {
14447
+ "filename": "src/extensions/container-common.ts",
14448
+ "line": 33
14449
+ },
14450
+ "name": "EnhancedContainerProps",
14451
+ "properties": [
14452
+ {
14453
+ "abstract": true,
14454
+ "docs": {
14455
+ "remarks": "Specify additional container dependencies which should be added after the\ncontainer has been created in the task definition.",
14456
+ "stability": "experimental",
14457
+ "summary": "Container dependencies (used by ExtraContainerExtension)."
14458
+ },
14459
+ "immutable": true,
14460
+ "locationInModule": {
14461
+ "filename": "src/extensions/container-common.ts",
14462
+ "line": 69
14463
+ },
14464
+ "name": "containerDependencies",
14465
+ "optional": true,
14466
+ "type": {
14467
+ "collection": {
14468
+ "elementtype": {
14469
+ "fqn": "@btc-embedded/cdk-extensions.ContainerDependency"
14470
+ },
14471
+ "kind": "array"
14472
+ }
14473
+ }
14474
+ },
14475
+ {
14476
+ "abstract": true,
14477
+ "docs": {
14478
+ "default": "- no health check",
14479
+ "remarks": "A curl-based health check will be auto-generated using the container's traffic port.\n\nExample: \"/health\" becomes:\n curl -f http://localhost:3000/health || exit 1\n\nCannot be used with `healthCheck`.",
14480
+ "stability": "experimental",
14481
+ "summary": "Simplified health check - just specify the HTTP endpoint path."
14482
+ },
14483
+ "immutable": true,
14484
+ "locationInModule": {
14485
+ "filename": "src/extensions/container-common.ts",
14486
+ "line": 62
14487
+ },
14488
+ "name": "healthCheckEndpoint",
14489
+ "optional": true,
14490
+ "type": {
14491
+ "primitive": "string"
14492
+ }
14493
+ },
14494
+ {
14495
+ "abstract": true,
14496
+ "docs": {
14497
+ "default": "- A log group is automatically created for you if the `ECS_SERVICE_EXTENSIONS_ENABLE_DEFAULT_LOG_DRIVER` feature flag is set.",
14498
+ "stability": "experimental",
14499
+ "summary": "The log group into which application container logs should be routed."
14500
+ },
14501
+ "immutable": true,
14502
+ "locationInModule": {
14503
+ "filename": "src/extensions/container-common.ts",
14504
+ "line": 49
14505
+ },
14506
+ "name": "logGroup",
14507
+ "optional": true,
14508
+ "type": {
14509
+ "fqn": "aws-cdk-lib.aws_logs.ILogGroup"
14510
+ }
14511
+ },
14512
+ {
14513
+ "abstract": true,
14514
+ "docs": {
14515
+ "stability": "experimental",
14516
+ "summary": "How much memory in megabytes the container requires."
14517
+ },
14518
+ "immutable": true,
14519
+ "locationInModule": {
14520
+ "filename": "src/extensions/container-common.ts",
14521
+ "line": 37
14522
+ },
14523
+ "name": "memoryMiB",
14524
+ "optional": true,
14525
+ "type": {
14526
+ "primitive": "number"
14527
+ }
14528
+ },
14529
+ {
14530
+ "abstract": true,
14531
+ "docs": {
14532
+ "stability": "experimental",
14533
+ "summary": "What port the image listens for traffic on."
14534
+ },
14535
+ "immutable": true,
14536
+ "locationInModule": {
14537
+ "filename": "src/extensions/container-common.ts",
14538
+ "line": 42
14539
+ },
14540
+ "name": "trafficPort",
14541
+ "optional": true,
14542
+ "type": {
14543
+ "primitive": "number"
14544
+ }
14545
+ }
14546
+ ],
14547
+ "symbolId": "src/extensions/container-common:EnhancedContainerProps"
14548
+ },
14435
14549
  "@btc-embedded/cdk-extensions.EnvironmentVariableNames": {
14436
14550
  "assembly": "@btc-embedded/cdk-extensions",
14437
14551
  "datatype": true,
@@ -15180,7 +15294,7 @@
15180
15294
  },
15181
15295
  "locationInModule": {
15182
15296
  "filename": "src/extensions/ExtraContainerExtension.ts",
15183
- "line": 57
15297
+ "line": 38
15184
15298
  },
15185
15299
  "parameters": [
15186
15300
  {
@@ -15203,7 +15317,7 @@
15203
15317
  "kind": "class",
15204
15318
  "locationInModule": {
15205
15319
  "filename": "src/extensions/ExtraContainerExtension.ts",
15206
- "line": 53
15320
+ "line": 34
15207
15321
  },
15208
15322
  "methods": [
15209
15323
  {
@@ -15214,7 +15328,7 @@
15214
15328
  },
15215
15329
  "locationInModule": {
15216
15330
  "filename": "src/extensions/ExtraContainerExtension.ts",
15217
- "line": 67
15331
+ "line": 48
15218
15332
  },
15219
15333
  "name": "useService",
15220
15334
  "overrides": "@aws-cdk-containers/ecs-service-extensions.ServiceExtension",
@@ -15243,7 +15357,7 @@
15243
15357
  },
15244
15358
  "locationInModule": {
15245
15359
  "filename": "src/extensions/ExtraContainerExtension.ts",
15246
- "line": 76
15360
+ "line": 57
15247
15361
  },
15248
15362
  "name": "useTaskDefinition",
15249
15363
  "overrides": "@aws-cdk-containers/ecs-service-extensions.ServiceExtension",
@@ -15266,7 +15380,7 @@
15266
15380
  "immutable": true,
15267
15381
  "locationInModule": {
15268
15382
  "filename": "src/extensions/ExtraContainerExtension.ts",
15269
- "line": 54
15383
+ "line": 35
15270
15384
  },
15271
15385
  "name": "containerName",
15272
15386
  "type": {
@@ -15280,7 +15394,7 @@
15280
15394
  "immutable": true,
15281
15395
  "locationInModule": {
15282
15396
  "filename": "src/extensions/ExtraContainerExtension.ts",
15283
- "line": 63
15397
+ "line": 44
15284
15398
  },
15285
15399
  "name": "dbAccess",
15286
15400
  "type": {
@@ -15294,7 +15408,7 @@
15294
15408
  "immutable": true,
15295
15409
  "locationInModule": {
15296
15410
  "filename": "src/extensions/ExtraContainerExtension.ts",
15297
- "line": 118
15411
+ "line": 115
15298
15412
  },
15299
15413
  "name": "healthCondition",
15300
15414
  "type": {
@@ -15308,7 +15422,7 @@
15308
15422
  "immutable": true,
15309
15423
  "locationInModule": {
15310
15424
  "filename": "src/extensions/ExtraContainerExtension.ts",
15311
- "line": 55
15425
+ "line": 36
15312
15426
  },
15313
15427
  "name": "props",
15314
15428
  "type": {
@@ -15328,34 +15442,37 @@
15328
15442
  "kind": "interface",
15329
15443
  "locationInModule": {
15330
15444
  "filename": "src/extensions/ExtraContainerExtension.ts",
15331
- "line": 42
15445
+ "line": 12
15332
15446
  },
15333
15447
  "name": "ExtraContainerExtensionProps",
15334
15448
  "properties": [
15335
15449
  {
15336
15450
  "abstract": true,
15337
15451
  "docs": {
15338
- "stability": "experimental"
15452
+ "stability": "experimental",
15453
+ "summary": "Container configuration using the enhanced container properties."
15339
15454
  },
15340
15455
  "immutable": true,
15341
15456
  "locationInModule": {
15342
15457
  "filename": "src/extensions/ExtraContainerExtension.ts",
15343
- "line": 43
15458
+ "line": 16
15344
15459
  },
15345
15460
  "name": "container",
15346
15461
  "type": {
15347
- "fqn": "@btc-embedded/cdk-extensions.ContainerProps"
15462
+ "fqn": "@btc-embedded/cdk-extensions.EnhancedContainerProps"
15348
15463
  }
15349
15464
  },
15350
15465
  {
15351
15466
  "abstract": true,
15352
15467
  "docs": {
15353
- "stability": "experimental"
15468
+ "default": "false",
15469
+ "stability": "experimental",
15470
+ "summary": "Whether this container needs database access."
15354
15471
  },
15355
15472
  "immutable": true,
15356
15473
  "locationInModule": {
15357
15474
  "filename": "src/extensions/ExtraContainerExtension.ts",
15358
- "line": 50
15475
+ "line": 31
15359
15476
  },
15360
15477
  "name": "dbAccess",
15361
15478
  "optional": true,
@@ -15366,14 +15483,14 @@
15366
15483
  {
15367
15484
  "abstract": true,
15368
15485
  "docs": {
15369
- "remarks": "Defaults to ContainerDependencyCondition.HEALTHY.",
15486
+ "default": "ContainerDependencyCondition.HEALTHY",
15370
15487
  "stability": "experimental",
15371
15488
  "summary": "Specify the condition when this container should be considered healthy such that the main container can start."
15372
15489
  },
15373
15490
  "immutable": true,
15374
15491
  "locationInModule": {
15375
15492
  "filename": "src/extensions/ExtraContainerExtension.ts",
15376
- "line": 49
15493
+ "line": 24
15377
15494
  },
15378
15495
  "name": "healthCheckCondition",
15379
15496
  "optional": true,
@@ -19658,6 +19775,6 @@
19658
19775
  "symbolId": "src/platform/VpcV2:VpcV2Props"
19659
19776
  }
19660
19777
  },
19661
- "version": "0.22.3",
19662
- "fingerprint": "3ye4Xlv2ACmAtam4xKpWFQAb5stOVxC+B8MIcw6Q2lE="
19778
+ "version": "0.22.5",
19779
+ "fingerprint": "Do5FlF/4SIHmmIY4cIwzbrjJRVR2mLVpJNbeoGyCFkk="
19663
19780
  }