VMware Cloud Community
mmonkman
Enthusiast
Enthusiast

Resource names in deployment

Hello, 

Is it possible to obtain the names of all deployed vm resources in a deployment prior to completion?

I need to perform some in guest operations that are dependent on all Windows vm's being deployed and available. The event topic "Deployment completed" has the deploymentId parameter.  Can this be used to query the resource names and if so what's a good approach to doing it?

Thanks

Labels (1)
Reply
0 Kudos
4 Replies
emacintosh
Hot Shot
Hot Shot

if you can do it before the deployment is complete, it could be easier.  For example, during compute provision post phase.  That will called for the compute resource (instead of the deployment resource) and the name will be part of the inputProperties payload.

But if you have to do it for a deployment event, you can get the resource names via the API.  With 8.4, it may be easier with the vRA plugin?  not sure.  But at the very least, I think you can get the iaas machine like this.  Not sure if you need more "API" help in general? 

https://<your vRA>/iaas/api/machines?$filter=deploymentId eq '<the deployment id>'

 

jimmyvandermast
Hot Shot
Hot Shot

The Event Topic "Deployment completed" has the parameter "requestInputs".

So I would think you can simply use the array resourceNames.

inputProperties.get("resourceNames");

mmonkman
Enthusiast
Enthusiast

Hi emacintosh,

Thanks for replying.  Compute provision post fires for each resource in the deployment, whereas I'm looking to obtain all resources in the deployment, and knowing they are all deployed I can run in guest actions.  Basically, the deployed vm's will be part of a windows failover cluster. They all need to be up and available when running the config.  I don't have much in the way of integrated config management.

I think your API route looks like a good approach so I'll take a look at that.

 

mmonkman
Enthusiast
Enthusiast

Hi jimmyvandermast,

Thanks for your reply.  I just tested using Deployment completed and requestInputs map to cloud template input parameters, so resourceNames are not available.

Reply
0 Kudos