AWSTemplateFormatVersion: "2010-09-09" Description: | This template deploys an EFS file system for the LSF binaries and logs. **WARNING** This template creates an EFS file system. You will be billed for the AWS resources used if you create a stack from this template." Metadata: Authors: Description: Matt Morris (morrmt@amazon.com) License: Description: | Copyright 2022 Amazon.com, Inc. or its affiliates. All Rights Reserved. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.' Parameters: MasterServerSubnet: Description: "Subnet for the EFS Mount Target. This is the same subnet that the LSF master is in." Type: "String" Default: "subnet-331c276e" EFSPerformanceMode: Description: "Select the performance mode of the file system." Type: "String" AllowedValues: - generalPurpose - maxIO Default: generalPurpose EFSThroughputMode: Type: "String" AllowedValues: - bursting - provisioned Default: "bursting" Resources: LSFElasticFileSystem: Type: AWS::EFS::FileSystem Properties: PerformanceMode: !Ref EFSPerformanceMode ThroughputMode: !Ref EFSThroughputMode FileSystemTags: - Key: Name Value: !Ref 'AWS::StackName' LSFEFSMountTarget: Type: "AWS::EFS::MountTarget" Properties: FileSystemId: !Ref LSFElasticFileSystem SubnetId: !Ref MasterServerSubnet SecurityGroups: !Ref MountTargetSecurityGroup MountTargetSG: Type: AWS::EC2::SecurityGroup Properties: GroupDescription: "SG for EFS mount target" MountTargetSGRule01: Type: AWS::EC2::SecurityGroupIngress DependsOn: "MountTargetSG" Properties: GroupName: !Ref MountTargetSG Description: "SSH from VPN-SEA" IpProtocol: "tcp" SourceSecurityGroupName: !Ref UGEComputeNodeSG Outputs: MountTargetID: Description: "Mount target ID" Value: !Ref LSFEFSMountTarget FileSystemID: Description: "File system ID" Value: !Ref LSFElasticFileSystem