gbouziden
Enthusiast
Enthusiast

New folder created instead of using existing folder

This deploys VM(s) correctly, but instead of using the existing folder in vsphere, it creates a new one with the same name. I want it to use the existing folder. I have capability tags associated in the cloud zone of all the storage locations as well:

formatVersion: 1
inputs:
  Image:
    type: string
    enum:
      - Rhel8
      - Rhel7
      - Windows Server 2016
      - Windows Server 2019
      - CentOS7
      - CentOS8
    title: Operating System
    default: Rhel8
    format: ''
  Count:
    type: integer
    title: Machine Count
    default: 1
    enum:
      - 1
      - 2
      - 3
      - 4
      - 5
  VM_Size:
    type: string
    enum:
      - Small - 1x1
      - Medium - 4x8
      - Large - 8x16
    title: VM Size
    default: Small - 1x1
    format: ''
  Name:
    type: string
    title: Name
    maxLength: 11
    format: ''
  CustomizationSpec:
    type: string
    title: CustomSpec
    description: Customization Spec for name
    default: name Non DHCP
    encrypted: false
    enum:
      - name Non DHCP
  network:
    type: string
    enum:
      - name-VLAN16
      - name-VLAN164
      - name-VLAN17
      - name-VLAN181
      - name-VLAN185
    default: name-VLAN5
    title: network vlans
  folderName:
    type: string
    enum:
      - name/Core
      - name/Core1
      - name/Core2
      - name/Core3
      - name/Core4
    title: folderName
    #default: - name/Core
resources:
  Cloud_vSphere_Machine_1:
    type: Cloud.vSphere.Machine
    properties:
      image: '${input.Image}'
      flavor: '${input.VM_Size}'
      name: '${input.Name}'
      count: '${input.Count}'
      networks:
        - network: '${resource.Cloud_vSphere_Network_1.id}'
      customizationSpec: '${input.CustomizationSpec}'
      folderName: '${input.folderName}'
      vlanID: '${input.network}'
      constraints:
        - tag: '${input.folderName}'
  Cloud_vSphere_Network_1:
    type: Cloud.vSphere.Network
    properties:
      networkType: existing
      constraints:
        - tag: '${input.network}'
        - tag: 'Tenant:nameInfra'

 

 

Labels (2)
0 Kudos
1 Reply
gbouziden
Enthusiast
Enthusiast

It actually works for every subfolder other than the default and I'm not sure why

0 Kudos