Reply to Message

View discussion in a popup

Replying to:
johnbowdre
Enthusiast
Enthusiast

Cool, I'm glad you were able to track down the source of the issue!

I did some testing with that information and was able to reproduce the same problem you had before; if I set the Naming Template on the Project to something like '${resource.hostname}' without including any randomized digits ('{###}'), there's a conflict because both the computer and network resource try to use the exact same name. 

I was able to work around that by appending '-net' to the property on the network resource:

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 + "-net"}'

 

I can now input a specific hostname to be used for the provisioned VM, and the associated network resource will get named the same but with "-net" tacked on the end.

Reply
0 Kudos