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

renaming an aws keypair silently breaks ssh access to machines

Open cleverca22 opened this issue 7 years ago • 0 comments

{
  host1 = { resources, ... }: {
    deployment.targetEnv = "ec2";
    deployment.ec2.region = "eu-central-1";
    deployment.ec2.keyPair = resources.ec2KeyPairs.keypairone;
    deployment.ec2.accessKeyId = "keyname";
    deployment.ec2.ami = "ami-2869bb47";
    deployment.ec2.instanceType = "t2.large";
  };
  resources.ec2KeyPairs.keypairone = {
    accessKeyId = "keyname";
    region = "eu-central-1";
  };
}

to recreate the problem, deploy the above deployment, then rename keypairone to keypairtwo, and you will loose all access to the machine via nixops

the problem can be repaired, if you rename it back to keypairone

cleverca22 avatar Dec 13 '17 20:12 cleverca22