{"action":"opened","issue":{"url":"https://api.github.com/repos/weaveworks/eksctl/issues/91","repository_url":"https://api.github.com/repos/weaveworks/eksctl","labels_url":"https://api.github.com/repos/weaveworks/eksctl/issues/91/labels{/name}","comments_url":"https://api.github.com/repos/weaveworks/eksctl/issues/91/comments","events_url":"https://api.github.com/repos/weaveworks/eksctl/issues/91/events","html_url":"https://github.com/weaveworks/eksctl/issues/91","id":337853019,"node_id":"MDU6SXNzdWUzMzc4NTMwMTk=","number":91,"title":"detect existing KeyPair to avoid failure on second cluster creation","user":{"login":"jstrachan","id":30140,"node_id":"MDQ6VXNlcjMwMTQw","avatar_url":"https://avatars1.githubusercontent.com/u/30140?v=4","gravatar_id":"","url":"https://api.github.com/users/jstrachan","html_url":"https://github.com/jstrachan","followers_url":"https://api.github.com/users/jstrachan/followers","following_url":"https://api.github.com/users/jstrachan/following{/other_user}","gists_url":"https://api.github.com/users/jstrachan/gists{/gist_id}","starred_url":"https://api.github.com/users/jstrachan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jstrachan/subscriptions","organizations_url":"https://api.github.com/users/jstrachan/orgs","repos_url":"https://api.github.com/users/jstrachan/repos","events_url":"https://api.github.com/users/jstrachan/events{/privacy}","received_events_url":"https://api.github.com/users/jstrachan/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-07-03T11:11:22Z","updated_at":"2018-07-03T11:11:22Z","closed_at":null,"author_association":"NONE","body":"I created a cluster and it worked great. I zapped it via the CloudFormation console.\r\n\r\nThen the next time I tried to create a cluster I get an error:\r\n```\r\n2018-07-03T12:07:39+01:00 [ℹ]  importing SSH public key \"/Users/jstrachan/.ssh/id_jstrachan_testing_rsa.pub\" as \"EKS-eks1\"\r\n2018-07-03T12:07:40+01:00 [✖]  importing SSH public key: InvalidKeyPair.Duplicate: The keypair 'EKS-eks1' already exists.\r\n```\r\nI had to manually work around this via:\r\n```\r\naws ec2 delete-key-pair --key-name EKS-eks1 --region us-west-2\r\n```\r\nIt'd be nice to detect this error message and log as a warning and continue; or better use the `aws` CLI to query if the KeyPair exists for the given name first?"}}
{"actor":{"display_login":"jstrachan"}}