Hello Community,
I want to tag a VM during deployment with tags I collected in the input form. There are between 5 and 10 tags I want to tag to a new VM.
The format I collected is an array of string e.g.
Location:London
OS:Debian
Now the question is how can I process this in Cloud Template
VM:
type: Cloud.vSphere.Machine
properties:
customizeGuestOs: false
awaitIp: false
name: '${input.servername}'
tags:
- key:
- value:
[...]
Many thanks,
Dex
Hi,
thanks for your reply. In my case I don't want to use tags for constraints or capabilities. I need to tag the vm object in vCenter. There are several vCenter tags used for reporting and so on.
So I actually stuck because I have an array of tags in format:
Location:London
OS:Debian
and Cloud Assembly seems to accept just one key-value pair:
[...]
VM:
type: Cloud.vSphere.Machine
properties:
customizeGuestOs: false
awaitIp: false
name: '${input.servername}'
tags:
- key:
- value:
[...]
How can I add more than one key value pair here?
Thanks and kind regards,
Dex
[...]
VM:
type: Cloud.vSphere.Machine
properties:
customizeGuestOs: false
awaitIp: false
name: '${input.servername}'
tags:
- key:
- value:
- key:
- value:
- key:
- value:
[...]
See code. It's pretty simple.