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 passwd and random_passwd arguments for opennebula_virtual_machine and opennebula_template graphics sections #498

Closed
axbgrossi opened this issue Oct 19, 2023 · 1 comment · Fixed by #499

Comments

@axbgrossi
Copy link
Contributor

axbgrossi commented Oct 19, 2023

Description

These resources currently doesn't support passwd or random_passwd arguments inside graphics section:

│ Error: Unsupported argument
│ 
│   on ../../_modules/instance/instance.tf line 33, in resource "opennebula_virtual_machine" "instance":
│   33:     passwd = substr(base64encode(random_string.password.result), 0, 8)
│ 
│ An argument named "passwd" is not expected here.

New or affected resources and data sources

opennebula_virtual_machine
opennebula_template

Potential terraform configuration

resource "opennebula_virtual_machine" "example" {
  count = 2

  name        = "virtual-machine-${count.index}"
  description = "VM"
  cpu         = 1
  vcpu        = 1
  memory      = 1024
  group       = "terraform"
  permissions = "660"

  context = {
    NETWORK      = "YES"
    HOSTNAME     = "$NAME"
    START_SCRIPT = "yum upgrade"
  }

  graphics {
    type   = "VNC"
    listen = "0.0.0.0"
    keymap = "fr"
    passwd = substr(base64encode(random_string.password.result), 0, 8)
  }

  os {
    arch = "x86_64"
    boot = "disk0"
  }

  disk {
    image_id = opennebula_image.example.id
    size     = 10000
    target   = "vda"
    driver   = "qcow2"
  }

  on_disk_change = "RECREATE"

  nic {
    model           = "virtio"
    network_id      = var.vnetid
    security_groups = [opennebula_security_group.example.id]
  }

  vmgroup {
    vmgroup_id = 42
    role       = "vmgroup-role"
  }

  sched_requirements = "FREE_CPU > 60"

  tags = {
    environment = "example"
  }

  template_section {
   name = "example"
   elements = {
      key1 = "value1"
   }
  }
}

References

No response

@axbgrossi axbgrossi changed the title Add support to passwd field for both opennebula_virtual_machine and opennebula_template Add passwd and random_passwd arguments for opennebula_virtual_machine and opennebula_template Oct 31, 2023
@axbgrossi axbgrossi changed the title Add passwd and random_passwd arguments for opennebula_virtual_machine and opennebula_template Add passwd and random_passwd arguments for opennebula_virtual_machine and opennebula_template graphics sections Oct 31, 2023
@frousselet frousselet linked a pull request Nov 9, 2023 that will close this issue
7 tasks
Copy link

github-actions bot commented Dec 1, 2023

This issue is stale because it has been open for 30 days with no activity and it has not the 'status: confirmed' label or it is not in a milestone. Remove the 'status: stale' label or comment, or this will be closed in 5 days.

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.

2 participants