@fjall/components-infrastructure 0.87.18 → 0.88.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 +13 -17
- package/dist/lib/app.js +56 -40
- package/dist/lib/config/aws/accountId.js +1 -2
- package/dist/lib/config/aws/backupGlobalSettings.js +1 -2
- package/dist/lib/config/aws/costAllocationTags.js +3 -4
- package/dist/lib/config/aws/identityCenter.js +1 -2
- package/dist/lib/config/aws/identityCenterGroupMembership.js +1 -6
- package/dist/lib/config/aws/index.d.ts +0 -1
- package/dist/lib/config/aws/index.js +1 -2
- package/dist/lib/config/aws/ipamDelegateAdmin.js +1 -2
- package/dist/lib/config/aws/ipamPoolId.js +1 -2
- package/dist/lib/config/aws/organisationId.js +1 -2
- package/dist/lib/config/aws/organisationsAccess.js +1 -2
- package/dist/lib/config/aws/ramSharing.js +1 -2
- package/dist/lib/patterns/aws/account.d.ts +12 -0
- package/dist/lib/patterns/aws/account.js +59 -0
- package/dist/lib/patterns/aws/buildkite.js +1 -2
- package/dist/lib/patterns/aws/cdn.d.ts +5 -10
- package/dist/lib/patterns/aws/cdn.js +5 -13
- package/dist/lib/patterns/aws/compute.d.ts +20 -3
- package/dist/lib/patterns/aws/compute.js +29 -5
- package/dist/lib/patterns/aws/database.d.ts +1 -1
- package/dist/lib/patterns/aws/database.js +16 -13
- package/dist/lib/patterns/aws/index.d.ts +4 -3
- package/dist/lib/patterns/aws/index.js +6 -4
- package/dist/lib/patterns/aws/interfaces/index.d.ts +2 -1
- package/dist/lib/patterns/aws/interfaces/index.js +8 -5
- package/dist/lib/patterns/aws/interfaces/organisation.d.ts +22 -0
- package/dist/lib/patterns/aws/interfaces/organisation.js +28 -0
- package/dist/lib/patterns/aws/interfaces/pattern.d.ts +5 -5
- package/dist/lib/patterns/aws/interfaces/pattern.js +1 -1
- package/dist/lib/patterns/aws/interfaces/storage.d.ts +10 -120
- package/dist/lib/patterns/aws/interfaces/storage.js +6 -43
- package/dist/lib/patterns/aws/organisation.d.ts +51 -0
- package/dist/lib/patterns/aws/organisation.js +150 -0
- package/dist/lib/patterns/aws/organisationFactory.d.ts +20 -0
- package/dist/lib/patterns/aws/organisationFactory.js +24 -0
- package/dist/lib/patterns/aws/pattern.d.ts +1 -1
- package/dist/lib/patterns/aws/pattern.js +1 -1
- package/dist/lib/patterns/aws/payload.d.ts +7 -5
- package/dist/lib/patterns/aws/payload.js +110 -51
- package/dist/lib/patterns/aws/platform.d.ts +11 -0
- package/dist/lib/patterns/aws/platform.js +29 -0
- package/dist/lib/patterns/aws/storage.d.ts +40 -125
- package/dist/lib/patterns/aws/storage.js +63 -191
- package/dist/lib/resources/aws/compute/ec2.d.ts +1 -1
- package/dist/lib/resources/aws/compute/ec2.js +3 -4
- package/dist/lib/resources/aws/compute/ecs.d.ts +6 -9
- package/dist/lib/resources/aws/compute/ecs.js +58 -26
- package/dist/lib/resources/aws/compute/lambda.d.ts +2 -0
- package/dist/lib/resources/aws/compute/lambda.js +11 -6
- package/dist/lib/resources/aws/database/rdsAurora.d.ts +1 -0
- package/dist/lib/resources/aws/database/rdsAurora.js +16 -16
- package/dist/lib/resources/aws/database/rdsAuroraGlobal.d.ts +1 -0
- package/dist/lib/resources/aws/database/rdsAuroraGlobal.js +14 -10
- package/dist/lib/resources/aws/database/rdsInstance.d.ts +5 -4
- package/dist/lib/resources/aws/database/rdsInstance.js +18 -7
- package/dist/lib/resources/aws/iam/identityCenter/assignment.js +1 -2
- package/dist/lib/resources/aws/iam/identityCenter/attachManagedPolicy.js +1 -2
- package/dist/lib/resources/aws/iam/identityCenter/group.js +1 -4
- package/dist/lib/resources/aws/iam/identityCenter/permissionSet.js +1 -4
- package/dist/lib/resources/aws/index.d.ts +1 -0
- package/dist/lib/resources/aws/index.js +2 -1
- package/dist/lib/resources/aws/logging/cloudTrail.js +7 -4
- package/dist/lib/resources/aws/networking/ipamPool.js +21 -3
- package/dist/lib/resources/aws/organisation/index.d.ts +4 -0
- package/dist/lib/resources/aws/organisation/index.js +10 -0
- package/dist/lib/resources/aws/organisation/organisation.d.ts +12 -0
- package/dist/lib/resources/aws/organisation/organisation.js +14 -0
- package/dist/lib/resources/aws/organisation/organisationAccount.d.ts +18 -0
- package/dist/lib/resources/aws/organisation/organisationAccount.js +31 -0
- package/dist/lib/resources/aws/organisation/organisationPolicy.d.ts +13 -0
- package/dist/lib/resources/aws/organisation/organisationPolicy.js +32 -0
- package/dist/lib/resources/aws/organisation/organisationalUnit.d.ts +10 -0
- package/dist/lib/resources/aws/organisation/organisationalUnit.js +9 -0
- package/dist/lib/resources/aws/secrets/kms.js +10 -7
- package/dist/lib/resources/aws/secrets/parameter.js +1 -2
- package/dist/lib/resources/aws/storage/ecr.d.ts +3 -1
- package/dist/lib/resources/aws/storage/ecr.js +5 -3
- package/dist/lib/resources/aws/storage/s3.d.ts +6 -39
- package/dist/lib/resources/aws/storage/s3.js +31 -34
- package/dist/lib/utils/capitaliseString.d.ts +12 -0
- package/dist/lib/utils/capitaliseString.js +30 -0
- package/dist/lib/utils/capitalizeString.d.ts +11 -0
- package/dist/lib/utils/capitalizeString.js +24 -1
- package/dist/lib/utils/getConfig.d.ts +1 -0
- package/dist/lib/utils/getConfig.js +9 -1
- package/dist/lib/utils/index.d.ts +1 -0
- package/dist/lib/utils/index.js +2 -1
- package/dist/lib/utils/resourceNaming.d.ts +22 -19
- package/dist/lib/utils/resourceNaming.js +42 -35
- package/package.json +3 -4
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Platform = void 0;
|
|
4
|
+
const ipam_1 = require("../../config/aws/ipam");
|
|
5
|
+
const ipamPool_1 = require("../../resources/aws/networking/ipamPool");
|
|
6
|
+
const account_1 = require("./account");
|
|
7
|
+
const getConfig_1 = require("../../utils/getConfig");
|
|
8
|
+
class Platform extends account_1.Account {
|
|
9
|
+
constructor(scope, id, props) {
|
|
10
|
+
super(scope, id, props);
|
|
11
|
+
this.organisationType = "platform";
|
|
12
|
+
const config = (0, getConfig_1.getConfig)();
|
|
13
|
+
const allRegions = config.allRegions.length > 0 ? config.allRegions : [this.resolvedRegion];
|
|
14
|
+
const ipam = new ipam_1.Ipam(this, "Ipam", {
|
|
15
|
+
regions: allRegions
|
|
16
|
+
});
|
|
17
|
+
// Derive account list from props or config
|
|
18
|
+
const orgAccounts = props.accounts
|
|
19
|
+
? Object.values(props.accounts).flatMap((account) => Array.isArray(account) ? account : [account])
|
|
20
|
+
: Object.keys(config.accountIds ?? {});
|
|
21
|
+
new ipamPool_1.IpamPool(this, "IpamPool", {
|
|
22
|
+
orgAccounts,
|
|
23
|
+
regions: allRegions,
|
|
24
|
+
ipamScope: ipam.privateDefaultScopeId
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
exports.Platform = Platform;
|
|
29
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicGxhdGZvcm0uanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi9saWIvcGF0dGVybnMvYXdzL3BsYXRmb3JtLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7OztBQUFBLGdEQUE2QztBQUM3QyxzRUFBbUU7QUFFbkUsdUNBQXVEO0FBRXZELHFEQUFrRDtBQU9sRCxNQUFhLFFBQVMsU0FBUSxpQkFBTztJQUduQyxZQUFZLEtBQWdCLEVBQUUsRUFBVSxFQUFFLEtBQW9CO1FBQzVELEtBQUssQ0FBQyxLQUFLLEVBQUUsRUFBRSxFQUFFLEtBQUssQ0FBQyxDQUFDO1FBSEQscUJBQWdCLEdBQXFCLFVBQVUsQ0FBQztRQUt2RSxNQUFNLE1BQU0sR0FBRyxJQUFBLHFCQUFTLEdBQUUsQ0FBQztRQUMzQixNQUFNLFVBQVUsR0FDZCxNQUFNLENBQUMsVUFBVSx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VnaW9uc1xuICAgIH0pO1xuXG4gICAgLy8gRGVyaXZlIGFjY291bnQgbGlzdCBmcm9tIHByb3BzIG9yIGNvbmZpZ1xuICAgIGNvbnN0IG9yZ0FjY291bnRzID0gcHJvcHMuYWNjb3VudHNcbiAgICAgID8gT2JqZWN0LnZhbHVlcyhwcm9wcy5hY2NvdW50cykuZmxhdE1hcCgoYWNjb3VudCkgPT5cbiAgICAgICAgICBBcnJheS5pc0FycmF5KGFjY291bnQpID8gYWNjb3VudCA6IFthY2NvdW50XVxuICAgICAgICApXG4gICAgICA6IE9iamVjdC5rZXlzKGNvbmZpZy5hY2NvdW50SWRzID8/IHt9KTtcblxuICAgIG5ldyBJcGFtUG9vbCh0aGlzLCBcIklwYW1Qb29sXCIsIHtcbiAgICAgIG9yZ0FjY291bnRzLFxuICAgICAgcmVnaW9uczogYWxsUmVnaW9ucyxcbiAgICAgIGlwYW1TY29wZTogaXBhbS5wcml2YXRlRGVmYXVsdFNjb3BlSWRcbiAgICB9KTtcbiAgfVxufVxuIl19
|
|
@@ -3,158 +3,73 @@ import { type IBucket, type EventType, type IBucketNotificationDestination, type
|
|
|
3
3
|
import { BucketDeployment } from "aws-cdk-lib/aws-s3-deployment";
|
|
4
4
|
import { type IGrantable, type Grant } from "aws-cdk-lib/aws-iam";
|
|
5
5
|
import type App from "../../app";
|
|
6
|
-
import {
|
|
7
|
-
import { type
|
|
6
|
+
import { type BackupVaultTier, type WebsiteHostingConfig } from "../../resources/aws/storage";
|
|
7
|
+
import { type IStorage } from "./interfaces/storage.js";
|
|
8
8
|
import { type IStorageConnector } from "./interfaces/connector.js";
|
|
9
|
-
export { type
|
|
10
|
-
export type
|
|
11
|
-
export interface
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
9
|
+
export { type IStorage, isStorage } from "./interfaces/storage.js";
|
|
10
|
+
export { type WebsiteHostingConfig } from "../../resources/aws/storage";
|
|
11
|
+
export interface CorsRule {
|
|
12
|
+
readonly allowedOrigins: string[];
|
|
13
|
+
readonly allowedMethods: string[];
|
|
14
|
+
readonly allowedHeaders?: string[];
|
|
15
|
+
readonly exposedHeaders?: string[];
|
|
16
|
+
readonly maxAge?: number;
|
|
15
17
|
}
|
|
16
|
-
export declare const STORAGE_TYPE_CONFIG: Record<S3BucketType, StorageTypeConfig>;
|
|
17
|
-
export declare function getStorageTypeConfig(type: S3BucketType): StorageTypeConfig;
|
|
18
|
-
type BaseS3Props = {
|
|
19
|
-
backupVaultTier?: BackupVaultTier;
|
|
20
|
-
versioned?: boolean;
|
|
21
|
-
encryption?: "AES256" | "KMS";
|
|
22
|
-
kmsKeyArn?: string;
|
|
23
|
-
};
|
|
24
|
-
/**
|
|
25
|
-
* Configuration for automatic asset deployment to S3.
|
|
26
|
-
* When provided, creates a BucketDeployment that uploads files during CDK deploy.
|
|
27
|
-
*/
|
|
28
18
|
export interface S3DeploymentConfig {
|
|
29
19
|
/** Path to the asset directory (relative to CDK app root) */
|
|
30
20
|
source: string;
|
|
31
|
-
/**
|
|
32
|
-
* Whether to remove files from bucket that aren't in the source.
|
|
33
|
-
* Default: true for static assets, false for caches that grow at runtime.
|
|
34
|
-
*/
|
|
21
|
+
/** Whether to remove files from bucket that are not in the source. Default: true */
|
|
35
22
|
prune?: boolean;
|
|
36
|
-
/**
|
|
37
|
-
* Cache control settings for uploaded files.
|
|
38
|
-
* If not provided, no cache headers are set.
|
|
39
|
-
*/
|
|
23
|
+
/** Cache control settings for uploaded files */
|
|
40
24
|
cacheControl?: {
|
|
41
25
|
/** Max age in seconds (e.g., 31536000 for 1 year) */
|
|
42
26
|
maxAge?: number;
|
|
43
|
-
/** Mark as immutable (browser
|
|
27
|
+
/** Mark as immutable (browser will not revalidate) */
|
|
44
28
|
immutable?: boolean;
|
|
45
29
|
};
|
|
46
30
|
}
|
|
47
|
-
export interface
|
|
48
|
-
|
|
49
|
-
publicReadAccess?: boolean;
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
bucketType: "website";
|
|
58
|
-
websiteIndexDocument?: string;
|
|
59
|
-
websiteErrorDocument?: string;
|
|
60
|
-
cors?: Array<{
|
|
61
|
-
allowedOrigins: string[];
|
|
62
|
-
allowedMethods: string[];
|
|
63
|
-
}>;
|
|
31
|
+
export interface S3Props {
|
|
32
|
+
readonly bucketName?: string;
|
|
33
|
+
readonly publicReadAccess?: boolean;
|
|
34
|
+
readonly websiteHosting?: WebsiteHostingConfig;
|
|
35
|
+
readonly versioned?: boolean;
|
|
36
|
+
readonly encryption?: "AES256" | "KMS";
|
|
37
|
+
readonly kmsKeyArn?: string;
|
|
38
|
+
readonly backupVaultTier?: BackupVaultTier;
|
|
39
|
+
readonly cors?: CorsRule[];
|
|
40
|
+
readonly deployment?: S3DeploymentConfig;
|
|
64
41
|
}
|
|
65
|
-
export interface
|
|
66
|
-
|
|
67
|
-
}
|
|
68
|
-
export type IS3Props = PrivateS3Props | WebsiteS3Props | PublicReadS3Props;
|
|
69
|
-
/**
|
|
70
|
-
* Factory for creating S3 storage resources with type-safe return types.
|
|
71
|
-
*
|
|
72
|
-
* @example
|
|
73
|
-
* // Private bucket
|
|
74
|
-
* const assets = app.addStorage(StorageFactory.build("Assets", { bucketType: "private" }));
|
|
75
|
-
* assets.grantPublicAccess(); // ✓ Available on PrivateStorage
|
|
76
|
-
*
|
|
77
|
-
* // Website bucket
|
|
78
|
-
* const site = app.addStorage(StorageFactory.build("Site", { bucketType: "website" }));
|
|
79
|
-
* site.getWebsiteUrl(); // ✓ Available on WebsiteStorage
|
|
80
|
-
*/
|
|
81
|
-
export declare class StorageFactory {
|
|
82
|
-
/** Build a private storage bucket */
|
|
83
|
-
static build(id: string, props: PrivateS3Props): (app: App, scope: Construct) => PrivateStorage;
|
|
84
|
-
/** Build a website storage bucket */
|
|
85
|
-
static build(id: string, props: WebsiteS3Props): (app: App, scope: Construct) => WebsiteStorage;
|
|
86
|
-
/** Build a public read storage bucket */
|
|
87
|
-
static build(id: string, props: PublicReadS3Props): (app: App, scope: Construct) => PublicStorage;
|
|
42
|
+
export interface StorageBuildProps extends S3Props {
|
|
43
|
+
readonly stackPlacement?: "storage" | "cdn" | "compute";
|
|
88
44
|
}
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
declare
|
|
94
|
-
readonly id: string;
|
|
95
|
-
readonly scope: Construct;
|
|
96
|
-
/** The type of storage resource. Used for runtime type narrowing. */
|
|
97
|
-
abstract readonly storageType: StorageType;
|
|
98
|
-
/** The connector type for unified connection processing. */
|
|
45
|
+
export type StorageFactoryFn = ((app: App, scope: Construct) => Storage) & {
|
|
46
|
+
stackPlacement?: "storage" | "cdn" | "compute";
|
|
47
|
+
};
|
|
48
|
+
export declare function validateStorageProps(props: S3Props): void;
|
|
49
|
+
export declare class Storage extends Construct implements IStorage, IStorageConnector {
|
|
99
50
|
readonly connectorType: "storage";
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
constructor(scope: Construct, id: string, props:
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
protected initialisePublicReadBucket(props: PublicReadS3Props): void;
|
|
106
|
-
protected addOutputs(): void;
|
|
51
|
+
private readonly bucket;
|
|
52
|
+
private readonly bucketDeployment?;
|
|
53
|
+
constructor(scope: Construct, id: string, props: S3Props);
|
|
54
|
+
private createDeployment;
|
|
55
|
+
private addOutputs;
|
|
107
56
|
getBucket(): IBucket;
|
|
108
57
|
getBucketName(): string;
|
|
109
58
|
getBucketArn(): string;
|
|
110
|
-
getBucketType(): S3BucketType;
|
|
111
59
|
getBucketDomainName(): string;
|
|
112
60
|
getBucketRegionalDomainName(): string;
|
|
113
|
-
|
|
61
|
+
getWebsiteUrl(): string | undefined;
|
|
62
|
+
getDeployment(): BucketDeployment | undefined;
|
|
114
63
|
grantRead(grantee: IGrantable): Grant;
|
|
115
64
|
grantWrite(grantee: IGrantable): Grant;
|
|
116
65
|
grantReadWrite(grantee: IGrantable): Grant;
|
|
117
66
|
grantDelete(grantee: IGrantable): Grant;
|
|
118
67
|
grantPut(grantee: IGrantable): Grant;
|
|
68
|
+
grantPublicAccess(...keyPrefix: string[]): Grant;
|
|
119
69
|
addEventNotification(event: EventType, dest: IBucketNotificationDestination, ...filters: NotificationKeyFilter[]): void;
|
|
120
70
|
addObjectCreatedNotification(dest: IBucketNotificationDestination, ...filters: NotificationKeyFilter[]): void;
|
|
121
71
|
addObjectRemovedNotification(dest: IBucketNotificationDestination, ...filters: NotificationKeyFilter[]): void;
|
|
122
72
|
}
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
* Standard bucket with optional encryption and versioning.
|
|
126
|
-
*/
|
|
127
|
-
export declare class PrivateStorage extends S3StorageBase implements IPrivateStorage {
|
|
128
|
-
readonly storageType: "private";
|
|
129
|
-
private _deployment?;
|
|
130
|
-
constructor(scope: Construct, id: string, props: PrivateS3Props);
|
|
131
|
-
private createDeployment;
|
|
132
|
-
/**
|
|
133
|
-
* Grant public access to objects under a prefix.
|
|
134
|
-
* Use with caution - makes objects publicly readable.
|
|
135
|
-
*/
|
|
136
|
-
grantPublicAccess(...keyPrefix: string[]): Grant;
|
|
137
|
-
/**
|
|
138
|
-
* Get the BucketDeployment construct if one was created.
|
|
139
|
-
* Returns undefined if no deployment was configured.
|
|
140
|
-
*/
|
|
141
|
-
getDeployment(): BucketDeployment | undefined;
|
|
142
|
-
}
|
|
143
|
-
/**
|
|
144
|
-
* Website S3 storage.
|
|
145
|
-
* Bucket configured for static website hosting.
|
|
146
|
-
*/
|
|
147
|
-
export declare class WebsiteStorage extends S3StorageBase implements IWebsiteStorage {
|
|
148
|
-
readonly storageType: "website";
|
|
149
|
-
constructor(scope: Construct, id: string, props: WebsiteS3Props);
|
|
150
|
-
/** Get the website URL. */
|
|
151
|
-
getWebsiteUrl(): string;
|
|
152
|
-
}
|
|
153
|
-
/**
|
|
154
|
-
* Public read S3 storage.
|
|
155
|
-
* Bucket with public read access enabled.
|
|
156
|
-
*/
|
|
157
|
-
export declare class PublicStorage extends S3StorageBase implements IPublicStorage {
|
|
158
|
-
readonly storageType: "publicRead";
|
|
159
|
-
constructor(scope: Construct, id: string, props: PublicReadS3Props);
|
|
73
|
+
export declare class StorageFactory {
|
|
74
|
+
static build(id: string, props?: StorageBuildProps): StorageFactoryFn;
|
|
160
75
|
}
|