Skip to content

Commit

Permalink
Update cfn.yaml
Browse files Browse the repository at this point in the history
Added linux client with cifs-utils installed
  • Loading branch information
bquintas authored Aug 6, 2020
1 parent f3cfb65 commit 628f91f
Showing 1 changed file with 32 additions and 2 deletions.
34 changes: 32 additions & 2 deletions storage-gateway/cfn.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,20 @@ Parameters:
WindowsClientAMI:
Type: 'AWS::SSM::Parameter::Value<AWS::EC2::Image::Id>'
Default: '/aws/service/ami-windows-latest/Windows_Server-2019-English-Full-Base'

LinuxClientAmi:
Type: 'AWS::SSM::Parameter::Value<AWS::EC2::Image::Id>'
Default: '/aws/service/ami-amazon-linux-latest/amzn2-ami-hvm-x86_64-ebs'

WindowsClientInstanceType:
Type: String
Default: t3.large
Description: Instance Type for the Storage Gateway
Description: Instance Type for the Windows Client

LinuxClientInstanceType:
Type: String
Default: t3.medium
Description: Instance Type for Linux Client

Resources:

Expand Down Expand Up @@ -507,4 +516,25 @@ Resources:
SubnetId: !Ref SGSubnet1
LaunchTemplate:
LaunchTemplateId: !Ref WindowsClientTemplate
Version: !GetAtt WindowsClientTemplate.LatestVersionNumber
Version: !GetAtt WindowsClientTemplate.LatestVersionNumber

# ---------------------- Linux Client

LinuxClientTemplate:
Type: AWS::EC2::LaunchTemplate
Properties:
LaunchTemplateData:
InstanceType: !Ref LinuxClientInstanceType
DisableApiTermination: false
KeyName: !Ref EC2KeyName
ImageId: !Ref LinuxClientAMI
SecurityGroupIds:
- !Ref SGSecurityGroup
UserData:
Fn::Base64:
!Sub |
#!/bin/bash -xe
yum update -y aws-cfn-bootstrap
yum install -y cifs-utils
LaunchTemplateName: linux-launch-template

0 comments on commit 628f91f

Please sign in to comment.