nixops-aws
nixops-aws copied to clipboard
renaming an aws keypair silently breaks ssh access to machines
{
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