Skip to content

Commit

Permalink
glue factory duplication
Browse files Browse the repository at this point in the history
  • Loading branch information
malachi-constant committed Apr 5, 2023
1 parent d76a892 commit 0dd8e91
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
13 changes: 8 additions & 5 deletions src/core/glue-factory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,18 @@ import { overrideProps } from "./utils";

export class GlueFactory {
public static job(scope: Construct, id: string, props: glue.JobProps) {
const securityConfiguration = !props.securityConfiguration
? new glue.SecurityConfiguration(scope, `${id}-security-configuration`, {
s3Encryption: {
mode: glue.S3EncryptionMode.S3_MANAGED,
},
})
: undefined;
const defaultProps: Partial<glue.JobProps> = {
maxConcurrentRuns: 1,
maxRetries: 1,
timeout: cdk.Duration.hours(10),
securityConfiguration: new glue.SecurityConfiguration(scope, `${id}-security-configuration`, {
s3Encryption: {
mode: glue.S3EncryptionMode.S3_MANAGED,
},
}),
securityConfiguration: securityConfiguration,
};

const mergedProps = overrideProps(defaultProps, props);
Expand Down
1 change: 1 addition & 0 deletions src/stages/glue-transform.ts
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ export class GlueTransformStage extends StateMachineStage {
role: role,
databaseName: props.databaseName,
targets: targets,
...props.crawlerProps,
});
return crawler;
}
Expand Down

0 comments on commit 0dd8e91

Please sign in to comment.