Skip to content

Commit

Permalink
Merge pull request #10 from base2Services/feature/block_device_mappings
Browse files Browse the repository at this point in the history
Block device mappings for eks nodes
  • Loading branch information
Guslington committed Nov 6, 2020
2 parents 0ba89bb + c954ad2 commit 1b6de8e
Show file tree
Hide file tree
Showing 2 changed files with 20 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
6 changes: 6 additions & 0 deletions tests/volume_size.test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
test_metadata:
type: config
name: volume_size
description: Test custom volume size

volume_size: 120

0 comments on commit 1b6de8e

Please sign in to comment.