@fjall/components-infrastructure 2.30.0 → 2.30.3

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 (72) hide show
  1. package/dist/lib/__tests__/setup.d.ts +48 -0
  2. package/dist/lib/__tests__/setup.js +1 -0
  3. package/dist/lib/config/aws/accountId.d.ts +6 -0
  4. package/dist/lib/config/aws/accountId.js +33 -0
  5. package/dist/lib/config/aws/backupGlobalSettings.d.ts +29 -0
  6. package/dist/lib/config/aws/backupGlobalSettings.js +51 -0
  7. package/dist/lib/config/aws/costAllocationTags.d.ts +12 -0
  8. package/dist/lib/config/aws/costAllocationTags.js +48 -0
  9. package/dist/lib/config/aws/eventBus.d.ts +7 -0
  10. package/dist/lib/config/aws/eventBus.js +24 -0
  11. package/dist/lib/config/aws/identityCenterGroupMembership.d.ts +10 -0
  12. package/dist/lib/config/aws/identityCenterGroupMembership.js +115 -0
  13. package/dist/lib/config/aws/ipamDelegateAdmin.d.ts +8 -0
  14. package/dist/lib/config/aws/ipamDelegateAdmin.js +58 -0
  15. package/dist/lib/config/aws/ipamPoolId.d.ts +10 -0
  16. package/dist/lib/config/aws/ipamPoolId.js +39 -0
  17. package/dist/lib/config/aws/organisation.d.ts +30 -0
  18. package/dist/lib/config/aws/organisation.js +95 -0
  19. package/dist/lib/config/aws/organisationId.d.ts +7 -0
  20. package/dist/lib/config/aws/organisationId.js +46 -0
  21. package/dist/lib/config/aws/organisationsAccess.d.ts +10 -0
  22. package/dist/lib/config/aws/organisationsAccess.js +50 -0
  23. package/dist/lib/config/aws/ramSharing.d.ts +4 -0
  24. package/dist/lib/config/aws/ramSharing.js +35 -0
  25. package/dist/lib/config/monitoring.d.ts +18 -0
  26. package/dist/lib/config/monitoring.js +22 -0
  27. package/dist/lib/patterns/aws/cicdRole.d.ts +67 -0
  28. package/dist/lib/patterns/aws/cicdRole.js +68 -0
  29. package/dist/lib/patterns/aws/compute.js +9 -0
  30. package/dist/lib/patterns/aws/computeLambda.d.ts +38 -3
  31. package/dist/lib/patterns/aws/computeLambda.js +29 -2
  32. package/dist/lib/patterns/aws/hostedZone.d.ts +28 -0
  33. package/dist/lib/patterns/aws/hostedZone.js +150 -0
  34. package/dist/lib/patterns/aws/managedAccount.d.ts +9 -0
  35. package/dist/lib/patterns/aws/managedAccount.js +55 -0
  36. package/dist/lib/patterns/aws/managedIdentityCenter.d.ts +4 -0
  37. package/dist/lib/patterns/aws/managedIdentityCenter.js +24 -0
  38. package/dist/lib/patterns/aws/managedOrganisation.d.ts +36 -0
  39. package/dist/lib/patterns/aws/managedOrganisation.js +97 -0
  40. package/dist/lib/patterns/aws/managedPlatform.d.ts +12 -0
  41. package/dist/lib/patterns/aws/managedPlatform.js +29 -0
  42. package/dist/lib/patterns/aws/subdomainHostedZone.d.ts +9 -0
  43. package/dist/lib/patterns/aws/subdomainHostedZone.js +39 -0
  44. package/dist/lib/resources/aws/cicd/cicdRole.d.ts +65 -0
  45. package/dist/lib/resources/aws/cicd/cicdRole.js +191 -0
  46. package/dist/lib/resources/aws/compute/ecsFreeTier.d.ts +75 -0
  47. package/dist/lib/resources/aws/compute/ecsFreeTier.js +1 -0
  48. package/dist/lib/resources/aws/compute/ecsImages.js +3 -25
  49. package/dist/lib/resources/aws/compute/ecsSpot.d.ts +75 -0
  50. package/dist/lib/resources/aws/compute/ecsSpot.js +1 -0
  51. package/dist/lib/resources/aws/compute/imageTagParameter.d.ts +12 -0
  52. package/dist/lib/resources/aws/compute/imageTagParameter.js +32 -0
  53. package/dist/lib/resources/aws/compute/utilities/capacityProviderDrainWaiter.d.ts +20 -0
  54. package/dist/lib/resources/aws/compute/utilities/capacityProviderDrainWaiter.js +1 -0
  55. package/dist/lib/resources/aws/database/database.d.ts +14 -0
  56. package/dist/lib/resources/aws/database/database.js +28 -0
  57. package/dist/lib/resources/aws/database/databaseInstance.d.ts +15 -0
  58. package/dist/lib/resources/aws/database/databaseInstance.js +30 -0
  59. package/dist/lib/resources/aws/iam/identityCenter/attachManagedPolicy.d.ts +13 -0
  60. package/dist/lib/resources/aws/iam/identityCenter/attachManagedPolicy.js +52 -0
  61. package/dist/lib/resources/aws/iam/securityGroup.d.ts +5 -0
  62. package/dist/lib/resources/aws/iam/securityGroup.js +14 -0
  63. package/dist/lib/resources/aws/monitoring/monitoringRole.d.ts +28 -0
  64. package/dist/lib/resources/aws/monitoring/monitoringRole.js +125 -0
  65. package/dist/lib/resources/aws/utilities/cfnOutput.d.ts +5 -0
  66. package/dist/lib/resources/aws/utilities/cfnOutput.js +1 -0
  67. package/dist/lib/utils/addSuffixToEmail.js +5 -1
  68. package/dist/lib/utils/capitalizeString.d.ts +1 -0
  69. package/dist/lib/utils/capitalizeString.js +7 -0
  70. package/package.json +4 -4
  71. package/dist/lib/config/aws/identityCenterMembership.d.ts +0 -11
  72. package/dist/lib/config/aws/identityCenterMembership.js +0 -61
