Skip to content

Commit

Permalink
Remove the need to add new HVM instance types. HVM is the default now…
Browse files Browse the repository at this point in the history
…adays for new instance types, so better to just check if it is not a PV GRUB instance type.
  • Loading branch information
rbvermaa committed Dec 9, 2016
1 parent 50d6e15 commit 0740a03
Showing 1 changed file with 5 additions and 18 deletions.
23 changes: 5 additions & 18 deletions nix/ec2.nix
Original file line number Diff line number Diff line change
Expand Up @@ -138,24 +138,11 @@ let
};

isEc2Hvm =
cfg.instanceType == "cc1.4xlarge"
|| cfg.instanceType == "cc2.8xlarge"
|| cfg.instanceType == "hs1.8xlarge"
|| cfg.instanceType == "cr1.8xlarge"
|| builtins.substring 0 2 cfg.instanceType == "i2"
|| builtins.substring 0 2 cfg.instanceType == "i3"
|| builtins.substring 0 2 cfg.instanceType == "c3"
|| builtins.substring 0 2 cfg.instanceType == "c4"
|| builtins.substring 0 2 cfg.instanceType == "c5"
|| builtins.substring 0 2 cfg.instanceType == "r3"
|| builtins.substring 0 2 cfg.instanceType == "r4"
|| builtins.substring 0 2 cfg.instanceType == "f1"
|| builtins.substring 0 2 cfg.instanceType == "m3"
|| builtins.substring 0 2 cfg.instanceType == "m4"
|| builtins.substring 0 2 cfg.instanceType == "g2"
|| builtins.substring 0 2 cfg.instanceType == "p2"
|| builtins.substring 0 2 cfg.instanceType == "x1"
|| builtins.substring 0 2 cfg.instanceType == "t2";
let
instanceTypeGroup = builtins.elemAt (splitString "." cfg.instanceType) 0;
pvGrubGroups = [ "c1" "hi1" "m1" "m2" "t1" ];
in
! (builtins.elem instanceTypeGroup pvGrubGroups);

# Map "/dev/mapper/xvdX" to "/dev/xvdX".
dmToDevice = dev:
Expand Down

0 comments on commit 0740a03

Please sign in to comment.