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 opennebula_host resource and data source #300

Closed
frousselet opened this issue Jun 24, 2022 · 0 comments · Fixed by #347
Closed

Add opennebula_host resource and data source #300

frousselet opened this issue Jun 24, 2022 · 0 comments · Fixed by #347

Comments

@frousselet
Copy link
Collaborator

frousselet commented Jun 24, 2022

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Description

Add support for OpenNebula Host

New or Affected Resource(s)

  • Resource opennebula_host
  • Data Source opennebula_host

Potential Terraform Configuration

Example KVM host

resource "opennebula_host" "kvm" {
  name = "kvm_prod"
  type = "kvm"

  overcommit = {
    cpu    = 0.5 # percentage of CPU divided by 100 required for the VM, e.g. 0.5 will request half of a processor
    memory = 44032 # total memory in MB
  }

  cluster_id = data.opennebula_cluster.example.id
}

Example QEMU host

resource "opennebula_host" "qemu" {
  name = "qemu_prod"
  type = "qemu"

  overcommit = {
    cpu    = 0.5 # percentage of CPU divided by 100 required for the VM, e.g. 0.5 will request half of a processor
    memory = 44032 # total memory in MB
  }

  cluster_id = data.opennebula_cluster.example.id
}

Example LXD host

resource "opennebula_host" "lxd" {
  name = "lxd_prod"
  type = "lxd"

  overcommit = {
    cpu    = 0.5 # percentage of CPU divided by 100 required for the VM, e.g. 0.5 will request half of a processor
    memory = 44032 # total memory in MB
  }

  cluster_id = data.opennebula_cluster.example.id
}

Example Firecracker host

resource "opennebula_host" "firecracker" {
  name = "firecracker_prod"
  type = "firecracker"

  overcommit = {
    cpu    = 0.5 # percentage of CPU divided by 100 required for the VM, e.g. 0.5 will request half of a processor
    memory = 44032 # total memory in MB
  }

  cluster_id = data.opennebula_cluster.example.id
}

Example vCenter host

resource "opennebula_host" "vcenter" {
  name = "vcenter_prod"
  type = "vcenter"

  overcommit = {
    cpu    = 0.5 # percentage of CPU divided by 100 required for the VM, e.g. 0.5 will request half of a processor
    memory = 44032 # total memory in MB
  }

  cluster_id = data.opennebula_cluster.example.id

  vcenter = {
    user     = "user"
    password = "password"
  }
}

Example custom host

resource "opennebula_host" "custom" {
  name = "custom_prod"
  type = "custom"

  overcommit = {
    cpu    = 0.5 # percentage of CPU divided by 100 required for the VM, e.g. 0.5 will request half of a processor
    memory = 44032 # total memory in MB
  }

  cluster_id = data.opennebula_cluster.example.id

  custom = {
    virtualization = "custom"           # or kvm or qemu or lxd or lxc or firecracker or vcenter
    vmm_mad        = "<some arguments>" # only if virtualization = "custom"
    information    = "custom"           # or kvm or qemu or lxd or lxc or firecracker or vcenter
    im_mad         = "<some arguments>" # only if information = "custom"
  }
}

Data Source

data "opennebula_host" "example" {
  name = "vcenter_prod"
}
@frousselet frousselet added this to the 1.1.0 milestone Jun 24, 2022
treywelsh added a commit that referenced this issue Nov 25, 2022
treywelsh added a commit that referenced this issue Nov 25, 2022
treywelsh added a commit that referenced this issue Nov 25, 2022
frousselet pushed a commit that referenced this issue Nov 28, 2022
treywelsh added a commit that referenced this issue Nov 29, 2022
treywelsh added a commit that referenced this issue Nov 29, 2022
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.

1 participant