nixops-aws
nixops-aws copied to clipboard
Associate ENIs to a machine using nixops
We have a use case where we access instance privately through directconnect. For this usecase, we use DNS names that resolve to private IP of servers within our VPC. It's of a good use for us to associate to the instances elastic network interfaces in order to keep static private IP addresses in case of instance stop/crash.
I did not find a reference to this in the nixops manual : http://nixos.org/nixops/manual/.
Can we have this feature : attaching an ENI to a VPC instance.
If the feature already exists and I missed it, can someone help on how to do it? Thanks.
@edolstra, did we make progress on this one? thanks.
I did some experimentation with attaching ENIs to NixOS EC2 instances, which seems to work fine. You do need to restart dhcpcd after attaching/removing an ENI, though.
Can you say a bit more about your use case? Do you want NixOps to provision ENIs, for instance, or just be able to attach them?
Well we have Directconnect set up in an account and therefore our apps are accessible internally via a DNS name pointing to the private IP address of instances in the VPC. The thing is that the Private IP addresses would change ifter an instance stop/start. A way to prevent this is by attaching an ENI to each instance so that the Private IPs become static and therefore the DNS names will always point to that unchanged IP address.
Just attaching the ENI would be enough ofr us for now. But having the possiblity to provisions ENI's and configure them with nixops is a very nice thing to have.
Thanks
I'd like to attach ENI at instance launch. EIP -> ENI -> instance.
Changing instance type via nixops is also a problem:
<Message>There are multiple interfaces attached to instance 'i-XXXXXXXX'. Please specify an interface ID for the operation instead.</Message>
We currently have the exact same problem. Has there been any progress on this? @ip1981 @mdallali Have you found any solution/workaround?
Detach an extra interface :-)
@ip1981 I don't really know what you mean by that.
I'd like to attach ENI at instance launch. EIP -> ENI -> instance.
I am looking for a way to do exactly that via NixOps.
Has this ever been implemented? vpc.nix seems to contain at least part of this, but I haven't figured out yet how to build an HTML manual for a recent version of nixops.