@fjall/components-infrastructure 5.0.0 → 7.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.
Files changed (52) hide show
  1. package/dist/lib/config/aws/ebsDefaultEncryption.js +1 -1
  2. package/dist/lib/config/aws/inspectorEnablement.js +1 -1
  3. package/dist/lib/config/aws/oidcConnector.js +1 -1
  4. package/dist/lib/config/aws/s3BlockPublicAccess.js +1 -1
  5. package/dist/lib/config/aws/securityServicesAdmin.js +2 -2
  6. package/dist/lib/lambda-assets/cert-generator/asset/index.js +31 -31
  7. package/dist/lib/patterns/aws/clickhouseDatabase.js +4 -0
  8. package/dist/lib/patterns/aws/compute.js +1 -1
  9. package/dist/lib/patterns/aws/computeEcs.js +5 -0
  10. package/dist/lib/patterns/aws/computeLambda.d.ts +1 -1
  11. package/dist/lib/patterns/aws/devSubstrate.js +1 -1
  12. package/dist/lib/patterns/aws/payload.js +3 -3
  13. package/dist/lib/patterns/aws/staticSite.js +1 -1
  14. package/dist/lib/resources/aws/compute/ec2.d.ts +31 -14
  15. package/dist/lib/resources/aws/compute/ec2.js +34 -10
  16. package/dist/lib/resources/aws/compute/ec2GracefulTerminationHandler.js +1 -1
  17. package/dist/lib/resources/aws/compute/ecsCapacityConfig.d.ts +83 -0
  18. package/dist/lib/resources/aws/compute/ecsCapacityConfig.js +323 -0
  19. package/dist/lib/resources/aws/compute/ecsConstants.d.ts +19 -0
  20. package/dist/lib/resources/aws/compute/ecsConstants.js +24 -0
  21. package/dist/lib/resources/aws/compute/ecsLifecycleHookMigration.js +1 -1
  22. package/dist/lib/resources/aws/compute/ecsServiceFactory.d.ts +20 -16
  23. package/dist/lib/resources/aws/compute/ecsServiceFactory.js +73 -118
  24. package/dist/lib/resources/aws/compute/ecsTypes.d.ts +33 -4
  25. package/dist/lib/resources/aws/compute/ecsValidation.js +6 -0
  26. package/dist/lib/resources/aws/compute/persistentDataVolume.d.ts +15 -5
  27. package/dist/lib/resources/aws/compute/persistentDataVolume.js +10 -7
  28. package/dist/lib/resources/aws/database/rdsInstance.js +1 -1
  29. package/dist/lib/resources/aws/iam/identityCenter/user.js +1 -1
  30. package/dist/lib/resources/aws/networking/crossAccountReturnRoutes.js +1 -1
  31. package/dist/lib/resources/aws/networking/ipamPool.js +1 -1
  32. package/dist/lib/resources/aws/organisation/costAllocationTagActivator.js +1 -1
  33. package/dist/lib/resources/aws/utilities/tlsCertGenerator.js +1 -1
  34. package/dist/lib/utils/capacityIdentityContext.d.ts +20 -0
  35. package/dist/lib/utils/capacityIdentityContext.js +43 -0
  36. package/dist/lib/utils/engineCompat.d.ts +12 -5
  37. package/dist/lib/utils/engineCompat.js +41 -22
  38. package/dist/lib/utils/manifestWriter.d.ts +19 -2
  39. package/dist/lib/utils/manifestWriter.js +35 -0
  40. package/package.json +10 -6
  41. package/dist/lib/config/aws/identityCenterMembership.d.ts +0 -11
  42. package/dist/lib/config/aws/identityCenterMembership.js +0 -61
  43. package/dist/lib/layers/layers/secrets-resolver/bin/resolve-secrets +0 -30
  44. package/dist/lib/layers/layers/secrets-resolver/bin/resolve-secrets.mjs +0 -212
  45. package/dist/lib/patterns/aws/buildkite/alarms.d.ts +0 -25
  46. package/dist/lib/patterns/aws/buildkite/alarms.js +0 -78
  47. package/dist/lib/patterns/aws/domainDelegation.d.ts +0 -8
  48. package/dist/lib/patterns/aws/domainDelegation.js +0 -45
  49. package/dist/lib/patterns/aws/domainFactory.d.ts +0 -23
  50. package/dist/lib/patterns/aws/domainFactory.js +0 -61
  51. package/dist/lib/utils/addSuffixToEmail.d.ts +0 -1
  52. package/dist/lib/utils/addSuffixToEmail.js +0 -3