@@ -1,3 +1,7 @@
1
- export default function addSuffixToEmail(email, suffix) {
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.default = addSuffixToEmail;
4
+ function addSuffixToEmail(email, suffix) {
2
5
  return email.replace("@", `+${suffix}@`);
3
6
  }
7
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYWRkU3VmZml4VG9FbWFpbC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL2xpYi91dGlscy9hZGRTdWZmaXhUb0VtYWlsLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7O0FBQUEsbUNBS0M7QUFMRCxTQUF3QixnQkFBZ0IsQ0FDdEMsS0FBYSxFQUNiLE1BQWM7SUFFZCxPQUFPLEtBQUssQ0FBQyxPQUFPLENBQUMsR0FBRyxFQUFFLElBQUksTUFBTSxHQUFHLENBQUMsQ0FBQztBQUMzQyxDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiZXhwb3J0IGRlZmF1bHQgZnVuY3Rpb24gYWRkU3VmZml4VG9FbWFpbChcbiAgZW1haWw6IHN0cmluZyxcbiAgc3VmZml4OiBzdHJpbmdcbik6IHN0cmluZyB7XG4gIHJldHVybiBlbWFpbC5yZXBsYWNlKFwiQFwiLCBgKyR7c3VmZml4fUBgKTtcbn1cbiJdfQ==
@@ -0,0 +1 @@
1
+ export declare function capitalizeString(string: string): string;
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.capitalizeString = capitalizeString;
4
+ function capitalizeString(string) {
5
+ return String(string).charAt(0).toUpperCase() + String(string).slice(1);
6
+ }
7
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY2FwaXRhbGl6ZVN0cmluZy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL2xpYi91dGlscy9jYXBpdGFsaXplU3RyaW5nLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7O0FBQUEsNENBRUM7QUFGRCxTQUFnQixnQkFBZ0IsQ0FBQyxNQUFjO0lBQzdDLE9BQU8sTUFBTSxDQUFDLE1BQU0sQ0FBQyxDQUFDLE1BQU0sQ0FBQyxDQUFDLENBQUMsQ0FBQyxXQUFXLEVBQUUsR0FBRyxNQUFNLENBQUMsTUFBTSxDQUFDLENBQUMsS0FBSyxDQUFDLENBQUMsQ0FBQyxDQUFDO0FBQzFFLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgZnVuY3Rpb24gY2FwaXRhbGl6ZVN0cmluZyhzdHJpbmc6IHN0cmluZyk6IHN0cmluZyB7XG4gIHJldHVybiBTdHJpbmcoc3RyaW5nKS5jaGFyQXQoMCkudG9VcHBlckNhc2UoKSArIFN0cmluZyhzdHJpbmcpLnNsaWNlKDEpO1xufVxuIl19
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fjall/components-infrastructure",
3
- "version": "2.30.0",
3
+ "version": "2.30.3",
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": "^2.30.0",
71
- "@fjall/util": "^2.30.0",
70
+ "@fjall/generator": "^2.30.3",
71
+ "@fjall/util": "^2.30.3",
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": "ec35b16db566dfa5feb714c16f132c55b4663c86"
85
+ "gitHead": "d398edc0c0edf661d7ab6e5a47623529f68dfd2a"
86
86
  }
