Ask Your Question

Torsten Grünen's profile - activity

2020-02-26 12:38:26 -0500 received badge  Notable Question (source)
2019-12-16 22:28:40 -0500 received badge  Popular Question (source)
2019-12-15 06:39:46 -0500 asked a question Heat Template: 2nd interface

Hi.. How can I add more than one interface (in a different network) in my heat template?

heat_template_version: 2014-10-16

description: Proxy-Server BadBank
parameters:
   az:
      type: string
      default: eu-de-01
   key:
     type: string
     default: blabla
   volume_size:
     type: string
     default: 20
   flavor:
     type: string
     default: s2.large.2 
   image:
     type: string
     default: Standard_CentOS_7_latest
   network:
     type: string
     default: c83616ec-a2ab-4622-b3d2-dcc890b44e38
   network2:
     type: string
     default: 78408f55-6e46-4b05-907a-1602a7bb8c05
   security_groups:
     type: string
     default: 5cd60c6e-b4d5-4d59-afb4-1bad7f9a43d8
   admin_pass:
     type: string
     default: Password!
   volume_name:
      type: string
      default: sysXECS0000EVS0001
   instance_name:
      type: string
      default: sysXECS0000
   instance_ip:
      type: string
      default: 10.200.4.10
   instance_ip2:
      type: string
      default: 10.200.6.10

resources:
  server_port:
    type: OS::Neutron::Port
    properties:
      network: { get_param: network }
      fixed_ips: [{"ip_address": { get_param: instance_ip }}]
      security_groups: [{ get_param: security_groups }]
      admin_state_up: true

  data_volume:
    type: OS::Cinder::Volume
    properties:
      name: { get_param: volume_name }
      size: { get_param: volume_size }
      availability_zone: { get_param: az }

  Proxy:
    type: OS::Nova::Server
    properties:
      admin_pass: { get_param: admin_pass }
      availability_zone: { get_param: az }
      name: { get_param: instance_name }
      image: { get_param: image }
      flavor: { get_param: flavor }
      key_name: { get_param: key }
      networks: [{"port": { get_resource: server_port }}]
      tags: [Project, Role]
      user_data_format: RAW
      user_data: |
         #!/bin/bash
         reboot

  volume_attach:
    type: OS::Cinder::VolumeAttachment
    properties:
      volume_id: { get_resource: data_volume }
      instance_uuid: { get_resource: Proxy }