Skip to content
This repository has been archived by the owner on Jun 17, 2024. It is now read-only.

get vm by IP/hostname using data source #114

Open
ankujuniyal opened this issue Apr 2, 2021 · 0 comments
Open

get vm by IP/hostname using data source #114

ankujuniyal opened this issue Apr 2, 2021 · 0 comments

Comments

@ankujuniyal
Copy link

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'),
)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant