heat-templates/hot/mistral/templates/server_with_ip.yaml

47 lines
971 B
YAML

heat_template_version: 2015-04-30
parameters:
image:
type: string
flavor:
type: string
security_group_name:
type: string
metadata:
type: json
resources:
server:
type: OS::Nova::Server
properties:
flavor: {get_param: flavor}
image: {get_param: image}
metadata: {get_param: metadata}
security_groups:
- get_param: security_group_name
floating_ip:
type: OS::Nova::FloatingIP
floating_ip_association:
type: OS::Nova::FloatingIPAssociation
properties:
floating_ip: {get_resource: floating_ip}
server_id: {get_resource: server}
security_group:
type: AWS::EC2::SecurityGroup
properties:
GroupDescription: 'Enable SSH access'
SecurityGroupIngress:
- IpProtocol: 'tcp'
FromPort: '22'
ToPort: '22'
CidrIp: '0.0.0.0/0'
outputs:
ip:
value: {get_attr: [floating_ip, ip]}
server_id:
value: {get_resource: server}