@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.
- package/dist/lib/__tests__/setup.d.ts +48 -0
- package/dist/lib/__tests__/setup.js +1 -0
- package/dist/lib/config/aws/accountId.d.ts +6 -0
- package/dist/lib/config/aws/accountId.js +33 -0
- package/dist/lib/config/aws/backupGlobalSettings.d.ts +29 -0
- package/dist/lib/config/aws/backupGlobalSettings.js +51 -0
- package/dist/lib/config/aws/costAllocationTags.d.ts +12 -0
- package/dist/lib/config/aws/costAllocationTags.js +48 -0
- package/dist/lib/config/aws/eventBus.d.ts +7 -0
- package/dist/lib/config/aws/eventBus.js +24 -0
- package/dist/lib/config/aws/identityCenterGroupMembership.d.ts +10 -0
- package/dist/lib/config/aws/identityCenterGroupMembership.js +115 -0
- package/dist/lib/config/aws/ipamDelegateAdmin.d.ts +8 -0
- package/dist/lib/config/aws/ipamDelegateAdmin.js +58 -0
- package/dist/lib/config/aws/ipamPoolId.d.ts +10 -0
- package/dist/lib/config/aws/ipamPoolId.js +39 -0
- package/dist/lib/config/aws/organisation.d.ts +30 -0
- package/dist/lib/config/aws/organisation.js +95 -0
- package/dist/lib/config/aws/organisationId.d.ts +7 -0
- package/dist/lib/config/aws/organisationId.js +46 -0
- package/dist/lib/config/aws/organisationsAccess.d.ts +10 -0
- package/dist/lib/config/aws/organisationsAccess.js +50 -0
- package/dist/lib/config/aws/ramSharing.d.ts +4 -0
- package/dist/lib/config/aws/ramSharing.js +35 -0
- package/dist/lib/config/monitoring.d.ts +18 -0
- package/dist/lib/config/monitoring.js +22 -0
- package/dist/lib/patterns/aws/cicdRole.d.ts +67 -0
- package/dist/lib/patterns/aws/cicdRole.js +68 -0
- package/dist/lib/patterns/aws/compute.js +9 -0
- package/dist/lib/patterns/aws/computeLambda.d.ts +38 -3
- package/dist/lib/patterns/aws/computeLambda.js +29 -2
- package/dist/lib/patterns/aws/hostedZone.d.ts +28 -0
- package/dist/lib/patterns/aws/hostedZone.js +150 -0
- package/dist/lib/patterns/aws/managedAccount.d.ts +9 -0
- package/dist/lib/patterns/aws/managedAccount.js +55 -0
- package/dist/lib/patterns/aws/managedIdentityCenter.d.ts +4 -0
- package/dist/lib/patterns/aws/managedIdentityCenter.js +24 -0
- package/dist/lib/patterns/aws/managedOrganisation.d.ts +36 -0
- package/dist/lib/patterns/aws/managedOrganisation.js +97 -0
- package/dist/lib/patterns/aws/managedPlatform.d.ts +12 -0
- package/dist/lib/patterns/aws/managedPlatform.js +29 -0
- package/dist/lib/patterns/aws/subdomainHostedZone.d.ts +9 -0
- package/dist/lib/patterns/aws/subdomainHostedZone.js +39 -0
- package/dist/lib/resources/aws/cicd/cicdRole.d.ts +65 -0
- package/dist/lib/resources/aws/cicd/cicdRole.js +191 -0
- package/dist/lib/resources/aws/compute/ecsFreeTier.d.ts +75 -0
- package/dist/lib/resources/aws/compute/ecsFreeTier.js +1 -0
- package/dist/lib/resources/aws/compute/ecsImages.js +3 -25
- package/dist/lib/resources/aws/compute/ecsSpot.d.ts +75 -0
- package/dist/lib/resources/aws/compute/ecsSpot.js +1 -0
- package/dist/lib/resources/aws/compute/imageTagParameter.d.ts +12 -0
- package/dist/lib/resources/aws/compute/imageTagParameter.js +32 -0
- package/dist/lib/resources/aws/compute/utilities/capacityProviderDrainWaiter.d.ts +20 -0
- package/dist/lib/resources/aws/compute/utilities/capacityProviderDrainWaiter.js +1 -0
- package/dist/lib/resources/aws/database/database.d.ts +14 -0
- package/dist/lib/resources/aws/database/database.js +28 -0
- package/dist/lib/resources/aws/database/databaseInstance.d.ts +15 -0
- package/dist/lib/resources/aws/database/databaseInstance.js +30 -0
- package/dist/lib/resources/aws/iam/identityCenter/attachManagedPolicy.d.ts +13 -0
- package/dist/lib/resources/aws/iam/identityCenter/attachManagedPolicy.js +52 -0
- package/dist/lib/resources/aws/iam/securityGroup.d.ts +5 -0
- package/dist/lib/resources/aws/iam/securityGroup.js +14 -0
- package/dist/lib/resources/aws/monitoring/monitoringRole.d.ts +28 -0
- package/dist/lib/resources/aws/monitoring/monitoringRole.js +125 -0
- package/dist/lib/resources/aws/utilities/cfnOutput.d.ts +5 -0
- package/dist/lib/resources/aws/utilities/cfnOutput.js +1 -0
- package/dist/lib/utils/addSuffixToEmail.js +5 -1
- package/dist/lib/utils/capitalizeString.d.ts +1 -0
- package/dist/lib/utils/capitalizeString.js +7 -0
- package/package.json +4 -4
- package/dist/lib/config/aws/identityCenterMembership.d.ts +0 -11
- package/dist/lib/config/aws/identityCenterMembership.js +0 -61
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { CfnParameter } from "aws-cdk-lib";
|
|
2
|
+
import { type Construct } from "constructs";
|
|
3
|
+
/**
|
|
4
|
+
* Get or create the per-key image-tag CfnParameter (logical id from
|
|
5
|
+
* `imageTagParameterName`). Idempotent by logical id: a second call with the
|
|
6
|
+
* same key reuses the existing parameter (needed when several Lambda
|
|
7
|
+
* functions share one `image` build key, or when a service is wired up more
|
|
8
|
+
* than once within a stack). Distinct keys that happen to collide on the same
|
|
9
|
+
* PascalCase logical id fail closed rather than silently aliasing two
|
|
10
|
+
* different things onto one parameter.
|
|
11
|
+
*/
|
|
12
|
+
export declare function getOrCreateImageTagParameter(scope: Construct, key: string): CfnParameter;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { CfnParameter, Stack } from "aws-cdk-lib";
|
|
2
|
+
import { imageTagParameterName } from "@fjall/util";
|
|
3
|
+
function buildImageTagDescription(key) {
|
|
4
|
+
return `Image tag for ${key}. Set by fjall deploy to the content-hash tag.`;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* Get or create the per-key image-tag CfnParameter (logical id from
|
|
8
|
+
* `imageTagParameterName`). Idempotent by logical id: a second call with the
|
|
9
|
+
* same key reuses the existing parameter (needed when several Lambda
|
|
10
|
+
* functions share one `image` build key, or when a service is wired up more
|
|
11
|
+
* than once within a stack). Distinct keys that happen to collide on the same
|
|
12
|
+
* PascalCase logical id fail closed rather than silently aliasing two
|
|
13
|
+
* different things onto one parameter.
|
|
14
|
+
*/
|
|
15
|
+
export function getOrCreateImageTagParameter(scope, key) {
|
|
16
|
+
const stack = Stack.of(scope);
|
|
17
|
+
const paramLogicalId = imageTagParameterName(key);
|
|
18
|
+
const description = buildImageTagDescription(key);
|
|
19
|
+
const existing = stack.node.tryFindChild(paramLogicalId);
|
|
20
|
+
if (existing instanceof CfnParameter) {
|
|
21
|
+
if (existing.description !== description) {
|
|
22
|
+
throw new Error(`CfnParameter logical-ID collision: "${paramLogicalId}" is already registered for a different service. ` +
|
|
23
|
+
`Distinct service/lambda names cannot share a PascalCase identifier — rename one of the conflicting entries.`);
|
|
24
|
+
}
|
|
25
|
+
return existing;
|
|
26
|
+
}
|
|
27
|
+
return new CfnParameter(stack, paramLogicalId, {
|
|
28
|
+
type: "String",
|
|
29
|
+
default: "latest",
|
|
30
|
+
description
|
|
31
|
+
});
|
|
32
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { Construct } from "constructs";
|
|
2
|
+
/**
|
|
3
|
+
* Props for CapacityProviderDrainWaiter
|
|
4
|
+
*/
|
|
5
|
+
interface CapacityProviderDrainWaiterProps {
|
|
6
|
+
/** The ECS cluster name */
|
|
7
|
+
clusterName: string;
|
|
8
|
+
/** The capacity provider name to wait for */
|
|
9
|
+
capacityProviderName: string;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Custom resource that waits for ECS services to drain before allowing
|
|
13
|
+
* capacity provider disassociation.
|
|
14
|
+
*
|
|
15
|
+
* @see https://github.com/aws/aws-cdk/issues/14732
|
|
16
|
+
*/
|
|
17
|
+
export declare class CapacityProviderDrainWaiter extends Construct {
|
|
18
|
+
constructor(scope: Construct, id: string, props: CapacityProviderDrainWaiterProps);
|
|
19
|
+
}
|
|
20
|
+
export {};
|