@justworkflowit/cdk-constructs 0.0.218 → 0.0.220
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.
|
@@ -4,6 +4,7 @@ export interface JustWorkflowItConstructsProps {
|
|
|
4
4
|
organizationId: string;
|
|
5
5
|
workflowDefinitions: string[];
|
|
6
6
|
ignoreDefinitionDeployerFailures?: boolean;
|
|
7
|
+
justWorkflowItAccountId?: string;
|
|
7
8
|
}
|
|
8
9
|
export declare class JustWorkflowItConstructs extends Construct {
|
|
9
10
|
private static readonly CONSTRUCT_ID_PREFIX;
|
|
@@ -143,10 +143,13 @@ class JustWorkflowItConstructs extends constructs_1.Construct {
|
|
|
143
143
|
});
|
|
144
144
|
provider.node.addDependency(bucketDeployment);
|
|
145
145
|
resource.node.addDependency(bucketDeployment);
|
|
146
|
+
// Default to production account (588738588052) for customer deployments
|
|
147
|
+
// Can be overridden for integration tests or other scenarios
|
|
148
|
+
const justWorkflowItAccountId = props.justWorkflowItAccountId || '588738588052';
|
|
146
149
|
const executionRole = new aws_iam_1.Role(this, 'JustWorkflowItAutomationExecutionRole', {
|
|
147
150
|
roleName: `JustWorkflowItExecutionRole`,
|
|
148
|
-
assumedBy: new aws_iam_1.AccountPrincipal(
|
|
149
|
-
description:
|
|
151
|
+
assumedBy: new aws_iam_1.AccountPrincipal(justWorkflowItAccountId),
|
|
152
|
+
description: `Role assumed by JustWorkflowIt backend (account ${justWorkflowItAccountId}) to perform actions inside this account.`,
|
|
150
153
|
});
|
|
151
154
|
executionRole.addToPolicy(new aws_iam_1.PolicyStatement({
|
|
152
155
|
actions: ['lambda:InvokeFunction'],
|