Ask Your Question
0

heat template

asked 2017-01-14 20:26:37 -0600

tcpip gravatar image

updated 2017-01-16 08:13:03 -0600

zaneb gravatar image

Hello,

I have the following heat template, when I try to run this template I get this error

I have no spaces or tabs

$ heat stack-create  my_second -f demo1.yml
WARNING (shell) "heat stack-create" is deprecated, please use "openstack stack create" instead
ERROR: Value must be a string

Any ideas? thanks.

heat_template_version: 2017-02-24
description: Launch basic instance

resources:
  web_secgroup:
    type: OS::Neutron::SecurityGroup
    properties:
     rules:
       - protocol: tcp
         remote_ip_prefix: 0.0.0.0/0
         port_range_min: 80
         port_range_max: 80
       - protocol: tcp
         remote_ip_prefix: 0.0.0.0/0
         port_range_min: 443
         port_range_max: 443

  instance_port:
    type: OS::Neutron::Port
    properties:
       network: private
       security_groups:
         - default
         - { get_resources: web_secgroup }
       fixed_ips:
           - subnet_id: private-subnet

  instance:
      type: OS::Nova::Server
      properties:
         flavor: m1.tiny
         image: cirros-0.3.4-x86_64-uec
         networks:
             - port: { get_resources: instance_port }
edit retag flag offensive close merge delete

Comments

Is there a tab in your template? Do you get a better error message when using the openstack CLI?

Bernd Bausch gravatar imageBernd Bausch ( 2017-01-15 08:31:56 -0600 )edit

1 answer

Sort by ยป oldest newest most voted
0

answered 2017-01-16 08:15:14 -0600

zaneb gravatar image

get_resources isn't a thing. get_resource is. That's probably the issue.

edit flag offensive delete link more

Comments

Yes, "get_resource" should be used instead of "get_resources". http://docs.openstack.org/developer/h...

Jeffrey Guan gravatar imageJeffrey Guan ( 2017-01-22 00:10:30 -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: 2017-01-14 20:26:37 -0600

Seen: 1,199 times

Last updated: Jan 16 '17