nixops-aws
nixops-aws copied to clipboard
`nixops destroy` ask for confirmation for keypairs
I have ec2 instance, container and my-key-pair resources. When running nixops destroy, program asks for confirmation to destroy ec2 instance (which I deny), confirmation to destroy container (which I say yes) and silently drops my-key-pair. Now I cannot control ec2 instance.
Would be better to add confirmation to all resources, including key pairs.
Current behavior:
$ nixops destroy --deployment $NAME
warning: are you sure you want to destroy EC2 machine ‘infra’? (y/N) n
warning: are you sure you want to destroy EC2 machine ‘lockbox’? (y/N) n
error: keypair ‘charon-....-my-key-pair’ is still in use by ‘lockbox’ (i-...)
Is this resolved?
This has been fixed
https://github.com/NixOS/nixops-aws/blob/720e7d990cb38f5307800de9011c3b1632087e59/nixopsaws/resources/ec2_keypair.py#L133-L136
Commit : https://github.com/NixOS/nixops-aws/commit/9e7d0ef3bc0e106c35fac807919dedc344e4bed4