Lalegre
Commander
Commander

vRA 8.1 - Usage of tags to trigger specific actions

Jump to solution

Hello folks,

I am trying to specify logic about the assignment of the IP to be dynamic or static based on the tag that is applied on the Network object. So far i created two tags called:

  • assignment:static
  • assignment:dynamic

These tags have been applied to Network objects based on how i am handling the IP assignment. Some of them are being handled by a DHCP in NSX and some of them using the internal vRA IPAM. What i would like to do is add a condition on the assignment property for the vSphere Machine to be static if the network has the tag assignment:static or dynamic if the network has the tag assignment:dynamic.

For doing that i am experimenting a little bit and i am using the next validation:

Screenshot_1.png

Everytime i deploy a new VM it picks "dynamic" and i am 100% sure that is because i am using the wrong logic. Is it possible to use that logic based on the tags of another resource inside the Blueprint?

1 Solution

Accepted Solutions
bdamian
Expert
Expert

Lean,

You can build based on tags, but, if you depend on (for instance) Constrains of the Project, this means that the decision will be made after the submit. If you define the restriction IN the blueprint, the decision is made during the completion of the form and, I guess, here is when you can use that logic.

In your case, you are trying to define in the form, something that happens after the submit. Sounds strange to me. So I suppose that you need to put something in the blueprint that you can use as variable for the selection.

Damián Bacalov
vExpert 2017-2018-2019-2020-2021
https://www.linkedin.com/in/damianbacalov/
twitter @bdamian

View solution in original post

0 Kudos
6 Replies
bdamian
Expert
Expert

Hi Lalegre 🙂

Just to clarify, Do you have a Network Selector in the blueprint? How do the Deployment select the target network?

Damián Bacalov
vExpert 2017-2018-2019-2020-2021
https://www.linkedin.com/in/damianbacalov/
twitter @bdamian
0 Kudos
Lalegre
Commander
Commander

Hey Dami! Hope you are doing well :smileygrin:

Basically i removed the network selector as i am using "Environmental tags" as criteria for the placement of the workloads. So the tags are on the resources but not mentioned in the Blueprint. For example:

  • Network1 = assignment:static
  • Network2 = assignment:dynamic

And those two resources have been added to the network profile. So want i want to do is to apply the assignment criteria but without mentioning those resources inside the blueprint statically. In the past i used a similar logic where depend of which network i select it would define static or dynamic like this:

assignment: ${input.network-tag == "network:Network1" ? "dynamic" : "static"}

This worked but as i do not want to mention the network to do it dynamically I cannot put there all the networks I've been adding.

0 Kudos
bdamian
Expert
Expert

So the user doesn't know the network until the deployment is finished?

If this is the case, I'm wondering if, with logic in the blueprint, you can refer to a selection that is made after the submit... I'm not sure, but it sounds weird.

Damián Bacalov
vExpert 2017-2018-2019-2020-2021
https://www.linkedin.com/in/damianbacalov/
twitter @bdamian
0 Kudos
Lalegre
Commander
Commander

Hey,

Already applied that logic in the past using inputs so the assignment was static or dynamic based on the criteria of which Network has been used.

Part of this use case is just deploying workloads on networks based on environment in a multi-tenancy platform for users without knowledge about the platform just purely application owners. 

However i think that for accomplishing the assignment use case i need to mention the resource inside the Blueprint and can not refer to them as tags only. I will keep testing a little bit and some combinations. It is not big deal as for most cases I would definitely use the internal IPAM but it was okay to give it a try.

Will update here!

0 Kudos
bdamian
Expert
Expert

Lean,

You can build based on tags, but, if you depend on (for instance) Constrains of the Project, this means that the decision will be made after the submit. If you define the restriction IN the blueprint, the decision is made during the completion of the form and, I guess, here is when you can use that logic.

In your case, you are trying to define in the form, something that happens after the submit. Sounds strange to me. So I suppose that you need to put something in the blueprint that you can use as variable for the selection.

Damián Bacalov
vExpert 2017-2018-2019-2020-2021
https://www.linkedin.com/in/damianbacalov/
twitter @bdamian

View solution in original post

0 Kudos
Lalegre
Commander
Commander

Yes, you are right I think there is no way of doing it from inside the Blueprint having random networks with Dynamic and Static assignment so i assume here that i will need to modify the logic involving more tags and how are they connected between them.

Thanks Dami!