Skip to content

proxmox_lxc_guest creates only unprivileged containers #1501

Description

@as3ii

when using a config like the following, the new container will always be created as unprivileged

resource "proxmox_lxc_guest" "nfs" {
  target_node        = var.proxmox_node
  name               = var.lxc_name
  tags               = ["nfs"]
  guest_id           = var.lxc_id
  start_at_node_boot = true
  power_state        = "starting"
  privileged         = true

  features {
    privileged {
      #nfs = true
    }
  }

  # CPU and RAM
  cpu {
    cores = 2
    #limit = 4
    #units = 1024
  }
  memory = 512
  swap   = 128

  # User settings
  password        = var.password
  ssh_public_keys = file(pathexpand(var.ssh_public_key))

  template {
    file    = var.template
    storage = "local"
  }

  dns {
    nameserver   = var.nameserver
    searchdomain = var.searchdomain
  }

  root_mount {
    storage = "local-lvm"
    size    = "4G"
    #option_discard = true
  }

  network {
    id           = 0
    name         = "eth0"
    bridge       = "vmbr0"
    ipv4_address = var.address
    ipv4_gateway = var.gateway
    slaac        = true
    #vlan_native  = 100 # VLAN
  }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    issue/confirmedIssue has been reviewed and confirmed to be present or accepted to be implementedresource/lxcIssue or PR related to LXC resourcetype/bugtype/upstreamThis is an issue in one of our dependencies and should be reported there

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions