heat_template_version: 2021-04-16 description: A simple template for launching a server instance. parameters: key_name: type: string description: Keypair for SSH access constraints: - custom_constraint: nova.keypair description: Must be an existing keypair flavor: type: string description: Flavor default: t3.xsmall constraints: - custom_constraint: nova.flavor description: Must be an existing flavor image: type: string description: Image ID or name default: NeCTAR Ubuntu 22.04 LTS (Jammy) amd64 availability_zone: type: string description: Availability Zone resources: basic_secgroup: # https://docs.openstack.org/heat/latest/template_guide/openstack.html#OS::Neutron::SecurityGroup type: OS::Neutron::SecurityGroup properties: rules: - remote_ip_prefix: 0.0.0.0/0 protocol: icmp - remote_ip_prefix: 0.0.0.0/0 protocol: tcp port_range_min: 22 port_range_max: 22 basic_server: # https://docs.openstack.org/heat/latest/template_guide/openstack.html#OS::Nova::Server type: OS::Nova::Server properties: key_name: { get_param: key_name } image: { get_param: image } flavor: { get_param: flavor } availability_zone: { get_param: availability_zone } security_groups: - { get_resource: basic_secgroup } networks: - allocate_network: auto outputs: server_ip: description: The IP address of the deployed server value: { get_attr: [basic_server, first_address] }