I have a blueprint that has four inputs: Number of Windows 2019 Machines, Number of CentOS7 Machines, Domain Joined, and Network. For the networks, there are two options. One is a static network and the other is a dynamic DHCP network. The way I'm thinking of approaching this is to toggle the assignment property under the network from static to dynamic based on the input. I think I need to use the '${map_by} function but I'm unsure of the syntax. Below is a sample of the .yaml for the CentOS VM.
Was thinking maybe something like this in place of static below: '${map_by(input.Network[Network: Demo Routed] => {"static"}}'
CentOS7:
type: Cloud.vSphere.Machine
properties:
image: CentOS7
count: '${input.CentOS7Count}'
customizationSpec: CentOS
osType: LIN
cpuCount: 2
totalMemoryMB: 2048
Username: '${env.requestedBy}'
networks:
- network: '${resource.Cloud_vSphere_Network_1.id}'
assignment: static