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

add data source maas_vm_host so it can be provided dynamically to maas_vm_host_machine resource "vm_host" #122

Open
noama-nv opened this issue Nov 30, 2023 · 3 comments · May be fixed by #181
Labels
enhancement New feature or request triaged Triaged to be addressed in a given cycle

Comments

@noama-nv
Copy link

noama-nv commented Nov 30, 2023

add data source maas_vm_host so it can be provided dynamically to maas_vm_host_machine resource

https://registry.terraform.io/providers/maas/maas/latest/docs/resources/vm_host_machine

we would like to check if there are available kvm and spawn VMs

data "maas_vm_host" "kvm_host" {
  name = "krembu-kvm-host"
}

resource "maas_vm_host_machine" "vm1" {
  vm_host = data.maas_vm_host.kvm_host.id
  cores   = 1
  memory  = 2048
}
@skatsaounis
Copy link
Collaborator

skatsaounis commented Nov 30, 2023

Hi @krembu. Thank you for opening this issue. We will need a clarification on your feature request just to be sure.

Is it a datasource maas_vm_host that you need so as to make the following scenario work?

data "maas_vm_host" "kvm_host" {
  name = "krembu-kvm-host"
}

resource "maas_vm_host_machine" "vm1" {
  vm_host = data.maas_vm_host.kvm_host.id
  cores   = 1
  memory  = 2048
}

Otherwise, could you please explain more the part add data source maas_vm_host_machine so it can be provided dynamically to maas_vm_host_machine resource? I suspect that you have a typo but let's be sure.

@skatsaounis skatsaounis added enhancement New feature or request triaged Triaged to be addressed in a given cycle labels Nov 30, 2023
@noama-nv
Copy link
Author

@skatsaounis this is exactly what i wanted to say

@noama-nv noama-nv changed the title add data source maas_vm_host_machine so it can be provided dynamically to maas_vm_host_machine resource add data source maas_vm_host so it can be provided dynamically to maas_vm_host_machine resource "vm_host" Nov 30, 2023
@seb54000
Copy link

seb54000 commented May 17, 2024

Hi, I'm also very interested in this feature, do you know what is missing from the PR ?

I proposed a new PR as I'm not used to how update the existing one, sorry for that. All credits goes to @skatsaounis for this feature

@seb54000 seb54000 linked a pull request May 21, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request triaged Triaged to be addressed in a given cycle
Projects
None yet
3 participants