An error occurred during keypairs initialization

Issue

When I try to create a PSE Cluster I see this error:

An error occurred during keypairs initialization (1) - see /Users/inifc/cloudbees/support/cases/39300/sharedSlavesTest/.dna/logs/last/keypairs
cluster-init failed

If I take a look to keypairs file seems like the keypair already exist.

aws_key_pair.default: Creating...
  fingerprint: "" => "<computed>"
  key_name:    "" => "psesharedslavestest"
  public_key:  "" => "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDa8HWtfsGJinG1g/utvuhkDnEUWNzDcKuwcwhK/gfQFnY0ZtvseS9ZpylzctUZLLCAX1Vr4wjB+iRHw9q5133yJVSq+mh3Mqi8liO6m5AeFJMOW00D9zEV/nBIhGGlq1F4U3KTEdvgywvUoqoWsH8Nl5PR9uxWSh/rNyyxAgDSqe8RHfWSZfD66tkTwHhD3wz5mzyd3kF3zjSlu8HV9eHjJpNXAcjSeJ+T7SkuTTX/6ORG5ArW3lqGSHB+Z8A7Jg9RQh0dMOSjuBZiAIoxMdEGcPMG0z+9N+tFioPSrkgP7ZZ+HVZeLWQG8BPdhaMd/1ikfm+BA4z60Hh0YdGBiCpH inifc@warhead"
Error applying plan:

1 error(s) occurred:

* aws_key_pair.default: Error import KeyPair: InvalidKeyPair.Duplicate: The keypair 'psesharedslavestest' already exists.
	status code: 400, request id: b3487c19-30a7-457b-8ad1-fbd46aca736e

Terraform does not automatically rollback in the face of errors.
Instead, your Terraform state file has been partially updated with
any resources that successfully completed. Please address the error
above and apply again to incrementally change your infrastructure.
Error running terraform apply -no-color in /Users/inifc/cloudbees/support/cases/39300/sharedSlavesTest/.dna/.terraform/keypairs

Environment

  • CloudBees Jenkins Enterprise (CJE)
  • Amazon Web Services (AWS)

Resolution

You could delete keypair in AWS if it is not longer need or you could change the name of cluster.

Have more questions? Submit a request

0 Comments

Please sign in to leave a comment.