Packer: temporary_key_pair_name is ignored

Created on 20 Jul 2016  路  8Comments  路  Source: hashicorp/packer

{
  "builders": [{
    "temporary_key_pair_name": "hello",
    "type": "amazon-ebs",
    "ami_name": "Starmount VyOS",
    "instance_type": "t2.medium",
    "source_ami": "ami-9c9a12f4",
    "region": "us-east-1",
    "ssh_username": "vyos",
    "force_deregister": true,
    "ami_regions": [
      "us-east-1"
    ]
  }],
  "provisioners": [{
    "type": "shell",
    "inline": [
      "echo wololo"
    ],
    "execute_command": "{{ .Vars }} sudo -E sh '{{ .Path }}'"
  }]
}
bug buildeamazon

All 8 comments

Most outstanding log line is:
==> amazon-ebs: Creating temporary keypair: packer 578fab50-b4f3-90f5-b123-623223a2e45d

Indeed, this is the culprit: run_config.go#L48-L51

Resolved in #3739, over to you @rickard-von-essen 馃殌

Funny enough, I had a custom name in my templates since forever, but never actually noticed that it was broken. Good catch @TaiSHiNet.

By the way, should we tackle this one too? https://github.com/mitchellh/packer/issues/2301

Thanks @kwilczynski, issue presented itself while working with a VyOS AMI, they don't seem to like spaces in key names

Actually, this is a fair point. I will add an underscore there, to the auto-generated one. It would not harm anything and/or anyone, but might prevent surprises like the one you've had @TaiSHiNet .

@TaiSHiNet so I've made sure that auto-generated SSH key-pair name will have the underscore there between prefix and the UUID.

Thanks @kwilczynski for going through the trouble!

Was this page helpful?
0 / 5 - 0 ratings