Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Data Source to get list of VMs by name #485

Open
bdeetz opened this issue Aug 21, 2023 · 2 comments · May be fixed by #536
Open

Data Source to get list of VMs by name #485

bdeetz opened this issue Aug 21, 2023 · 2 comments · May be fixed by #536

Comments

@bdeetz
Copy link

bdeetz commented Aug 21, 2023

Description

It would be nice to be able to lookup data for a VM by name. For instance:

data "opennebula_virtual_machine" "machines" {
  name = "my-host-*"
}

The result would be all attributes output from the opennebula_virtual_machine resource for all VMs in an ON environment matching that expression. The result could be a list of machines.

New or affected resources and data sources

proposed new: data "opennebula_virtual_machine"

Potential terraform configuration

see description

References

No response

@bdeetz
Copy link
Author

bdeetz commented Aug 21, 2023

This would be useful when deploying services where the service resource provides no outputs regarding the VMs it deploys.

For example. If you deploy OneKE for a kube cluster, you need to pull the kube config off of the master in order to configure your local client to connect. You don't know the IP addr to connect to to retrieve that config. Which means you can't automate retrieval.

@treywelsh
Copy link
Collaborator

I suppose that we should introduce a new datasource opennebula_virtual_machines to be consistent with the openenbula_templates datasource introduced by #322
See doc

@treywelsh treywelsh self-assigned this Nov 28, 2023
@frousselet frousselet modified the milestones: 1.4.0, 1.4.1 Jan 11, 2024
@frousselet frousselet modified the milestones: 1.4.1, 1.5.0 Jan 25, 2024
@treywelsh treywelsh linked a pull request Mar 28, 2024 that will close this issue
7 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants