Skip to content

Commit

Permalink
Allow config of volumes/volume sizes
Browse files Browse the repository at this point in the history
  • Loading branch information
lohgannash committed Nov 6, 2020
1 parent 0ba89bb commit 589f403
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions eks-cluster.cfndsl.rb
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,20 @@

end

volumes = []
volume_size = external_parameters.fetch(:volume_size, nil)

unless volume_size.nil?
volumes << {
DeviceName: '/dev/xvda',
Ebs: {
VolumeSize: volume_size
}
}
template_data[:BlockDeviceMappings] = volumes
end


EC2_LaunchTemplate(:EksNodeLaunchTemplate) {
LaunchTemplateData(template_data)
}
Expand Down

0 comments on commit 589f403

Please sign in to comment.