@@ -1,8 +0,0 @@
1
- import { Construct } from "constructs";
2
- import type { IHostedZone } from "aws-cdk-lib/aws-route53";
3
- import type { DomainDelegatedProps } from "./interfaces/domain.js";
4
- export declare class DomainDelegation extends Construct {
5
- readonly hostedZoneId: string;
6
- readonly hostedZone: IHostedZone;
7
- constructor(scope: Construct, id: string, props: DomainDelegatedProps);
8
- }
@@ -1,45 +0,0 @@
1
- import { Construct } from "constructs";
2
- import { Fn } from "aws-cdk-lib";
3
- import { getDomainExportNames } from "@fjall/util";
4
- import { Role } from "../../resources/aws/iam/index.js";
5
- import { toPascalCase, getSafeZoneName } from "../../utils/capitaliseString.js";
6
- import { HostedZone } from "../../resources/aws/networking/hostedZone.js";
7
- import { CrossAccountDelegationRecord } from "../../resources/aws/networking/crossAccountDelegationRecord.js";
8
- import { DomainCertificate } from "../../resources/aws/networking/domainCertificate.js";
9
- import { composeDnsRecords } from "./dnsRecordComposer.js";
10
- export class DomainDelegation extends Construct {
11
- hostedZoneId;
12
- hostedZone;
13
- constructor(scope, id, props) {
14
- super(scope, id);
15
- const delegationRoleArn = Fn.importValue(getDomainExportNames(props.parentZoneName).delegationRoleArn);
16
- const hostedZoneDelegationRole = Role.fromRoleArn(this, "HostedZoneDelegationRole", delegationRoleArn);
17
- const safeZone = getSafeZoneName(props.zoneName);
18
- const zone = new HostedZone(this, `${safeZone}HostedZone`, {
19
- zoneName: props.zoneName,
20
- createDelegationRole: false
21
- });
22
- this.hostedZone = zone.hostedZone;
23
- this.hostedZoneId = zone.hostedZoneId;
24
- new CrossAccountDelegationRecord(this, `${safeZone}DelegationRecord`, {
25
- delegationRole: hostedZoneDelegationRole,
26
- delegatedZone: zone.hostedZone,
27
- delegatedZoneName: props.zoneName,
28
- parentHostedZoneName: props.parentZoneName
29
- });
30
- const safeKey = toPascalCase(safeZone);
31
- if (props.certificates) {
32
- props.certificates.forEach((cert, index) => {
33
- const safeCertName = toPascalCase(cert.domainName.split(".").join(""));
34
- new DomainCertificate(this, `${safeKey}${safeCertName}Cert${index}`, {
35
- domainName: cert.domainName,
36
- subjectAlternativeNames: cert.subjectAlternativeNames,
37
- hostedZone: zone.hostedZone
38
- });
39
- });
40
- }
41
- if (props.records) {
42
- composeDnsRecords(this, zone.hostedZone, props.zoneName, props.records);
43
- }
44
- }
45
- }
@@ -1,23 +0,0 @@
1
- import { Construct } from "constructs";
2
- import type { IHostedZone } from "aws-cdk-lib/aws-route53";
3
- import { DomainDelegation } from "./domainDelegation.js";
4
- import type { DomainApexProps, DomainDelegatedProps } from "./interfaces/domain.js";
5
- /**
6
- * @internal
7
- * Apex domain composition — combines HostedZone, per-type DNS records, and
8
- * certificates. Defined inline here rather than in its own file because Phase 1
9
- * replaces this class wholesale with the user-facing `Domain` construct. Extracting
10
- * now would be over-investment in a doomed abstraction.
11
- *
12
- * Exported only so pattern-layer tests can assert `instanceof ApexDomain`.
13
- */
14
- export declare class ApexDomain extends Construct {
15
- readonly hostedZone: IHostedZone;
16
- readonly hostedZoneId: string;
17
- constructor(scope: Construct, id: string, props: DomainApexProps);
18
- private addCertificates;
19
- }
20
- export declare class DomainFactory {
21
- static build(id: string, props: DomainApexProps): (scope: Construct) => ApexDomain;
22
- static build(id: string, props: DomainDelegatedProps): (scope: Construct) => DomainDelegation;
23
- }
@@ -1,61 +0,0 @@
1
- import { Construct } from "constructs";
2
- import { HostedZone } from "../../resources/aws/networking/hostedZone.js";
3
- import { DomainCertificate } from "../../resources/aws/networking/domainCertificate.js";
4
- import { toPascalCase } from "../../utils/capitaliseString.js";
5
- import { DomainDelegation } from "./domainDelegation.js";
6
- import { composeDnsRecords } from "./dnsRecordComposer.js";
7
- /**
8
- * @internal
9
- * Apex domain composition — combines HostedZone, per-type DNS records, and
10
- * certificates. Defined inline here rather than in its own file because Phase 1
11
- * replaces this class wholesale with the user-facing `Domain` construct. Extracting
12
- * now would be over-investment in a doomed abstraction.
13
- *
14
- * Exported only so pattern-layer tests can assert `instanceof ApexDomain`.
15
- */
16
- export class ApexDomain extends Construct {
17
- hostedZone;
18
- hostedZoneId;
19
- constructor(scope, id, props) {
20
- super(scope, id);
21
- const zone = new HostedZone(this, "Zone", {
22
- zoneName: props.zoneName,
23
- hostedZoneId: props.hostedZoneId
24
- });
25
- this.hostedZone = zone.hostedZone;
26
- this.hostedZoneId = zone.hostedZoneId;
27
- if (props.records) {
28
- composeDnsRecords(this, zone.hostedZone, props.zoneName, props.records);
29
- }
30
- if (props.certificates) {
31
- this.addCertificates(props.certificates, props.zoneName);
32
- }
33
- }
34
- addCertificates(certificates, zoneName) {
35
- const safeZone = toPascalCase(zoneName.split(".").join(""));
36
- certificates.forEach((cert, index) => {
37
- const safeCertName = toPascalCase(cert.domainName.split(".").join(""));
38
- new DomainCertificate(this, `${safeZone}${safeCertName}Cert${index}`, {
39
- domainName: cert.domainName,
40
- subjectAlternativeNames: cert.subjectAlternativeNames,
41
- hostedZone: this.hostedZone
42
- });
43
- });
44
- }
45
- }
46
- export class DomainFactory {
47
- static build(id, props) {
48
- return (scope) => {
49
- switch (props.type) {
50
- case "domain":
51
- return new ApexDomain(scope, id, props);
52
- case "delegated":
53
- return new DomainDelegation(scope, id, props);
54
- default: {
55
- const _exhaustive = props;
56
- throw new Error(`Unsupported domain type: ${String(_exhaustive.type)}`);
57
- }
58
- }
59
- };
60
- }
61
- }
@@ -1 +0,0 @@
1
- export default function addSuffixToEmail(email: string, suffix: string): string;
@@ -1,3 +0,0 @@
1
- export default function addSuffixToEmail(email, suffix) {
2
- return email.replace("@", `+${suffix}@`);
3
- }