VMware Cloud Community
luizspinheiro
Contributor
Contributor

Working SG using inputs

Hello guys.

 

I'm trying to create a drop down, through the input, containing the NSX-T Security Groups, informing if the VM is App, DB or Infra.

 

When I fix it in the code it works, but using input it is including the VM in the 03 SG created in NSX-T.
Does anyone have any ideas?

 

Important, I am using vRA 8.1 and NSX-T 3.0.1

Below the code:

 

formatVersion: 1
inputs:
nome_vm:
type: string
description: ''
default: SRV
title: Nome da VM
minLength: 1
maxLength: 13
format: ''
flavor:
type: string
description: |-
Small - 2vCPU/4GB RAM
Medium - 4vCPU/8GB RAM
Large - 8vCPU/16GB RAM
default: XXX-Small
title: Tamanho
oneOf:
- title: Small
const: XXX-Small
- title: Medium
const: XXX-Medium
- title: Large
const: XXX-Large
rede:
type: string
title: Rede
oneOf:
- title: NSX-10.189.217.0/25
const: 'net:nsx-rede1'
- title: NSX-10.189.217.128/25
const: 'net:nsx-rede2'
sg:
type: string
title: Grupo de Segurança
oneOf:
- title: Aplicação
const: 'sg:app'
- title: Banco de Dados
const: 'sg:db'
resources:
Cloud_vSphere_Machine_1:
type: Cloud.vSphere.Machine
properties:
image: WindowsServer2019
flavor: '${input.flavor}'
name: '${input.nome_vm}'
networks:
- network: '${resource.Cloud_NSX_Network_1.id}'
assignment: static
tgs: '${input.sg}'
folderName: VMw
customizationSpec: Custom_Windows2019
constraints:
- tag: 'compute:vsphere'
Cloud_NSX_Network_1:
type: Cloud.NSX.Network
properties:
networkType: existing
constraints:
- tag: '${input.rede}'

VMware Certified Professional 6 – Data Center Virtualization | VMware Certified Professional 6 – Cloud Management and Automation | VMware Certified Professional - Network Virtualization 2020
0 Kudos
0 Replies