Metadata is mostly for organizing and presenting Parameters in a better way when using CloudFormation in the AWS Web UI.
default: EFS Export Configuration Parameters:
These are the input parameters for this template. All of these parameters must be supplied for this template to be deployed.
Type: String Description: Name of the EFS Volume
The following tags are applied to all resources created by this template.
These are all of the resources deployed by this template.
Lambda function to introspect VPCs, subnets, and select most available
This deploys the S3 bucket with some tags. The bucket has versioning enabled because this is where backups will go for now.
Create an EFS entity to be used as a shared filesystem for the application instances. FileSystem: Type: AWS::EFS::FileSystem Properties: FileSystemTags:
- Key: Name
Value: !Ref EFSName
- Key: service
Value: !Ref TagService
- Key: environment
Value: !Ref TagEnvironment
- Key: contactnetid
Value: !Ref TagContactNetID
- Key: accountnumber
Value: !Ref TagAccountNumber
- Key: ticketnumber
Value: !Ref TagTicketNumber
EFS Mountpoints must be created for each Availability Zone in the VPC. This is also where you define access controls, as access to EFS is controlled by these security groups.
A pair of mount points must be created for each EFS volume. EFSMountTargetZoneA: Type: AWS::EFS::MountTarget Properties: FileSystemId: !Ref FileSystem SubnetId: !GetAtt AccountInfo.private-subnet-a SecurityGroups:
- Ref: EFSSecurityGroup
EFSMountTargetZoneB: Type: AWS::EFS::MountTarget Properties: FileSystemId: !Ref FileSystem SubnetId: !GetAtt AccountInfo.private-subnet-b SecurityGroups:
- Ref: EFSSecurityGroup
This security group defines what resources are able to access the EFS shared filesystem. EFSSecurityGroup: Type: AWS::EC2::SecurityGroup Properties: GroupDescription: Allow EFS Ports to EFS Volume VpcId: !GetAtt AccountInfo.vpcid Tags:
- Key: Name
Value: !Sub "${EFSName}-efs-sg"
- Key: service
Value: !Ref TagService
- Key: environment
Value: !Ref TagEnvironment
- Key: contactnetid
Value: !Ref TagContactNetID
- Key: accountnumber
Value: !Ref TagAccountNumber
- Key: ticketnumber
Value: !Ref TagTicketNumber
Allow inbound traffic on port 22 from Various IP Ranges
Allow inbound traffic on ports from Various IP Ranges
Output values that can be viewed from the AWS CloudFormation console.
Description: "EFS export" Value: !Ref FileSystem Export: Name: !Sub "${AWS::StackName}-fs-id"
Description: "EFS Security Group" Value: !Ref EFSSecurityGroup Export: Name: !Sub "${AWS::StackName}-efs-sg"
ASIS Linux Foundation CloudFormation Deployment
This CloudFormation template will deploy pieces set up for ASIS Linux