nixops-aws
nixops-aws copied to clipboard
ebsOptimized seems to have no effect
I'm seeing the same issue as https://github.com/NixOS/nixops/issues/488
If I deploy the same instance in the same region and availability zone via the AWS console, it's EBS Optimized. If I deploy via nixops, EBS Optimized is false. Instance is m4.large.
A workaround is to stop the newly-launched instance and run:
aws ec2 modify-instance-attribute --instance-id i-xxxx --ebs-optimized
Note that this does not work for spot instances as they cannot be stopped.
The problem seems to be here: https://github.com/NixOS/nixops/blob/55391626bb8e9abad4609e9f4b8a6cbb8a19bce8/nixops/backends/ec2.py#L884-L891
If I set prefer_ebs_optimized
to True
I get an EBS Optimized instance. Note that I do not have any EBS volumes defined but I want to have an EBS Optimized instance for the volumes I will attach manually.