Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- heat_template_version: 2015-10-15
- description: One VM instance
- parameters:
- name:
- type: string
- label: Name of the VM
- key_pair:
- type: string
- label: Key Pair
- constraints:
- - custom_constraint: nova.keypair
- flavor:
- type: string
- label: Flavor
- constraints:
- - custom_constraint: nova.flavor
- image:
- type: string
- label: Image Name
- constraints:
- - custom_constraint: glance.image
- network:
- type: string
- label: Network
- constraints:
- - custom_constraint: neutron.network
- zone:
- type: string
- label: Availability Zone
- default: Default
- security_groups:
- type: comma_delimited_list
- label: Security Group(s)
- default: "default"
- resources:
- # This port is a separate resource used to assign the security groups
- # to the VM. Can also be used to attach a OS::Neutron::FloatingIP to the VM.
- port:
- type: OS::Neutron::Port
- properties:
- network: { get_param: network }
- name:
- str_replace:
- template: port-VM_NAME
- params:
- VM_NAME: { get_param: name }
- security_groups:
- get_param: security_groups
- instance:
- type: OS::Nova::Server
- properties:
- name: { get_param: name }
- key_name: { get_param: key_pair }
- image: { get_param: image }
- flavor: { get_param: flavor }
- availability_zone: { get_param: zone }
- networks:
- - port: { get_resource: port }
- outputs:
- ip:
- description: Virtual IP address of instance
- value: { get_attr: [ instance, first_address ] }
- port:
- description: Port ID of instance
- value: { get_resource: port }
Add Comment
Please, Sign In to add comment