@fjall/components-infrastructure 0.86.1 → 0.87.4
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.
- package/README.md +3 -3
- package/dist/lib/app.d.ts +166 -6
- package/dist/lib/app.js +212 -20
- package/dist/lib/aspects/resourceInventory.d.ts +4 -4
- package/dist/lib/aspects/resourceInventory.js +3 -3
- package/dist/lib/config/aws/backupGlobalSettings.js +1 -2
- package/dist/lib/config/aws/identityCenter.js +1 -5
- package/dist/lib/config/aws/organisation.js +1 -4
- package/dist/lib/index.d.ts +1 -0
- package/dist/lib/index.js +7 -1
- package/dist/lib/patterns/aws/buildkite.js +3 -2
- package/dist/lib/patterns/aws/cdn.d.ts +164 -0
- package/dist/lib/patterns/aws/cdn.js +264 -0
- package/dist/lib/patterns/aws/compute.d.ts +278 -59
- package/dist/lib/patterns/aws/compute.js +384 -188
- package/dist/lib/patterns/aws/connections.d.ts +46 -0
- package/dist/lib/patterns/aws/connections.js +159 -0
- package/dist/lib/patterns/aws/database.d.ts +124 -11
- package/dist/lib/patterns/aws/database.js +188 -66
- package/dist/lib/patterns/aws/hostedZone.js +1 -1
- package/dist/lib/patterns/aws/index.d.ts +3 -0
- package/dist/lib/patterns/aws/index.js +4 -1
- package/dist/lib/patterns/aws/interfaces/compute.d.ts +121 -0
- package/dist/lib/patterns/aws/interfaces/compute.js +48 -0
- package/dist/lib/patterns/aws/interfaces/connector.d.ts +183 -0
- package/dist/lib/patterns/aws/interfaces/connector.js +117 -0
- package/dist/lib/patterns/aws/interfaces/database.d.ts +136 -0
- package/dist/lib/patterns/aws/interfaces/database.js +65 -0
- package/dist/lib/patterns/aws/interfaces/index.d.ts +12 -0
- package/dist/lib/patterns/aws/interfaces/index.js +49 -0
- package/dist/lib/patterns/aws/interfaces/messaging.d.ts +146 -0
- package/dist/lib/patterns/aws/interfaces/messaging.js +56 -0
- package/dist/lib/patterns/aws/interfaces/pattern.d.ts +403 -0
- package/dist/lib/patterns/aws/interfaces/pattern.js +36 -0
- package/dist/lib/patterns/aws/interfaces/storage.d.ts +136 -0
- package/dist/lib/patterns/aws/interfaces/storage.js +48 -0
- package/dist/lib/patterns/aws/messaging.d.ts +183 -0
- package/dist/lib/patterns/aws/messaging.js +239 -0
- package/dist/lib/patterns/aws/network.js +4 -4
- package/dist/lib/patterns/aws/pattern.d.ts +67 -0
- package/dist/lib/patterns/aws/pattern.js +69 -0
- package/dist/lib/patterns/aws/payload.d.ts +87 -0
- package/dist/lib/patterns/aws/payload.js +526 -0
- package/dist/lib/patterns/aws/storage.d.ts +127 -15
- package/dist/lib/patterns/aws/storage.js +234 -38
- package/dist/lib/resources/aws/backup/backupPlan.js +1 -6
- package/dist/lib/resources/aws/backup/backupVault.js +1 -2
- package/dist/lib/resources/aws/base/awsStack.d.ts +0 -2
- package/dist/lib/resources/aws/base/awsStack.js +1 -7
- package/dist/lib/resources/aws/cdn/cloudFront.d.ts +71 -0
- package/dist/lib/resources/aws/cdn/cloudFront.js +176 -0
- package/dist/lib/resources/aws/cdn/index.d.ts +1 -0
- package/dist/lib/resources/aws/cdn/index.js +18 -0
- package/dist/lib/resources/aws/compute/ec2.d.ts +5 -0
- package/dist/lib/resources/aws/compute/ec2.js +33 -6
- package/dist/lib/resources/aws/compute/ecs.d.ts +32 -25
- package/dist/lib/resources/aws/compute/ecs.js +31 -115
- package/dist/lib/resources/aws/compute/lambda.d.ts +94 -5
- package/dist/lib/resources/aws/compute/lambda.js +209 -32
- package/dist/lib/resources/aws/database/database.js +1 -1
- package/dist/lib/resources/aws/database/dynamodb.d.ts +70 -0
- package/dist/lib/resources/aws/database/dynamodb.js +181 -0
- package/dist/lib/resources/aws/database/index.d.ts +1 -0
- package/dist/lib/resources/aws/database/index.js +2 -1
- package/dist/lib/resources/aws/database/migrationLambda.d.ts +80 -0
- package/dist/lib/resources/aws/database/migrationLambda.js +119 -0
- package/dist/lib/resources/aws/database/rdsAurora.d.ts +15 -0
- package/dist/lib/resources/aws/database/rdsAurora.js +41 -18
- package/dist/lib/resources/aws/database/rdsAuroraGlobal.js +12 -8
- package/dist/lib/resources/aws/database/rdsInstance.js +2 -2
- package/dist/lib/resources/aws/index.d.ts +2 -0
- package/dist/lib/resources/aws/index.js +3 -1
- package/dist/lib/resources/aws/messaging/eventbridge.d.ts +28 -0
- package/dist/lib/resources/aws/messaging/eventbridge.js +53 -0
- package/dist/lib/resources/aws/messaging/index.d.ts +3 -0
- package/dist/lib/resources/aws/messaging/index.js +20 -0
- package/dist/lib/resources/aws/messaging/sns.d.ts +35 -0
- package/dist/lib/resources/aws/messaging/sns.js +70 -0
- package/dist/lib/resources/aws/messaging/sqs.d.ts +105 -0
- package/dist/lib/resources/aws/messaging/sqs.js +231 -0
- package/dist/lib/resources/aws/messaging/utils.d.ts +3 -0
- package/dist/lib/resources/aws/messaging/utils.js +7 -0
- package/dist/lib/resources/aws/networking/ipam.js +1 -2
- package/dist/lib/resources/aws/networking/ipamPool.js +3 -2
- package/dist/lib/resources/aws/networking/vpc.js +1 -2
- package/dist/lib/resources/aws/storage/ecr.js +8 -5
- package/dist/lib/resources/aws/storage/s3.js +1 -2
- package/dist/lib/resources/aws/utilities/awsCustomResource.js +1 -1
- package/dist/lib/resources/aws/utilities/customResource.js +1 -1
- package/dist/lib/utils/getConfig.js +3 -2
- package/dist/lib/utils/index.d.ts +1 -0
- package/dist/lib/utils/index.js +2 -1
- package/dist/lib/utils/manifestWriter.d.ts +174 -0
- package/dist/lib/utils/manifestWriter.js +233 -0
- package/dist/lib/utils/standardTagsAspect.js +1 -8
- package/dist/lib/utils/validationLogger.d.ts +34 -0
- package/dist/lib/utils/validationLogger.js +83 -0
- package/package.json +6 -3
- package/dist/lib/__tests__/setup.d.ts +0 -48
- package/dist/lib/__tests__/setup.js +0 -1
- package/dist/lib/patterns/aws/cicdRole.d.ts +0 -67
- package/dist/lib/patterns/aws/cicdRole.js +0 -68
- package/dist/lib/resources/aws/cicd/cicdRole.d.ts +0 -65
- package/dist/lib/resources/aws/cicd/cicdRole.js +0 -191
- package/dist/lib/resources/aws/compute/ecsFreeTier.d.ts +0 -75
- package/dist/lib/resources/aws/compute/ecsFreeTier.js +0 -1
- package/dist/lib/resources/aws/compute/ecsSpot.d.ts +0 -75
- package/dist/lib/resources/aws/compute/ecsSpot.js +0 -1
- package/dist/lib/resources/aws/compute/utilities/capacityProviderDrainWaiter.d.ts +0 -20
- package/dist/lib/resources/aws/compute/utilities/capacityProviderDrainWaiter.js +0 -1
- package/dist/lib/resources/aws/utilities/cfnOutput.d.ts +0 -5
- package/dist/lib/resources/aws/utilities/cfnOutput.js +0 -1
|
@@ -8,6 +8,7 @@ import { Certificate } from "aws-cdk-lib/aws-certificatemanager";
|
|
|
8
8
|
import { type GeoLocation } from "aws-cdk-lib/aws-route53";
|
|
9
9
|
import { Repository } from "aws-cdk-lib/aws-ecr";
|
|
10
10
|
import { HostedZone as FjallHostedZone } from "../../../patterns/aws/hostedZone";
|
|
11
|
+
import { type ConnectionSpec } from "../../../patterns/aws/interfaces/connector.js";
|
|
11
12
|
import { type SecretImport } from "../secrets";
|
|
12
13
|
export declare enum Protocol {
|
|
13
14
|
HTTP = 0,
|
|
@@ -89,18 +90,18 @@ export interface EcsClusterContainerConfig {
|
|
|
89
90
|
port?: number;
|
|
90
91
|
/** Environment variables */
|
|
91
92
|
environment?: Record<string, string>;
|
|
92
|
-
/** Secrets imported from other resources (AWS Secrets Manager) */
|
|
93
|
-
secretsImport?: {
|
|
94
|
-
[key: string]: SecretImport;
|
|
95
|
-
};
|
|
96
93
|
/**
|
|
97
94
|
* Secrets from AWS SSM Parameter Store.
|
|
98
95
|
* Array of secret names that will be fetched from the service's SSM namespace.
|
|
99
96
|
*
|
|
100
97
|
* @example
|
|
101
|
-
*
|
|
98
|
+
* secrets: ["API_KEY", "DB_PASSWORD"]
|
|
102
99
|
*/
|
|
103
|
-
|
|
100
|
+
secrets?: string[];
|
|
101
|
+
/** Secrets imported from other CDK resources (AWS Secrets Manager) */
|
|
102
|
+
secretsImport?: {
|
|
103
|
+
[key: string]: SecretImport;
|
|
104
|
+
};
|
|
104
105
|
/** Command to run in the container */
|
|
105
106
|
command?: string[];
|
|
106
107
|
/** Entry point for the container */
|
|
@@ -216,10 +217,25 @@ export interface EcsServiceProps {
|
|
|
216
217
|
*/
|
|
217
218
|
taskRoleManagedPolicies?: IManagedPolicy[];
|
|
218
219
|
/**
|
|
219
|
-
* Resources this service needs to connect to (e.g., databases).
|
|
220
|
-
* Creates security group rules
|
|
220
|
+
* Resources this service needs to connect to (e.g., databases, S3 buckets, SQS queues).
|
|
221
|
+
* Creates security group rules for IConnectable resources and IAM grants for IAM resources.
|
|
222
|
+
*
|
|
223
|
+
* Supports:
|
|
224
|
+
* - IConnectable: Security group resources (RDS, ECS, etc.)
|
|
225
|
+
* - IStorageConnector: S3 buckets (IAM grants)
|
|
226
|
+
* - IDynamoDBConnector: DynamoDB tables (IAM grants)
|
|
227
|
+
* - IQueueConnector: SQS queues (IAM grants)
|
|
228
|
+
* - ConnectionConfig: Explicit access level configuration
|
|
229
|
+
*
|
|
230
|
+
* @example
|
|
231
|
+
* connections: [
|
|
232
|
+
* database, // Security group (RDS)
|
|
233
|
+
* { resource: cache, access: "read" }, // Read-only DynamoDB
|
|
234
|
+
* { resource: bucket, access: "write" }, // Write-only S3
|
|
235
|
+
* { resource: queue, access: "consume" } // Consume-only SQS
|
|
236
|
+
* ]
|
|
221
237
|
*/
|
|
222
|
-
connections?:
|
|
238
|
+
connections?: ConnectionSpec[];
|
|
223
239
|
/**
|
|
224
240
|
* Capacity provider for this service. REQUIRED.
|
|
225
241
|
* Each service specifies its own capacity provider.
|
|
@@ -233,21 +249,20 @@ export interface EcsServiceProps {
|
|
|
233
249
|
ec2Config?: Ec2CapacityConfig;
|
|
234
250
|
/**
|
|
235
251
|
* SSM Parameter Store path for secrets.
|
|
236
|
-
* If containers have
|
|
252
|
+
* If containers have secrets defined, this path is used as the base path.
|
|
237
253
|
* Format: /<app>/<cluster>/<service>
|
|
238
254
|
*
|
|
239
255
|
* @example
|
|
240
256
|
* ssmSecretsPath: "/myapp/api-cluster/users"
|
|
241
257
|
*/
|
|
242
258
|
ssmSecretsPath?: string;
|
|
243
|
-
/**
|
|
244
|
-
* Path to Dockerfile for building this service's image.
|
|
245
|
-
* Metadata for CLI build process, not used during CDK synthesis.
|
|
246
|
-
*/
|
|
247
|
-
dockerfilePath?: string;
|
|
248
259
|
/**
|
|
249
260
|
* Docker build target stage for multi-stage Dockerfiles.
|
|
250
|
-
*
|
|
261
|
+
* When specified, appends `-<target>` to the image tag.
|
|
262
|
+
*
|
|
263
|
+
* @example
|
|
264
|
+
* // With dockerTarget: "api", image tag becomes: myservice-api-latest
|
|
265
|
+
* dockerTarget: "api"
|
|
251
266
|
*/
|
|
252
267
|
dockerTarget?: string;
|
|
253
268
|
}
|
|
@@ -259,7 +274,7 @@ export type EcsClusterProps = {
|
|
|
259
274
|
clusterName: string;
|
|
260
275
|
/**
|
|
261
276
|
* Application name for SSM secrets namespace.
|
|
262
|
-
* Required when any container uses
|
|
277
|
+
* Required when any container uses secrets without explicit ssmSecretsPath.
|
|
263
278
|
* Used to build the path: /<appName>/<clusterName>/<serviceName>
|
|
264
279
|
*/
|
|
265
280
|
appName?: string;
|
|
@@ -375,14 +390,6 @@ export default class EcsCluster extends Construct implements IConnectable {
|
|
|
375
390
|
private registerServiceWithALB;
|
|
376
391
|
private buildRoutingConditions;
|
|
377
392
|
private addServiceScaling;
|
|
378
|
-
/**
|
|
379
|
-
* Checks if any service in the cluster uses EC2 capacity provider.
|
|
380
|
-
*/
|
|
381
|
-
private hasAnyEc2Service;
|
|
382
|
-
/**
|
|
383
|
-
* Checks if any service in the cluster uses Fargate capacity provider.
|
|
384
|
-
*/
|
|
385
|
-
private hasAnyFargateService;
|
|
386
393
|
/**
|
|
387
394
|
* Check if the VPC has NAT gateways.
|
|
388
395
|
* - For Fjall Vpc: uses hasNatGateways property
|