This fixes the behaviour of ec2.associatePublicIpAddress which cannot safely be set to false when deploying inside a subnet before this commit. Add a new option ec2.usePrivateIpAddress which will default to true in the case that associatePublicIpAddress is false and you are deploying to a subnet. Add supporting code in the ec2 backend to support this option. This required storing some state from the defn in the machine state, but it seems that's already being done for other things like the spot instance price so this seems consistent.
When resuming an interrupted spot instance creation, NixOps would generate a new SSH host key. Since the instance would be created with the original host key, this would cause a "REMOTE HOST IDENTIFICATION HAS CHANGED!" warning from ssh.
This causes the right version of GRUB to be selected regardless of whether this is an old or new instance.
…-EC2 backends." This reverts commit 49bb8b8 since it breaks deploying nixos.org: webserver> copying 9 missing paths (2.07 MiB) to ‘email@example.com’... webserver> updating GRUB 2 menu... webserver> installing the GRUB 2 boot loader on /dev/xvda... webserver> Installing for i386-pc platform. webserver> /nix/store/969zn754v76hspiyn32bj44wf6yz1ia6-grub-2.02-git-1de3a4/sbin/grub-install: warning: File system `ext2' doesn't support embedding. webserver> /nix/store/969zn754v76hspiyn32bj44wf6yz1ia6-grub-2.02-git-1de3a4/sbin/grub-install: warning: Embedding is not possible. GRUB can only be installed in this setup by using blocklists. However, blocklists are UNRELIABLE and their use is discouraged.. webserver> /nix/store/969zn754v76hspiyn32bj44wf6yz1ia6-grub-2.02-git-1de3a4/sbin/grub-install: error: will not proceed with blocklists. webserver> /nix/store/xcni2yv1dkbi07028rn7ha4cqiz3fv7b-install-grub.pl: installation of GRUB on /dev/xvda failed webserver> error: unable to activate new configuration error: activation of 1 of 1 machines failed (namely on ‘webserver’) I.e. it caused a switch from GRUB 1 to 2, which doesn't work. @rbvermaa
For dummy.nix it's quite obvious, but ec2.nix actually causes the reference, because the lib attribute is passed to ./lib.nix from _utils_ instead of the lib attribute passed by the module system. Signed-off-by: aszlig <firstname.lastname@example.org>
…oy would fail with an error about mismatch in the values of the DELETE request. Should fix #223.