Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(batch): ComputeEnvironment implements IConnectable #21458

Merged
merged 10 commits into from
Aug 5, 2022
Prev Previous commit
Next Next commit
doc: Added efs namespace to connectable example
  • Loading branch information
Tim Cutts committed Aug 4, 2022
commit c79b89da0226efbeefac6a9d02e9b491d15b99d6
6 changes: 4 additions & 2 deletions packages/@aws-cdk/aws-batch/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,10 +79,12 @@ const spotEnvironment = new batch.ComputeEnvironment(this, 'MySpotEnvironment',
Compute Environments now implement the IConnectable interface, which means you can use
tcutts marked this conversation as resolved.
Show resolved Hide resolved
connections on other CDK resources to manipulate the security groups and allow access.

For example:
For example, allowing Compute Environments to access an EFS filesystem:
tcutts marked this conversation as resolved.
Show resolved Hide resolved

```ts
declare const fs: efs.Filesystem;
import * as efs from '@aws-cdk/aws-efs';

declare const fs: efs.FileSystem;
declare const ce: batch.ComputeEnvironment;

fs.connections.allowDefaultPortFrom(ce);
Expand Down