From 589f40313c178c07c1fb59271842b16ced7549fa Mon Sep 17 00:00:00 2001 From: lohgannash Date: Fri, 6 Nov 2020 15:54:17 +1100 Subject: [PATCH] Allow config of volumes/volume sizes --- eks-cluster.cfndsl.rb | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/eks-cluster.cfndsl.rb b/eks-cluster.cfndsl.rb index f6a1287..d3d2892 100644 --- a/eks-cluster.cfndsl.rb +++ b/eks-cluster.cfndsl.rb @@ -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) }