@fjall/components-infrastructure 3.4.1 → 3.6.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/dist/lib/patterns/aws/apexDomainPattern.js +12 -24
- package/dist/lib/patterns/aws/buildkite/buildkite.d.ts +54 -9
- package/dist/lib/patterns/aws/buildkite/buildkite.js +131 -23
- package/dist/lib/patterns/aws/buildkite/iam.d.ts +8 -1
- package/dist/lib/patterns/aws/buildkite/iam.js +11 -0
- package/dist/lib/patterns/aws/buildkite/userData.d.ts +13 -1
- package/dist/lib/patterns/aws/buildkite/userData.js +8 -3
- package/dist/lib/patterns/aws/buildkite.d.ts +1 -1
- package/dist/lib/patterns/aws/buildkite.js +1 -1
- package/dist/lib/patterns/aws/database.d.ts +6 -0
- package/dist/lib/patterns/aws/database.js +2 -1
- package/dist/lib/patterns/aws/delegatedDomainPattern.d.ts +6 -2
- package/dist/lib/patterns/aws/delegatedDomainPattern.js +28 -27
- package/dist/lib/patterns/aws/devSubstrate.js +15 -5
- package/dist/lib/patterns/aws/domainCertificateComposer.d.ts +48 -0
- package/dist/lib/patterns/aws/domainCertificateComposer.js +179 -0
- package/dist/lib/patterns/aws/domainValidation.js +95 -7
- package/dist/lib/patterns/aws/interfaces/domain.d.ts +33 -0
- package/dist/lib/resources/aws/compute/ecsRoles.d.ts +7 -0
- package/dist/lib/resources/aws/compute/ecsRoles.js +8 -1
- package/dist/lib/resources/aws/database/rdsAurora.d.ts +7 -0
- package/dist/lib/resources/aws/database/rdsAurora.js +2 -1
- package/dist/lib/resources/aws/database/rdsDefaults.d.ts +6 -3
- package/dist/lib/resources/aws/database/rdsDefaults.js +6 -3
- package/dist/lib/resources/aws/networking/crossAccountDelegationRecord.d.ts +10 -0
- package/dist/lib/resources/aws/networking/crossAccountDelegationRecord.js +27 -1
- package/dist/lib/resources/aws/secrets/secret.d.ts +6 -0
- package/dist/lib/resources/aws/secrets/secret.js +1 -1
- package/dist/lib/utils/domainTypes.d.ts +5 -11
- package/dist/lib/utils/domainTypes.js +7 -4
- package/package.json +4 -4
|
@@ -16,15 +16,18 @@ export const RDS_DEFAULTS = Object.freeze({
|
|
|
16
16
|
* (fast dev-envs Phase 3). `min 0` ACU scales the shared cluster to zero when
|
|
17
17
|
* idle; `enableDataApi` lets slot DDL run over HTTPS with no VPC connection, and
|
|
18
18
|
* is the only mode under which min-0 actually saves (a live pooled connection
|
|
19
|
-
* pins the cluster above 0 ACU). Engine 16.
|
|
20
|
-
* floor (see `MIN_AUTO_PAUSE_POSTGRES_VERSION`).
|
|
19
|
+
* pins the cluster above 0 ACU). Engine 16.10 satisfies the auto-pause-capable
|
|
20
|
+
* floor (see `MIN_AUTO_PAUSE_POSTGRES_VERSION`). AWS removes old minors from
|
|
21
|
+
* the creatable list over time (16.6 rejected with "Cannot find version" by
|
|
22
|
+
* 2026-07) — pin a mid-window minor, not the oldest available, and expect this
|
|
23
|
+
* to need a bump roughly yearly.
|
|
21
24
|
*/
|
|
22
25
|
export const DEV_AURORA_DEFAULTS = Object.freeze({
|
|
23
26
|
SERVERLESS_V2_MIN_CAPACITY: 0,
|
|
24
27
|
SERVERLESS_V2_MAX_CAPACITY: 4,
|
|
25
28
|
AUTO_PAUSE_SECONDS: 1200,
|
|
26
29
|
ENABLE_DATA_API: true,
|
|
27
|
-
ENGINE_VERSION: "16.
|
|
30
|
+
ENGINE_VERSION: "16.10"
|
|
28
31
|
});
|
|
29
32
|
/**
|
|
30
33
|
* Bounds AWS enforces on `ServerlessV2ScalingConfiguration.SecondsUntilAutoPause`
|
|
@@ -6,6 +6,16 @@ export interface CrossAccountDelegationRecordProps {
|
|
|
6
6
|
readonly delegatedZone: IHostedZone;
|
|
7
7
|
readonly delegatedZoneName: string;
|
|
8
8
|
readonly parentHostedZoneName: string;
|
|
9
|
+
/**
|
|
10
|
+
* Literal NS hostnames for an ADOPTED (imported) delegated zone. An
|
|
11
|
+
* imported `IHostedZone` exposes no `hostedZoneNameServers` attribute —
|
|
12
|
+
* CDK cannot know a live zone's NS at synth — so the custom resource
|
|
13
|
+
* would UPSERT an empty parent NS row. When set, a facade over the
|
|
14
|
+
* imported zone supplies these literals instead (see
|
|
15
|
+
* `withLiteralNameServers`). Omit for created zones, whose NS arrive as
|
|
16
|
+
* a CloudFormation attribute token.
|
|
17
|
+
*/
|
|
18
|
+
readonly adoptedNameServers?: string[];
|
|
9
19
|
readonly description?: string;
|
|
10
20
|
readonly costAllocationEnvironment?: string;
|
|
11
21
|
readonly costAllocationDomain?: string;
|
|
@@ -2,6 +2,29 @@ import { Construct } from "constructs";
|
|
|
2
2
|
import { Tags } from "aws-cdk-lib";
|
|
3
3
|
import { CrossAccountZoneDelegationRecord as CdkCrossAccountZoneDelegationRecord } from "aws-cdk-lib/aws-route53";
|
|
4
4
|
import { applyCostAllocationTags } from "../../../utils/costAllocationTags.js";
|
|
5
|
+
/**
|
|
6
|
+
* CDK facade seam for zone adoption. `CrossAccountZoneDelegationRecord`
|
|
7
|
+
* reads exactly `zoneName` and `hostedZoneNameServers` off its
|
|
8
|
+
* `delegatedZone`; the facade delegates every access to the imported zone
|
|
9
|
+
* and overrides only `hostedZoneNameServers` with the user-declared
|
|
10
|
+
* literals. Methods are bound to the underlying zone so `this`-dependent
|
|
11
|
+
* internals behave identically. Pinned by the adopted-case synth snapshot
|
|
12
|
+
* in crossAccountDelegationRecord.test.ts — a CDK upgrade that starts
|
|
13
|
+
* reading more through this seam trips the pin.
|
|
14
|
+
*/
|
|
15
|
+
function withLiteralNameServers(zone, nameServers) {
|
|
16
|
+
return new Proxy(zone, {
|
|
17
|
+
get(target, property) {
|
|
18
|
+
if (property === "hostedZoneNameServers") {
|
|
19
|
+
return [...nameServers];
|
|
20
|
+
}
|
|
21
|
+
const value = Reflect.get(target, property);
|
|
22
|
+
return typeof value === "function"
|
|
23
|
+
? value.bind(target)
|
|
24
|
+
: value;
|
|
25
|
+
}
|
|
26
|
+
});
|
|
27
|
+
}
|
|
5
28
|
// CDK's CrossAccountZoneDelegationRecord is a custom-resource Lambda: user-level tags
|
|
6
29
|
// on the record itself may not reach AWS. We tag the wrapping Fjall Construct for
|
|
7
30
|
// assertion purposes; create-path tags still propagate to child resources (Lambda,
|
|
@@ -14,9 +37,12 @@ export class CrossAccountDelegationRecord extends Construct {
|
|
|
14
37
|
this.description =
|
|
15
38
|
props.description ??
|
|
16
39
|
`Fjall-managed cross-account delegation for ${props.delegatedZoneName} in parent ${props.parentHostedZoneName}`;
|
|
40
|
+
const delegatedZone = props.adoptedNameServers !== undefined
|
|
41
|
+
? withLiteralNameServers(props.delegatedZone, props.adoptedNameServers)
|
|
42
|
+
: props.delegatedZone;
|
|
17
43
|
this.record = new CdkCrossAccountZoneDelegationRecord(this, "Record", {
|
|
18
44
|
delegationRole: props.delegationRole,
|
|
19
|
-
delegatedZone
|
|
45
|
+
delegatedZone,
|
|
20
46
|
parentHostedZoneName: props.parentHostedZoneName
|
|
21
47
|
});
|
|
22
48
|
Tags.of(this).add("fjall:description", this.description);
|
|
@@ -17,6 +17,12 @@ interface SecretProps {
|
|
|
17
17
|
*/
|
|
18
18
|
secretStringValue?: string;
|
|
19
19
|
description?: string;
|
|
20
|
+
/**
|
|
21
|
+
* KMS alias for the wrapper-minted encryption CMK. Aliases are unique per
|
|
22
|
+
* account+region, so callers whose construct id is not account-unique (e.g.
|
|
23
|
+
* a fixed-name pattern deployed once per app) MUST pass an app-scoped alias.
|
|
24
|
+
* @default cmk/<construct id>
|
|
25
|
+
*/
|
|
20
26
|
aliasName?: string;
|
|
21
27
|
generateSecretString?: SecretStringGenerator;
|
|
22
28
|
/** Regions where this secret should be replicated (for Global Aurora) */
|
|
@@ -71,7 +71,7 @@ export class Secret extends Construct {
|
|
|
71
71
|
}
|
|
72
72
|
// Create KMS key for new secrets only
|
|
73
73
|
const customerManagedKey = new CustomerManagedKey(this, `${id}CustomerManagedKey`, {
|
|
74
|
-
aliasName: `cmk/${id}`
|
|
74
|
+
aliasName: props.aliasName ?? `cmk/${id}`
|
|
75
75
|
});
|
|
76
76
|
this.secretsCustomerManagedKey = customerManagedKey;
|
|
77
77
|
/**
|
|
@@ -29,15 +29,9 @@ export declare function resolveRecordFqdn(recordName: string, zoneName: string):
|
|
|
29
29
|
/**
|
|
30
30
|
* Two-step deploy phase for constructs whose certificates must not be issued
|
|
31
31
|
* before their zone's NS delegation has propagated (design R2 cert-hang
|
|
32
|
-
* guard)
|
|
33
|
-
* `
|
|
34
|
-
*
|
|
35
|
-
*
|
|
32
|
+
* guard) plus its omitted-phase default — homed in `@fjall/util`
|
|
33
|
+
* (`infra/domainExports.ts`, the lowest common layer) and re-exported here
|
|
34
|
+
* so construct-side consumers keep their import path. deploy-core's
|
|
35
|
+
* `orchestration/domain/types.ts` re-exports the same declaration.
|
|
36
36
|
*/
|
|
37
|
-
export type DomainDeployPhase
|
|
38
|
-
/**
|
|
39
|
-
* Default deploy phase when `phase` is omitted — the complete build. The
|
|
40
|
-
* two-step guard (R2) sets `"zone"` explicitly for step 1, so the safe
|
|
41
|
-
* default for a single-shot deploy is everything.
|
|
42
|
-
*/
|
|
43
|
-
export declare const DOMAIN_DEPLOY_DEFAULT_PHASE: DomainDeployPhase;
|
|
37
|
+
export { DOMAIN_DEPLOY_DEFAULT_PHASE, type DomainDeployPhase } from "@fjall/util";
|
|
@@ -58,8 +58,11 @@ export function resolveRecordFqdn(recordName, zoneName) {
|
|
|
58
58
|
return `${recordName}.${zoneName}`;
|
|
59
59
|
}
|
|
60
60
|
/**
|
|
61
|
-
*
|
|
62
|
-
*
|
|
63
|
-
*
|
|
61
|
+
* Two-step deploy phase for constructs whose certificates must not be issued
|
|
62
|
+
* before their zone's NS delegation has propagated (design R2 cert-hang
|
|
63
|
+
* guard) plus its omitted-phase default — homed in `@fjall/util`
|
|
64
|
+
* (`infra/domainExports.ts`, the lowest common layer) and re-exported here
|
|
65
|
+
* so construct-side consumers keep their import path. deploy-core's
|
|
66
|
+
* `orchestration/domain/types.ts` re-exports the same declaration.
|
|
64
67
|
*/
|
|
65
|
-
export
|
|
68
|
+
export { DOMAIN_DEPLOY_DEFAULT_PHASE } from "@fjall/util";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fjall/components-infrastructure",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.6.0",
|
|
4
4
|
"license": "SEE LICENSE IN LICENSE",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -67,8 +67,8 @@
|
|
|
67
67
|
},
|
|
68
68
|
"dependencies": {
|
|
69
69
|
"@aws-sdk/client-organizations": "^3.1038.0",
|
|
70
|
-
"@fjall/generator": "^3.
|
|
71
|
-
"@fjall/util": "^3.
|
|
70
|
+
"@fjall/generator": "^3.6.0",
|
|
71
|
+
"@fjall/util": "^3.6.0",
|
|
72
72
|
"constructs": "^10.6.0"
|
|
73
73
|
},
|
|
74
74
|
"overrides": {
|
|
@@ -82,5 +82,5 @@
|
|
|
82
82
|
"engines": {
|
|
83
83
|
"node": ">=18.0.0"
|
|
84
84
|
},
|
|
85
|
-
"gitHead": "
|
|
85
|
+
"gitHead": "10366db602d7e80669e22825a52071a47e05c3b7"
|
|
86
86
|
}
|