Ask Your Question
0

heat not recognizing keypair

asked 2018-05-19 14:09:53 -0600

mheniMerzouki gravatar image

hy

i have an openstack deployed on my laptop. i'm trying to create a stack with heat.

i have created a keypair openstack keypair create heat_key > heat_key.priv which is recognized by nova nova keypair-list give the following output :

+----------+------+-------------------------------------------------+
| Name     | Type | Fingerprint                                     |
+----------+------+-------------------------------------------------+
| heat_key | ssh  | 0b:7a:36:20:e2:e3:19:3b:ab:a1:95:ac:67:41:67:d7 |
+----------+------+-------------------------------------------------+

this is my simple HOT template :

heat_template_version: 2013-05-23

description: Hot Template to deploy a single server

parameters:
  image_id:
    type: string
    description: Image ID
  key_name:
    type: string
    description: name of keypair to enable ssh to the instance

resources:
  test_stack:
    type: OS::Nova::Server
    properties:
      name: "test_stack"
      image: { get_param: image_id }
      flavor: "ds1G"
      key_name:{ get_param: key_name }

outputs:
  test_stack_ip:
    description: IP of the server
    value: { get_attr: [ test_stack, first_address ] }

when i try to create the stack

openstack stack create -t myTemp.hot --parameter key_name=heat_key --parameter image_id=trusty-server-cloudimg-amd64-disk1 test_stack

i get the following error

ERROR: Property error: : resources.test_stack.properties: : Unknown Property key_name:{ get_param

i have tried with different versions of templates but i get the same error

any idea why this is happening?

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
2

answered 2018-05-19 17:57:04 -0600

YAML requires a space after the colon.

edit flag offensive delete link more

Comments

OMG thank you

mheniMerzouki gravatar imagemheniMerzouki ( 2018-05-19 18:18:32 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2018-05-19 14:09:53 -0600

Seen: 66 times

Last updated: May 19