@fjall/components-infrastructure 0.95.0 → 0.99.1
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/dist/lib/app.d.ts +90 -107
- package/dist/lib/app.js +149 -139
- package/dist/lib/config/aws/__t17fixture.d.ts +1 -0
- package/dist/lib/config/aws/__t17fixture.js +3 -0
- package/dist/lib/config/aws/__t17fixtureType.d.ts +2 -0
- package/dist/lib/config/aws/__t17fixtureType.js +1 -0
- package/dist/lib/config/aws/alarmTopic.js +8 -4
- package/dist/lib/config/aws/cloudTrail.js +1 -1
- package/dist/lib/config/aws/disasterRecovery.js +11 -16
- package/dist/lib/config/aws/ecrDefaultImage.d.ts +0 -1
- package/dist/lib/config/aws/ecrDefaultImage.js +13 -23
- package/dist/lib/config/aws/identityCenter.d.ts +10 -3
- package/dist/lib/config/aws/identityCenter.js +101 -37
- package/dist/lib/config/aws/identityCenterGroupMembership.js +8 -2
- package/dist/lib/config/aws/identityCenterMembership.d.ts +11 -0
- package/dist/lib/config/aws/identityCenterMembership.js +61 -0
- package/dist/lib/config/aws/index.d.ts +1 -1
- package/dist/lib/config/aws/index.js +1 -1
- package/dist/lib/config/aws/ipam.js +6 -11
- package/dist/lib/config/aws/oidcConnector.js +5 -1
- package/dist/lib/config/aws/scpPreset.js +4 -1
- package/dist/lib/patterns/aws/_eslint_test_tmp/leak.d.ts +1 -0
- package/dist/lib/patterns/aws/_eslint_test_tmp/leak.js +4 -0
- package/dist/lib/patterns/aws/account.js +7 -8
- package/dist/lib/patterns/aws/apexDomainPattern.js +10 -10
- package/dist/lib/patterns/aws/bastionFactory.d.ts +10 -0
- package/dist/lib/patterns/aws/bastionFactory.js +29 -0
- package/dist/lib/patterns/aws/buildkite.d.ts +2 -2
- package/dist/lib/patterns/aws/buildkite.js +51 -97
- package/dist/lib/patterns/aws/cdn.js +1 -1
- package/dist/lib/patterns/aws/clickhouseDatabase.d.ts +172 -0
- package/dist/lib/patterns/aws/clickhouseDatabase.js +600 -0
- package/dist/lib/patterns/aws/compute.d.ts +4 -6
- package/dist/lib/patterns/aws/compute.js +7 -13
- package/dist/lib/patterns/aws/computeEcs.d.ts +95 -396
- package/dist/lib/patterns/aws/computeEcs.js +880 -46
- package/dist/lib/patterns/aws/computeEcsTypes.d.ts +889 -0
- package/dist/lib/patterns/aws/computeEcsTypes.js +12 -0
- package/dist/lib/patterns/aws/computeLambda.d.ts +0 -5
- package/dist/lib/patterns/aws/computeLambda.js +1 -2
- package/dist/lib/patterns/aws/database.d.ts +50 -8
- package/dist/lib/patterns/aws/database.js +183 -27
- package/dist/lib/patterns/aws/domain.js +8 -7
- package/dist/lib/patterns/aws/index.d.ts +3 -0
- package/dist/lib/patterns/aws/index.js +3 -0
- package/dist/lib/patterns/aws/interfaces/compute.d.ts +13 -1
- package/dist/lib/patterns/aws/interfaces/connector.d.ts +1 -1
- package/dist/lib/patterns/aws/interfaces/connector.js +1 -1
- package/dist/lib/patterns/aws/interfaces/database.d.ts +187 -8
- package/dist/lib/patterns/aws/interfaces/database.js +17 -3
- package/dist/lib/patterns/aws/interfaces/index.d.ts +4 -2
- package/dist/lib/patterns/aws/interfaces/index.js +4 -2
- package/dist/lib/patterns/aws/interfaces/messaging.d.ts +7 -0
- package/dist/lib/patterns/aws/interfaces/migrationContributor.d.ts +47 -0
- package/dist/lib/patterns/aws/interfaces/migrationContributor.js +9 -0
- package/dist/lib/patterns/aws/interfaces/vpcPeer.d.ts +7 -0
- package/dist/lib/patterns/aws/interfaces/vpcPeer.js +1 -0
- package/dist/lib/patterns/aws/messaging.d.ts +66 -10
- package/dist/lib/patterns/aws/messaging.js +115 -20
- package/dist/lib/patterns/aws/network.js +16 -7
- package/dist/lib/patterns/aws/organisation.d.ts +4 -0
- package/dist/lib/patterns/aws/organisation.js +24 -5
- package/dist/lib/patterns/aws/storage.d.ts +1 -2
- package/dist/lib/patterns/aws/storage.js +3 -2
- package/dist/lib/patterns/aws/vpcPeer.d.ts +34 -0
- package/dist/lib/patterns/aws/vpcPeer.js +38 -0
- package/dist/lib/patterns/aws/vpcPeerAccepter.d.ts +29 -0
- package/dist/lib/patterns/aws/vpcPeerAccepter.js +196 -0
- package/dist/lib/resources/aws/analytics/clickhouse.js +25 -7
- package/dist/lib/resources/aws/analytics/clickhouseAlarms.d.ts +49 -0
- package/dist/lib/resources/aws/analytics/clickhouseAlarms.js +140 -0
- package/dist/lib/resources/aws/analytics/clickhouseConstants.d.ts +4 -4
- package/dist/lib/resources/aws/analytics/clickhouseConstants.js +6 -4
- package/dist/lib/resources/aws/analytics/clickhouseTypes.d.ts +12 -0
- package/dist/lib/resources/aws/analytics/clickhouseUserData.d.ts +1 -0
- package/dist/lib/resources/aws/analytics/clickhouseUserData.js +56 -5
- package/dist/lib/resources/aws/analytics/index.d.ts +2 -0
- package/dist/lib/resources/aws/analytics/index.js +1 -0
- package/dist/lib/resources/aws/base/awsStack.js +4 -2
- package/dist/lib/resources/aws/compute/__tmp__/regression-shape.d.ts +2 -0
- package/dist/lib/resources/aws/compute/__tmp__/regression-shape.js +11 -0
- package/dist/lib/resources/aws/compute/asgInlineLifecycleHook.d.ts +52 -0
- package/dist/lib/resources/aws/compute/asgInlineLifecycleHook.js +60 -0
- package/dist/lib/resources/aws/compute/blockDeviceVolume.d.ts +8 -0
- package/dist/lib/resources/aws/compute/blockDeviceVolume.js +10 -0
- package/dist/lib/resources/aws/compute/ec2.d.ts +132 -12
- package/dist/lib/resources/aws/compute/ec2.js +163 -23
- package/dist/lib/resources/aws/compute/ec2GracefulTerminationHandler.d.ts +41 -0
- package/dist/lib/resources/aws/compute/ec2GracefulTerminationHandler.js +194 -0
- package/dist/lib/resources/aws/compute/ec2GracefulTerminationLambda.source.cjs +458 -0
- package/dist/lib/resources/aws/compute/ecs.d.ts +27 -1
- package/dist/lib/resources/aws/compute/ecs.js +42 -2
- package/dist/lib/resources/aws/compute/ecsConstants.d.ts +9 -0
- package/dist/lib/resources/aws/compute/ecsConstants.js +16 -0
- package/dist/lib/resources/aws/compute/ecsImages.js +32 -20
- package/dist/lib/resources/aws/compute/ecsLifecycleHookMigration.d.ts +96 -0
- package/dist/lib/resources/aws/compute/ecsLifecycleHookMigration.js +113 -0
- package/dist/lib/resources/aws/compute/ecsNetworking.d.ts +2 -1
- package/dist/lib/resources/aws/compute/ecsNetworking.js +18 -6
- package/dist/lib/resources/aws/compute/ecsRemoteConnections.d.ts +38 -0
- package/dist/lib/resources/aws/compute/ecsRemoteConnections.js +80 -0
- package/dist/lib/resources/aws/compute/ecsServiceFactory.d.ts +13 -4
- package/dist/lib/resources/aws/compute/ecsServiceFactory.js +155 -33
- package/dist/lib/resources/aws/compute/ecsTaskDefinition.d.ts +31 -1
- package/dist/lib/resources/aws/compute/ecsTaskDefinition.js +110 -6
- package/dist/lib/resources/aws/compute/ecsTypes.d.ts +180 -13
- package/dist/lib/resources/aws/compute/ecsValidation.d.ts +9 -0
- package/dist/lib/resources/aws/compute/ecsValidation.js +63 -0
- package/dist/lib/resources/aws/compute/index.d.ts +2 -0
- package/dist/lib/resources/aws/compute/index.js +2 -0
- package/dist/lib/resources/aws/compute/lambda.d.ts +7 -13
- package/dist/lib/resources/aws/compute/lambda.js +30 -38
- package/dist/lib/resources/aws/compute/lifecycleHookLambda.source.cjs +192 -0
- package/dist/lib/resources/aws/compute/persistentDataVolume.d.ts +104 -0
- package/dist/lib/resources/aws/compute/persistentDataVolume.js +245 -0
- package/dist/lib/resources/aws/compute/persistentDataVolumeLambda.source.cjs +398 -0
- package/dist/lib/resources/aws/compute/samApplication.d.ts +15 -0
- package/dist/lib/resources/aws/compute/samApplication.js +27 -0
- package/dist/lib/resources/aws/database/clickhouseConstants.d.ts +159 -0
- package/dist/lib/resources/aws/database/clickhouseConstants.js +181 -0
- package/dist/lib/resources/aws/database/clickhouseSchemas.d.ts +71 -0
- package/dist/lib/resources/aws/database/clickhouseSchemas.js +157 -0
- package/dist/lib/resources/aws/database/clickhouseSecurityGroup.d.ts +14 -0
- package/dist/lib/resources/aws/database/clickhouseSecurityGroup.js +23 -0
- package/dist/lib/resources/aws/database/clickhouseUserData.d.ts +69 -0
- package/dist/lib/resources/aws/database/clickhouseUserData.js +371 -0
- package/dist/lib/resources/aws/database/clickhouseXmlRenderer.d.ts +56 -0
- package/dist/lib/resources/aws/database/clickhouseXmlRenderer.js +112 -0
- package/dist/lib/resources/aws/database/rdsAurora.d.ts +8 -1
- package/dist/lib/resources/aws/database/rdsAurora.js +42 -32
- package/dist/lib/resources/aws/database/rdsAuroraGlobal.d.ts +15 -2
- package/dist/lib/resources/aws/database/rdsAuroraGlobal.js +39 -43
- package/dist/lib/resources/aws/database/rdsDefaults.d.ts +6 -0
- package/dist/lib/resources/aws/database/rdsDefaults.js +7 -1
- package/dist/lib/resources/aws/database/rdsHelpers.d.ts +3 -3
- package/dist/lib/resources/aws/database/rdsHelpers.js +1 -0
- package/dist/lib/resources/aws/database/rdsInstance.d.ts +8 -1
- package/dist/lib/resources/aws/database/rdsInstance.js +51 -34
- package/dist/lib/resources/aws/database/rdsProxyOutput.d.ts +1 -1
- package/dist/lib/resources/aws/database/rdsProxyOutput.js +1 -1
- package/dist/lib/resources/aws/iam/delegationRole.js +12 -5
- package/dist/lib/resources/aws/iam/identityCenter/groupMembership.d.ts +9 -0
- package/dist/lib/resources/aws/iam/identityCenter/groupMembership.js +12 -0
- package/dist/lib/resources/aws/iam/identityCenter/index.d.ts +1 -0
- package/dist/lib/resources/aws/iam/identityCenter/index.js +1 -0
- package/dist/lib/resources/aws/iam/identityCenter/permissionSet.d.ts +1 -0
- package/dist/lib/resources/aws/iam/identityCenter/permissionSet.js +1 -0
- package/dist/lib/resources/aws/logging/logGroup.d.ts +0 -8
- package/dist/lib/resources/aws/logging/logGroup.js +0 -11
- package/dist/lib/resources/aws/messaging/defaultEventBus.d.ts +7 -0
- package/dist/lib/resources/aws/messaging/defaultEventBus.js +21 -0
- package/dist/lib/resources/aws/messaging/eventBridgeRule.d.ts +96 -0
- package/dist/lib/resources/aws/messaging/eventBridgeRule.js +110 -0
- package/dist/lib/resources/aws/messaging/eventTargets.d.ts +84 -0
- package/dist/lib/resources/aws/messaging/eventTargets.js +152 -0
- package/dist/lib/resources/aws/messaging/eventbridge.d.ts +25 -2
- package/dist/lib/resources/aws/messaging/eventbridge.js +22 -10
- package/dist/lib/resources/aws/messaging/index.d.ts +5 -0
- package/dist/lib/resources/aws/messaging/index.js +2 -0
- package/dist/lib/resources/aws/messaging/schedule.d.ts +118 -0
- package/dist/lib/resources/aws/messaging/schedule.js +64 -0
- package/dist/lib/resources/aws/messaging/sns.d.ts +2 -1
- package/dist/lib/resources/aws/messaging/sqs.d.ts +2 -1
- package/dist/lib/resources/aws/messaging/subscription.d.ts +112 -0
- package/dist/lib/resources/aws/messaging/subscription.js +67 -0
- package/dist/lib/resources/aws/messaging/utils.d.ts +6 -0
- package/dist/lib/resources/aws/messaging/utils.js +10 -0
- package/dist/lib/resources/aws/monitoring/clickhouseAlarms.d.ts +60 -0
- package/dist/lib/resources/aws/monitoring/clickhouseAlarms.js +139 -0
- package/dist/lib/resources/aws/monitoring/index.d.ts +2 -0
- package/dist/lib/resources/aws/monitoring/index.js +2 -0
- package/dist/lib/resources/aws/monitoring/scheduleAlarms.d.ts +47 -0
- package/dist/lib/resources/aws/monitoring/scheduleAlarms.js +106 -0
- package/dist/lib/resources/aws/networking/crossAccountDelegationRecord.js +6 -3
- package/dist/lib/resources/aws/networking/crossAccountReturnRoutes.d.ts +40 -0
- package/dist/lib/resources/aws/networking/crossAccountReturnRoutes.js +158 -0
- package/dist/lib/resources/aws/networking/dnsRecord/dnsRecordBase.js +7 -4
- package/dist/lib/resources/aws/networking/domainCertificate.d.ts +2 -2
- package/dist/lib/resources/aws/networking/domainCertificate.js +6 -3
- package/dist/lib/resources/aws/networking/hostedZone.js +6 -4
- package/dist/lib/resources/aws/networking/index.d.ts +3 -0
- package/dist/lib/resources/aws/networking/index.js +3 -0
- package/dist/lib/resources/aws/networking/serviceDiscovery.d.ts +96 -0
- package/dist/lib/resources/aws/networking/serviceDiscovery.js +96 -0
- package/dist/lib/resources/aws/networking/vpc.d.ts +4 -1
- package/dist/lib/resources/aws/networking/vpc.js +10 -3
- package/dist/lib/resources/aws/networking/vpcPeeringAccepterRole.d.ts +18 -0
- package/dist/lib/resources/aws/networking/vpcPeeringAccepterRole.js +61 -0
- package/dist/lib/resources/aws/networking/vpcPeeringConnection.d.ts +49 -0
- package/dist/lib/resources/aws/networking/vpcPeeringConnection.js +106 -0
- package/dist/lib/resources/aws/organisation/costAllocationTagActivator.d.ts +16 -5
- package/dist/lib/resources/aws/organisation/costAllocationTagActivator.js +17 -3
- package/dist/lib/resources/aws/organisation/index.d.ts +1 -1
- package/dist/lib/resources/aws/organisation/organisationPolicy.d.ts +2 -0
- package/dist/lib/resources/aws/organisation/organisationPolicy.js +3 -2
- package/dist/lib/resources/aws/secrets/secret.d.ts +7 -0
- package/dist/lib/resources/aws/secrets/secret.js +4 -3
- package/dist/lib/resources/aws/storage/bucketDeployment.d.ts +16 -0
- package/dist/lib/resources/aws/storage/bucketDeployment.js +17 -0
- package/dist/lib/resources/aws/storage/ecr.js +5 -5
- package/dist/lib/resources/aws/storage/index.d.ts +1 -0
- package/dist/lib/resources/aws/storage/index.js +1 -0
- package/dist/lib/resources/aws/storage/s3.js +10 -3
- package/dist/lib/resources/aws/utilities/customResource.js +18 -9
- package/dist/lib/synth_dump.d.ts +1 -0
- package/dist/lib/synth_dump.js +42 -0
- package/dist/lib/utils/bastionFactory.d.ts +10 -0
- package/dist/lib/utils/bastionFactory.js +29 -0
- package/dist/lib/utils/capitaliseString.d.ts +1 -1
- package/dist/lib/utils/capitaliseString.js +1 -1
- package/dist/lib/utils/cdkContext.d.ts +10 -0
- package/dist/lib/utils/cdkContext.js +13 -0
- package/dist/lib/utils/connections.d.ts +7 -1
- package/dist/lib/utils/connections.js +21 -0
- package/dist/lib/utils/connector.d.ts +30 -2
- package/dist/lib/utils/connector.js +6 -1
- package/dist/lib/utils/costAllocationTags.d.ts +15 -0
- package/dist/lib/utils/costAllocationTags.js +16 -0
- package/dist/lib/utils/databaseTypes.d.ts +14 -0
- package/dist/lib/utils/getConfig.d.ts +2 -0
- package/dist/lib/utils/getConfig.js +2 -0
- package/dist/lib/utils/index.d.ts +4 -0
- package/dist/lib/utils/index.js +4 -0
- package/dist/lib/utils/manifestWriter.d.ts +6 -89
- package/dist/lib/utils/manifestWriter.js +36 -23
- package/dist/lib/utils/migrationVersionResolvers.d.ts +2 -0
- package/dist/lib/utils/migrationVersionResolvers.js +2 -0
- package/dist/lib/utils/orgConfigParser.js +2 -1
- package/dist/lib/utils/resolveAlertsTopic.d.ts +14 -0
- package/dist/lib/utils/resolveAlertsTopic.js +30 -0
- package/dist/lib/utils/validationLogger.js +6 -3
- package/dist/lib/utils/vpcPeerInterface.d.ts +22 -0
- package/dist/lib/utils/vpcPeerInterface.js +1 -0
- package/package.json +22 -18
package/dist/lib/app.d.ts
CHANGED
|
@@ -8,7 +8,13 @@ import { type Ecr } from "./resources/aws/storage/ecr.js";
|
|
|
8
8
|
import { type AnyDatabase } from "./patterns/aws/database.js";
|
|
9
9
|
import { type INetworkProps, type Network } from "./patterns/aws/network.js";
|
|
10
10
|
import { type Cdn } from "./patterns/aws/cdn.js";
|
|
11
|
-
import { type
|
|
11
|
+
import { type VpcPeer } from "./patterns/aws/vpcPeer.js";
|
|
12
|
+
import { type VpcPeerAccepter } from "./patterns/aws/vpcPeerAccepter.js";
|
|
13
|
+
import { type AnyMessaging, type EventBusMessaging } from "./patterns/aws/messaging.js";
|
|
14
|
+
import { Schedule, type ScheduleProps } from "./resources/aws/messaging/schedule.js";
|
|
15
|
+
import { type RemovalPolicyString } from "./resources/aws/messaging/utils.js";
|
|
16
|
+
import { type ServiceRegistrationProps } from "./resources/aws/networking/serviceDiscovery.js";
|
|
17
|
+
import { type IPrivateDnsNamespace, type IService } from "aws-cdk-lib/aws-servicediscovery";
|
|
12
18
|
import { type AnyCompute } from "./patterns/aws/compute.js";
|
|
13
19
|
import { type Storage, type StorageFactoryFn } from "./patterns/aws/storage.js";
|
|
14
20
|
import { type AnyPattern } from "./patterns/aws/pattern.js";
|
|
@@ -61,6 +67,20 @@ export interface IAppOptions {
|
|
|
61
67
|
tunnel?: {
|
|
62
68
|
instanceType?: string;
|
|
63
69
|
} | boolean;
|
|
70
|
+
/**
|
|
71
|
+
* EventBridge default-bus override (T7a, D2 + D17).
|
|
72
|
+
*
|
|
73
|
+
* - `name?` overrides the AWS `EventBus.Name` (defaults to the app name).
|
|
74
|
+
* - `removalPolicy?` overrides the env-resolved default. Default resolves
|
|
75
|
+
* via `env({ default: "DESTROY", production: "RETAIN" })` per D17 — NOT
|
|
76
|
+
* `process.env.NODE_ENV` (which is not set during CDK synth in Fjall's
|
|
77
|
+
* deployment paths). The shape is the normalised string union per
|
|
78
|
+
* D18(d), NOT the raw CDK `RemovalPolicy` enum.
|
|
79
|
+
*/
|
|
80
|
+
eventBus?: {
|
|
81
|
+
name?: string;
|
|
82
|
+
removalPolicy?: RemovalPolicyString;
|
|
83
|
+
};
|
|
64
84
|
}
|
|
65
85
|
/**
|
|
66
86
|
* The basic corner-stone of all Fjall-hosted applications.
|
|
@@ -76,6 +96,9 @@ export declare class App extends CdkApp {
|
|
|
76
96
|
private vpc?;
|
|
77
97
|
private additionalVpcs;
|
|
78
98
|
private defaultEcr;
|
|
99
|
+
private defaultEventBus?;
|
|
100
|
+
private eventBusOverride?;
|
|
101
|
+
private defaultNamespace?;
|
|
79
102
|
private defaultAuditRole;
|
|
80
103
|
private auditRoleExternalId?;
|
|
81
104
|
private bastion?;
|
|
@@ -85,63 +108,19 @@ export declare class App extends CdkApp {
|
|
|
85
108
|
private resourceInventory?;
|
|
86
109
|
private manifestCollector;
|
|
87
110
|
private constructor();
|
|
88
|
-
/**
|
|
89
|
-
* Apply backup tier tag to all resources in the app.
|
|
90
|
-
* Maps tier names to AWS Backup plan tag values.
|
|
91
|
-
*/
|
|
92
111
|
private applyBackupTag;
|
|
93
|
-
/**
|
|
94
|
-
* Initialise the tunnel bastion in the network stack.
|
|
95
|
-
* Creates a minimal EC2 instance for SSM port forwarding to databases.
|
|
96
|
-
*/
|
|
97
112
|
private initialiseTunnel;
|
|
98
|
-
/**
|
|
99
|
-
* Initialise the network (VPC) for this application.
|
|
100
|
-
*/
|
|
101
113
|
private initialiseNetwork;
|
|
102
|
-
/**
|
|
103
|
-
* Get the application name.
|
|
104
|
-
* @returns {string} The application name
|
|
105
|
-
*/
|
|
106
114
|
getName(): string;
|
|
107
|
-
/**
|
|
108
|
-
* Get/Create a basic Fjall Application with standard tags applied.
|
|
109
|
-
*
|
|
110
|
-
* @param name Application name
|
|
111
|
-
* @param options Configuration options including network settings
|
|
112
|
-
* @returns {App}
|
|
113
|
-
*
|
|
114
|
-
* @example
|
|
115
|
-
* // Create app with new VPC
|
|
116
|
-
* const app = App.getApp(appName, {
|
|
117
|
-
* network: { maxAzs: 2, natGateways: false }
|
|
118
|
-
* });
|
|
119
|
-
*
|
|
120
|
-
* @example
|
|
121
|
-
* // Create app using existing VPC
|
|
122
|
-
* const app = App.getApp(appName, {
|
|
123
|
-
* network: { useExisting: "vpc-12345678" }
|
|
124
|
-
* });
|
|
125
|
-
*
|
|
126
|
-
* @example
|
|
127
|
-
* // Create app without network (S3-only apps)
|
|
128
|
-
* const app = App.getApp(appName, { network: false });
|
|
129
|
-
*/
|
|
130
115
|
static getApp(name?: string, options?: IAppOptions): App;
|
|
131
|
-
/**
|
|
132
|
-
* Get/Create the singleton instance of the App
|
|
133
|
-
* @param name Application name
|
|
134
|
-
* @param options Configuration options including network settings
|
|
135
|
-
* @returns {App}
|
|
136
|
-
*/
|
|
137
116
|
static getInstance(name?: string, options?: IAppOptions): App;
|
|
117
|
+
static resetForTesting(): void;
|
|
138
118
|
/**
|
|
139
119
|
* Retrieve a stack by key. If the stack does not exist, it will be created.
|
|
140
120
|
* Dependencies are only applied the first time a stack is created.
|
|
141
121
|
*
|
|
142
122
|
* @param key - The key of the stack
|
|
143
123
|
* @param dependencies - The stack(s) that this stack depends on
|
|
144
|
-
* @returns {AwsStack}
|
|
145
124
|
*/
|
|
146
125
|
getStack(key: string, dependencies?: AwsStack | AwsStack[]): AwsStack;
|
|
147
126
|
/**
|
|
@@ -149,23 +128,18 @@ export declare class App extends CdkApp {
|
|
|
149
128
|
*
|
|
150
129
|
* Only depends on Network. Database dependency is added automatically
|
|
151
130
|
* by CDK when compute resources reference database resources.
|
|
152
|
-
*
|
|
153
|
-
* @returns {AwsStack}
|
|
154
131
|
*/
|
|
155
132
|
getDefaultComputeStack(): AwsStack;
|
|
156
133
|
/**
|
|
157
134
|
* Retrieve default network stack - named as `${this.name}Network`
|
|
158
|
-
* @returns {AwsStack}
|
|
159
135
|
*/
|
|
160
136
|
getDefaultNetworkStack(): AwsStack;
|
|
161
137
|
/**
|
|
162
138
|
* Retrieve default database stack - named as `${this.name}Database`
|
|
163
|
-
* @returns {AwsStack}
|
|
164
139
|
*/
|
|
165
140
|
getDefaultDatabaseStack(): AwsStack;
|
|
166
141
|
/**
|
|
167
142
|
* Retrieve default storage stack - named as `${this.name}Storage`
|
|
168
|
-
* @returns {AwsStack}
|
|
169
143
|
*/
|
|
170
144
|
getDefaultStorageStack(): AwsStack;
|
|
171
145
|
/**
|
|
@@ -173,8 +147,6 @@ export declare class App extends CdkApp {
|
|
|
173
147
|
*
|
|
174
148
|
* Depends on Network. Compute/Storage dependencies are added automatically
|
|
175
149
|
* by CDK when CDN resources reference ALB or S3 bucket resources.
|
|
176
|
-
*
|
|
177
|
-
* @returns {AwsStack}
|
|
178
150
|
*/
|
|
179
151
|
getDefaultCdnStack(): AwsStack;
|
|
180
152
|
/**
|
|
@@ -183,8 +155,6 @@ export declare class App extends CdkApp {
|
|
|
183
155
|
* Used for SQS queues, SNS topics, and EventBridge event buses.
|
|
184
156
|
* Depends on Network only. These are regional services that don't
|
|
185
157
|
* require VPC, but we maintain consistent stack dependency patterns.
|
|
186
|
-
*
|
|
187
|
-
* @returns {AwsStack}
|
|
188
158
|
*/
|
|
189
159
|
getDefaultMessagingStack(): AwsStack;
|
|
190
160
|
/**
|
|
@@ -194,21 +164,42 @@ export declare class App extends CdkApp {
|
|
|
194
164
|
* Network must be configured via App.getApp() options or app.addNetwork().
|
|
195
165
|
*
|
|
196
166
|
* @param name - Optional name of the VPC to retrieve. If not provided, returns the default VPC.
|
|
197
|
-
* @returns {IVpc} The configured VPC
|
|
198
167
|
* @throws {Error} If network is disabled, not configured, or named VPC not found
|
|
199
168
|
*/
|
|
200
169
|
getVpc(name?: string): IVpc;
|
|
170
|
+
getVpcNames(): string[];
|
|
171
|
+
getDefaultContainerRegistry(): Ecr;
|
|
201
172
|
/**
|
|
202
|
-
*
|
|
173
|
+
* Lazy getter for the per-app default custom EventBridge bus (D2).
|
|
203
174
|
*
|
|
204
|
-
*
|
|
175
|
+
* Buses are recreatable in non-prod; the env-resolved default keeps prod
|
|
176
|
+
* history. The override (`App.getApp({ eventBus: { name?, removalPolicy? } })`)
|
|
177
|
+
* is consulted first; absent override falls back to the app name and the
|
|
178
|
+
* `env({ default: "DESTROY", production: "RETAIN" })` resolution per D17.
|
|
179
|
+
* NODE_ENV is not consulted — it is not set during CDK synth in Fjall's
|
|
180
|
+
* deployment paths.
|
|
205
181
|
*/
|
|
206
|
-
|
|
182
|
+
getEventBus(): EventBusMessaging;
|
|
207
183
|
/**
|
|
208
|
-
*
|
|
209
|
-
*
|
|
184
|
+
* Lazy getter for the per-app Cloud Map private DNS namespace (D7 + D29 of
|
|
185
|
+
* the ClickHouse Database Factory promotion design).
|
|
186
|
+
*
|
|
187
|
+
* The namespace is constructed in the network stack on first call and
|
|
188
|
+
* reused thereafter — `app.getNamespace() === app.getNamespace()`. Default
|
|
189
|
+
* name is `${toKebab(appName)}.local` per the implementation-defined
|
|
190
|
+
* derivation rule; v1 has no override config option (D29). Returns the
|
|
191
|
+
* `IPrivateDnsNamespace` interface per D18(a), never the concrete class.
|
|
210
192
|
*/
|
|
211
|
-
|
|
193
|
+
getNamespace(): IPrivateDnsNamespace;
|
|
194
|
+
/**
|
|
195
|
+
* Register a Cloud Map service against the per-app namespace. Lazily creates
|
|
196
|
+
* the namespace on first call (same construct as `getNamespace()`) and
|
|
197
|
+
* delegates to the `ServiceDiscoveryNamespace` wrapper's `registerService`
|
|
198
|
+
* — keeping both halves of Cloud Map (namespace + services) routed through
|
|
199
|
+
* the wrapper layer per § Wrapper Routing Discipline.
|
|
200
|
+
*/
|
|
201
|
+
registerService(props: ServiceRegistrationProps): IService;
|
|
202
|
+
private ensureNamespace;
|
|
212
203
|
/**
|
|
213
204
|
* Create a cross-account audit role in the Network stack that allows
|
|
214
205
|
* the Fjall platform to use CloudQuery for comprehensive AWS resource auditing.
|
|
@@ -218,18 +209,9 @@ export declare class App extends CdkApp {
|
|
|
218
209
|
*
|
|
219
210
|
* @param webappAccountId - Optional AWS account ID of the Fjall webapp. Defaults to configured platform account.
|
|
220
211
|
* @param externalId - Optional external ID for additional security. If not provided, a unique ID will be generated.
|
|
221
|
-
* @returns {Role} The created audit role
|
|
222
212
|
*/
|
|
223
213
|
createAuditRole(webappAccountId?: string, externalId?: string): Role;
|
|
224
|
-
/**
|
|
225
|
-
* Get the external ID used for the audit role
|
|
226
|
-
* @returns {string | undefined} The external ID if audit role has been created
|
|
227
|
-
*/
|
|
228
214
|
getAuditRoleExternalId(): string | undefined;
|
|
229
|
-
/**
|
|
230
|
-
* Generate a unique external ID for audit role
|
|
231
|
-
* Format: fjall-audit-{appName}-{timestamp}
|
|
232
|
-
*/
|
|
233
215
|
private generateAuditExternalId;
|
|
234
216
|
/**
|
|
235
217
|
* Add a compute resource to the default compute stack using the factory pattern.
|
|
@@ -255,10 +237,7 @@ export declare class App extends CdkApp {
|
|
|
255
237
|
* }));
|
|
256
238
|
* worker.getFunction("process"); // Available on LambdaCompute
|
|
257
239
|
*/
|
|
258
|
-
addCompute<T extends AnyCompute>(fn: (app: App, scope: Construct) => T): T;
|
|
259
|
-
/**
|
|
260
|
-
* Manually add a resource to the default compute stack.
|
|
261
|
-
*/
|
|
240
|
+
addCompute<T extends AnyCompute & Construct>(fn: (app: App, scope: Construct) => T): T;
|
|
262
241
|
addComputeResource(resource: Construct): void;
|
|
263
242
|
/**
|
|
264
243
|
* Add a database resource to the default database stack using the factory pattern.
|
|
@@ -280,10 +259,7 @@ export declare class App extends CdkApp {
|
|
|
280
259
|
* }));
|
|
281
260
|
* cache.getTableName(); // Available
|
|
282
261
|
*/
|
|
283
|
-
addDatabase<T extends AnyDatabase>(fn: (app: App, scope: Construct) => T): T;
|
|
284
|
-
/**
|
|
285
|
-
* Type guard for IConnectable — checks if a construct has a connections property.
|
|
286
|
-
*/
|
|
262
|
+
addDatabase<T extends AnyDatabase & Construct>(fn: (app: App, scope: Construct) => T): T;
|
|
287
263
|
private isConnectable;
|
|
288
264
|
/**
|
|
289
265
|
* Add a storage resource (S3) to the default storage stack using the factory pattern.
|
|
@@ -322,6 +298,22 @@ export declare class App extends CdkApp {
|
|
|
322
298
|
* }));
|
|
323
299
|
*/
|
|
324
300
|
addCdn(fn: (app: App, scope: Construct) => Cdn): Cdn;
|
|
301
|
+
/**
|
|
302
|
+
* Peer this app's VPC with a remote app's VPC.
|
|
303
|
+
*
|
|
304
|
+
* Creates the peering connection plus routes on both sides. The remote app
|
|
305
|
+
* must have deployed a `VpcPeerAccepter` first. Note: `app.getVpc(peerAppName)`
|
|
306
|
+
* does NOT return the peer's VPC — callers wanting the remote handle must use
|
|
307
|
+
* the returned `VpcPeer` instance.
|
|
308
|
+
*/
|
|
309
|
+
addVpcPeer(fn: (app: App, scope: Construct) => VpcPeer): VpcPeer;
|
|
310
|
+
/**
|
|
311
|
+
* Accept VPC peering requests from remote apps.
|
|
312
|
+
*
|
|
313
|
+
* Creates an IAM role for cross-account peering acceptance and return-route
|
|
314
|
+
* management, and publishes VPC metadata to SSM for discovery.
|
|
315
|
+
*/
|
|
316
|
+
addVpcPeerAccepter(fn: (app: App, scope: Construct) => VpcPeerAccepter): VpcPeerAccepter;
|
|
325
317
|
/**
|
|
326
318
|
* Add a messaging resource to the default queue stack using the factory pattern.
|
|
327
319
|
*
|
|
@@ -347,7 +339,22 @@ export declare class App extends CdkApp {
|
|
|
347
339
|
* contentBasedDeduplication: true
|
|
348
340
|
* }));
|
|
349
341
|
*/
|
|
350
|
-
addMessaging<T extends AnyMessaging>(fn: (app: App, scope: Construct) => T): T;
|
|
342
|
+
addMessaging<T extends AnyMessaging & Construct>(fn: (app: App, scope: Construct) => T): T;
|
|
343
|
+
/**
|
|
344
|
+
* Register an EventBridge schedule against a Fjall wrapper target.
|
|
345
|
+
*
|
|
346
|
+
* Defaults to the messaging stack; set `props.stackPlacement = "compute"`
|
|
347
|
+
* when the schedule's target lives in the compute stack and cross-stack
|
|
348
|
+
* output churn is undesired. `applicationId` is threaded automatically
|
|
349
|
+
* from `app.getName()` for alarm webhook routing per D13.
|
|
350
|
+
*
|
|
351
|
+
* @example
|
|
352
|
+
* app.addSchedule("MetricsCollection", {
|
|
353
|
+
* schedule: "rate(5 minutes)",
|
|
354
|
+
* target: notificationsQueue
|
|
355
|
+
* });
|
|
356
|
+
*/
|
|
357
|
+
addSchedule(id: string, props: Omit<ScheduleProps, "applicationId">): Schedule;
|
|
351
358
|
/**
|
|
352
359
|
* Add a high-level infrastructure pattern to the application.
|
|
353
360
|
*
|
|
@@ -375,7 +382,7 @@ export declare class App extends CdkApp {
|
|
|
375
382
|
* payload.getServer().getLambdaFunction().addEnvironment("CUSTOM", "value");
|
|
376
383
|
* payload.getCdn().getDistribution().addBehavior("/custom/*", customOrigin);
|
|
377
384
|
*/
|
|
378
|
-
addPattern<T extends AnyPattern>(fn: (app: App, scope: Construct) => T): T;
|
|
385
|
+
addPattern<T extends AnyPattern & Construct>(fn: (app: App, scope: Construct) => T): T;
|
|
379
386
|
/**
|
|
380
387
|
* Add an additional network (VPC) to the application.
|
|
381
388
|
*
|
|
@@ -383,7 +390,6 @@ export declare class App extends CdkApp {
|
|
|
383
390
|
* Additional VPCs can be retrieved by name using app.getVpc(name).
|
|
384
391
|
*
|
|
385
392
|
* @param fn - Factory function that creates the Network construct
|
|
386
|
-
* @returns {Network} The created Network construct
|
|
387
393
|
*
|
|
388
394
|
* @example
|
|
389
395
|
* const isolatedVpc = app.addNetwork(
|
|
@@ -391,21 +397,9 @@ export declare class App extends CdkApp {
|
|
|
391
397
|
* );
|
|
392
398
|
*/
|
|
393
399
|
addNetwork(fn: (app: App, scope: Construct) => Network): Network;
|
|
394
|
-
/**
|
|
395
|
-
* Manually add a resource to the default database stack.
|
|
396
|
-
*/
|
|
397
400
|
addDatabaseResource(resource: Construct): void;
|
|
398
|
-
/**
|
|
399
|
-
* Manually add a resource to the default storage stack.
|
|
400
|
-
*/
|
|
401
401
|
addStorageResource(resource: Construct): void;
|
|
402
|
-
/**
|
|
403
|
-
* Initialise standard tags
|
|
404
|
-
*/
|
|
405
402
|
private initialiseStandardTags;
|
|
406
|
-
/**
|
|
407
|
-
* Apply all tags using CDK's native Tags.of().add() API
|
|
408
|
-
*/
|
|
409
403
|
private applyTagsAspect;
|
|
410
404
|
/**
|
|
411
405
|
* Add custom tags to all resources in the app.
|
|
@@ -414,27 +408,16 @@ export declare class App extends CdkApp {
|
|
|
414
408
|
* @example
|
|
415
409
|
* app.addTags({
|
|
416
410
|
* "fjall:costAllocation:owner": "platform-team",
|
|
417
|
-
* "fjall:costAllocation:cost-
|
|
411
|
+
* "fjall:costAllocation:cost-centre": "CC-123",
|
|
418
412
|
* "team:slack-channel": "#platform-alerts"
|
|
419
413
|
* });
|
|
420
414
|
*/
|
|
421
415
|
addTags(tags: {
|
|
422
416
|
[key: string]: string;
|
|
423
417
|
}): App;
|
|
424
|
-
/**
|
|
425
|
-
* Export resource inventory collected during synthesis
|
|
426
|
-
* Call this after app.synth() to get complete resource inventory
|
|
427
|
-
* @returns {ResourceInventory} Complete inventory of all resources in the app
|
|
428
|
-
*/
|
|
418
|
+
/** Call after app.synth() — inventory is not available before synthesis. */
|
|
429
419
|
exportResourceInventory(): ResourceInventory;
|
|
430
|
-
/**
|
|
431
|
-
* Get the manifest collector for registering services and patterns.
|
|
432
|
-
* Used by ComputeFactory and PatternFactory to register their configurations.
|
|
433
|
-
*/
|
|
434
420
|
getManifestCollector(): ManifestCollector;
|
|
435
|
-
/**
|
|
436
|
-
* Override synth to automatically export resource inventory and manifest
|
|
437
|
-
*/
|
|
438
421
|
synth(options?: StageSynthesisOptions): CloudAssembly;
|
|
439
422
|
}
|
|
440
423
|
export default App;
|