terraform-provider-vra7 icon indicating copy to clipboard operation
terraform-provider-vra7 copied to clipboard

get vm by IP/hostname using data source

Open ankujuniyal opened this issue 3 years ago • 0 comments

Hi Right now you can get instance by deployment id or request id. (https://registry.terraform.io/providers/vmware/vra7/latest/docs/data-sources/vra7_deployment#example-usages) what if i got vm through VRA itself. then I want to perform day 1 action using terraform.

using API its possible get vm using hostname.

https://VRA/catalog-service/api/consumer/resources/types/Infrastructure.Machine/? params = ( ('$filter', 'name eq '+''' + str(vm_hostname)+'''), ('$skip', '0'), ('$top', '10'), )

ankujuniyal avatar Apr 02 '21 03:04 ankujuniyal