nixops-aws icon indicating copy to clipboard operation
nixops-aws copied to clipboard

`nixops destroy` ask for confirmation for keypairs

Open danbst opened this issue 10 years ago • 2 comments

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.

danbst avatar Jul 15 '15 10:07 danbst

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?

exarkun avatar Oct 26 '18 11:10 exarkun

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

tewfik-ghariani avatar May 13 '20 22:05 tewfik-ghariani