@fjall/components-infrastructure 33.0.0 → 34.0.0
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 +15 -76
- package/dist/lib/app.d.ts +1 -1
- package/dist/lib/config/aws/identityCentreConfig.d.ts +1 -1
- package/dist/lib/config/aws/identityCentreConfig.js +1 -1
- package/dist/lib/config/aws/scpPreset.js +12 -3
- package/dist/lib/lambda-assets/cert-generator/asset/index.js +126 -0
- package/dist/lib/patterns/aws/bastionFactory.js +2 -1
- package/dist/lib/patterns/aws/buildkite/buildkite.d.ts +1 -1
- package/dist/lib/patterns/aws/buildkite/buildkite.js +1 -1
- package/dist/lib/patterns/aws/buildkite/factory.d.ts +2 -2
- package/dist/lib/patterns/aws/buildkite/pins.d.ts +2 -2
- package/dist/lib/patterns/aws/buildkite/pins.js +2 -2
- package/dist/lib/patterns/aws/buildkite/schema.d.ts +1 -1
- package/dist/lib/patterns/aws/buildkite/schema.js +1 -1
- package/dist/lib/patterns/aws/buildkite/userData.d.ts +1 -1
- package/dist/lib/patterns/aws/buildkite/userData.js +1 -1
- package/dist/lib/patterns/aws/buildkite.d.ts +1 -1
- package/dist/lib/patterns/aws/buildkite.js +1 -1
- package/dist/lib/patterns/aws/cdn.d.ts +4 -1
- package/dist/lib/patterns/aws/clickhouseDatabase.js +6 -5
- package/dist/lib/patterns/aws/clickhouseTls/types.d.ts +1 -1
- package/dist/lib/patterns/aws/compute.d.ts +2 -2
- package/dist/lib/patterns/aws/computeEc2.d.ts +5 -18
- package/dist/lib/patterns/aws/computeEc2.js +9 -3
- package/dist/lib/patterns/aws/computeEcs.d.ts +4 -4
- package/dist/lib/patterns/aws/computeEcs.js +5 -9
- package/dist/lib/patterns/aws/computeEcsTypes.d.ts +5 -5
- package/dist/lib/patterns/aws/computePropApplicability.js +1 -1
- package/dist/lib/patterns/aws/fivetranProxy.d.ts +8 -3
- package/dist/lib/patterns/aws/fivetranProxy.js +9 -6
- package/dist/lib/patterns/aws/interfaces/compute.d.ts +8 -0
- package/dist/lib/patterns/aws/payload.js +6 -2
- package/dist/lib/patterns/aws/storage.d.ts +8 -0
- package/dist/lib/patterns/aws/storage.js +1 -0
- package/dist/lib/resources/aws/cdn/cloudFront.d.ts +16 -0
- package/dist/lib/resources/aws/cdn/cloudFront.js +52 -2
- package/dist/lib/resources/aws/cdn/responseHeadersPolicy.d.ts +1 -1
- package/dist/lib/resources/aws/cdn/responseHeadersPolicy.js +1 -1
- package/dist/lib/resources/aws/compute/ec2.d.ts +35 -8
- package/dist/lib/resources/aws/compute/ec2.js +64 -15
- package/dist/lib/resources/aws/compute/ec2SshAccess.d.ts +80 -0
- package/dist/lib/resources/aws/compute/ec2SshAccess.js +166 -0
- package/dist/lib/resources/aws/compute/ecs.d.ts +11 -2
- package/dist/lib/resources/aws/compute/ecs.js +29 -6
- package/dist/lib/resources/aws/compute/lambda.js +1 -3
- package/dist/lib/resources/aws/database/clickhouseConstants.d.ts +5 -5
- package/dist/lib/resources/aws/database/clickhouseConstants.js +5 -5
- package/dist/lib/resources/aws/database/dynamodb.js +5 -6
- package/dist/lib/resources/aws/iam/identityCenter/user.d.ts +1 -1
- package/dist/lib/resources/aws/iam/identityCenter/user.js +1 -1
- package/dist/lib/resources/aws/logging/accessLogBucket.d.ts +5 -3
- package/dist/lib/resources/aws/logging/accessLogBucket.js +6 -3
- package/dist/lib/resources/aws/messaging/sns.d.ts +17 -7
- package/dist/lib/resources/aws/messaging/sns.js +4 -4
- package/dist/lib/resources/aws/secrets/stackEncryptionKey.d.ts +17 -4
- package/dist/lib/resources/aws/secrets/stackEncryptionKey.js +20 -4
- package/dist/lib/resources/aws/storage/bucketDeployment.d.ts +2 -3
- package/dist/lib/resources/aws/storage/bucketDeployment.js +2 -3
- package/dist/lib/resources/aws/storage/s3.d.ts +14 -1
- package/dist/lib/resources/aws/storage/s3.js +6 -3
- package/package.json +6 -4
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { SDK_PRE_EMPTY_TAG_KEY } from "@fjall/util/aws";
|
|
1
|
+
import { S3_VERSIONING_EXEMPT_TAG_KEY, SDK_PRE_EMPTY_TAG_KEY } from "@fjall/util/aws";
|
|
2
2
|
import { Annotations, CfnOutput, Duration, RemovalPolicy, Tags } from "aws-cdk-lib";
|
|
3
3
|
import { BlockPublicAccess, Bucket, BucketEncryption } from "aws-cdk-lib/aws-s3";
|
|
4
4
|
import { ArnPrincipal, Effect, PolicyStatement, StarPrincipal } from "aws-cdk-lib/aws-iam";
|
|
@@ -7,7 +7,7 @@ import { resolveEffectiveBackupTier, shouldAutoVersion } from "../../../utils/ba
|
|
|
7
7
|
import { toPascalCase } from "../../../utils/capitaliseString.js";
|
|
8
8
|
import { bucketWebsiteEndpointExportName, bucketWebsiteHostedZoneIdExportName } from "@fjall/util";
|
|
9
9
|
import { envAwareRemovalPolicyDefault, toRemovalPolicy } from "../../../utils/removalPolicy.js";
|
|
10
|
-
export { SDK_PRE_EMPTY_TAG_KEY } from "@fjall/util/aws";
|
|
10
|
+
export { S3_VERSIONING_EXEMPT_TAG_KEY, SDK_PRE_EMPTY_TAG_KEY } from "@fjall/util/aws";
|
|
11
11
|
/**
|
|
12
12
|
* Days a noncurrent object version is retained before lifecycle expiry.
|
|
13
13
|
* The wrapper pairs this automatically when it enables versioning; constructs
|
|
@@ -26,7 +26,7 @@ export class S3Bucket extends Bucket {
|
|
|
26
26
|
/** The tier the bucket runs under: `backupVaultTier`, else `appBackupTier`. */
|
|
27
27
|
effectiveBackupTier;
|
|
28
28
|
constructor(scope, id, props = {}) {
|
|
29
|
-
const { websiteHosting, backupVaultTier, appBackupTier, resourcePolicyStatements, aliasTargetName, appName, ...cdkProps } = props;
|
|
29
|
+
const { websiteHosting, backupVaultTier, appBackupTier, resourcePolicyStatements, aliasTargetName, appName, versioningExemption, ...cdkProps } = props;
|
|
30
30
|
const isPublic = props.publicReadAccess === true || websiteHosting !== undefined;
|
|
31
31
|
const effectiveBackupTier = resolveEffectiveBackupTier(backupVaultTier, appBackupTier);
|
|
32
32
|
const versioned = props.versioned ?? shouldAutoVersion(effectiveBackupTier);
|
|
@@ -112,6 +112,9 @@ export class S3Bucket extends Bucket {
|
|
|
112
112
|
if (removalPolicy === RemovalPolicy.DESTROY) {
|
|
113
113
|
Tags.of(this).add(SDK_PRE_EMPTY_TAG_KEY, "true");
|
|
114
114
|
}
|
|
115
|
+
if (versioningExemption !== undefined && !versioned) {
|
|
116
|
+
Tags.of(this).add(S3_VERSIONING_EXEMPT_TAG_KEY, versioningExemption);
|
|
117
|
+
}
|
|
115
118
|
if (websiteHosting) {
|
|
116
119
|
if (appName === undefined) {
|
|
117
120
|
// Refusing beats falling back to a bucket-only export name: the
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fjall/components-infrastructure",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "34.0.0",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "git+https://github.com/fjall-tech/fjall.git",
|
|
@@ -39,8 +39,10 @@
|
|
|
39
39
|
"clean": "rm -rf ./dist",
|
|
40
40
|
"clean:node": "rm -rf ./node_modules",
|
|
41
41
|
"build:cert-gen-lambda": "node lib/lambda-assets/cert-generator/src/build.mjs",
|
|
42
|
-
"build": "
|
|
42
|
+
"build": "node ../../scripts/run-build.mjs --purpose=build -- npm run build:steps",
|
|
43
|
+
"build:steps": "npm run clean && npm run build:cert-gen-lambda && tsc && cp -r lib/layers dist/lib/layers && mkdir -p dist/lib/lambda-assets/cert-generator/asset && cp lib/lambda-assets/cert-generator/asset/index.js dist/lib/lambda-assets/cert-generator/asset/index.js && cp lib/lambda-assets/cert-generator/asset/package.json dist/lib/lambda-assets/cert-generator/asset/package.json && mkdir -p dist/lib/lambda-assets/identity-store-user/asset && cp lib/lambda-assets/identity-store-user/asset/index.js dist/lib/lambda-assets/identity-store-user/asset/index.js && cp lib/lambda-assets/identity-store-user/asset/package.json dist/lib/lambda-assets/identity-store-user/asset/package.json && mkdir -p dist/lib/lambda-assets/static-site-forms/asset && cp lib/lambda-assets/static-site-forms/asset/index.js dist/lib/lambda-assets/static-site-forms/asset/index.js && cp lib/lambda-assets/static-site-forms/asset/package.json dist/lib/lambda-assets/static-site-forms/asset/package.json && cp lib/resources/aws/compute/lifecycleHookLambda.source.cjs dist/lib/resources/aws/compute/lifecycleHookLambda.source.cjs && cp lib/resources/aws/compute/ec2GracefulTerminationLambda.source.cjs dist/lib/resources/aws/compute/ec2GracefulTerminationLambda.source.cjs && cp lib/resources/aws/compute/persistentDataVolumeLambda.source.cjs dist/lib/resources/aws/compute/persistentDataVolumeLambda.source.cjs && cp lib/patterns/aws/devSubstrate.waker.source.cjs dist/lib/patterns/aws/devSubstrate.waker.source.cjs && node ../../scripts/stamp-build.mjs",
|
|
43
44
|
"prepack": "node ../../scripts/check-dist-freshness.mjs",
|
|
45
|
+
"prepublishOnly": "node ../../scripts/audit-package-tarball.mjs",
|
|
44
46
|
"watch": "tsc -w",
|
|
45
47
|
"watch:only": "tsc -w",
|
|
46
48
|
"test": "vitest run",
|
|
@@ -78,8 +80,8 @@
|
|
|
78
80
|
},
|
|
79
81
|
"dependencies": {
|
|
80
82
|
"@aws-sdk/client-organizations": "^3.1098.0",
|
|
81
|
-
"@fjall/generator": "^
|
|
82
|
-
"@fjall/util": "^
|
|
83
|
+
"@fjall/generator": "^34.0.0",
|
|
84
|
+
"@fjall/util": "^34.0.0",
|
|
83
85
|
"constructs": "^10.7.2",
|
|
84
86
|
"zod": "^4.4.3"
|
|
85
87
|
},
|