Reply to Message

View discussion in a popup

Replying to:
johnbowdre
Enthusiast
Enthusiast

Whoops, nope, I was actually overthinking that; the issue was just with the network resource not having the 'hostname' property defined at all - a null value rather than a collision. Remember that the naming template is applied at the resource (not deployment) level so all resources in a template (machine, network, etc) will get named.

So just add 

 

    properties:
      hostname: '${input.hostname}'

 

to the network resource portion of your cloud template and I think you'll be good to go.

All together now:

formatVersion: 1
inputs:
  hostname:
    type: string
    title: Server name
resources:
  Cloud_vSphere_Machine_1:
    type: Cloud.vSphere.Machine
    properties:
      hostname: '${input.hostname}'
      image: cent7
      flavor: micro
      networks:
        - network: '${Cloud_vSphere_Network_1.name}'
  Cloud_vSphere_Network_1:
    type: Cloud.vSphere.Network
    properties:
      hostname: '${input.hostname}'

 

View solution in original post

Reply
0 Kudos