@@ -1,11 +0,0 @@
1
- import { NestedStack, type NestedStackProps } from "aws-cdk-lib";
2
- import { type Construct } from "constructs";
3
- export interface IdentityCenterMembershipProps extends NestedStackProps {
4
- identityStoreId: string;
5
- groupId: string;
6
- groupMembers: string[];
7
- }
8
- export declare function validateIdentityCenterMembershipProps(props: IdentityCenterMembershipProps): void;
9
- export declare class IdentityCenterMembership extends NestedStack {
10
- constructor(scope: Construct, id: string, props: IdentityCenterMembershipProps);
11
- }
@@ -1,61 +0,0 @@
1
- import * as customResources from "aws-cdk-lib/custom-resources";
2
- import { NestedStack } from "aws-cdk-lib";
3
- import { AwsCustomResource } from "../../resources/aws/utilities/awsCustomResource.js";
4
- import { GroupMembership } from "../../resources/aws/iam/identityCenter/groupMembership.js";
5
- import { stripAndCamelCase } from "../../utils/stripAndCamelCase.js";
6
- const IDENTITY_STORE_SERVICE = "identityStore";
7
- export function validateIdentityCenterMembershipProps(props) {
8
- if (!props.identityStoreId) {
9
- throw new Error("IdentityCenterMembership requires identityStoreId from the parent IdentityCenter construct.");
10
- }
11
- if (!props.groupId) {
12
- throw new Error("IdentityCenterMembership requires groupId from a Group construct.");
13
- }
14
- if (props.groupMembers.length === 0) {
15
- throw new Error("IdentityCenterMembership requires at least one member email. Empty groups should be skipped at the caller.");
16
- }
17
- const seen = new Set();
18
- for (const member of props.groupMembers) {
19
- if (!member.includes("@")) {
20
- throw new Error(`IdentityCenterMembership: "${member}" is not a valid email — Identity Center memberships look up users by UserName (email)`);
21
- }
22
- if (seen.has(member)) {
23
- throw new Error(`Duplicate member "${member}" in IdentityCenterMembership groupMembers.`);
24
- }
25
- seen.add(member);
26
- }
27
- }
28
- export class IdentityCenterMembership extends NestedStack {
29
- constructor(scope, id, props) {
30
- super(scope, id, props);
31
- validateIdentityCenterMembershipProps(props);
32
- for (const member of props.groupMembers) {
33
- const [localPart] = member.split("@");
34
- const suffix = stripAndCamelCase(localPart ?? member);
35
- const listUsersCall = {
36
- service: IDENTITY_STORE_SERVICE,
37
- action: "listUsers",
38
- parameters: {
39
- IdentityStoreId: props.identityStoreId,
40
- Filters: [
41
- {
42
- AttributePath: "UserName",
43
- AttributeValue: member
44
- }
45
- ]
46
- },
47
- physicalResourceId: customResources.PhysicalResourceId.of(`listUsers${suffix}`)
48
- };
49
- const userLookup = new AwsCustomResource(this, `User${suffix}`, {
50
- onCreate: listUsersCall,
51
- onUpdate: listUsersCall
52
- });
53
- const userId = userLookup.getResponseField("Users.0.UserId");
54
- new GroupMembership(this, `Membership${suffix}`, {
55
- identityStoreId: props.identityStoreId,
56
- groupId: props.groupId,
57
- userId
58
- });
59
- }
60
- }
61
- }