Move limits to seperate block

This commit is contained in:
Khue Doan
2021-05-01 11:59:25 +07:00
parent d9cadb36bb
commit c8bb547c49

View File

@ -15,8 +15,6 @@ resource "lxd_container" "vpn" {
ephemeral = false ephemeral = false
config = { config = {
"limits.cpu" = 1
"limits.memory" = "256MiB"
"user.user-data" = templatefile( "user.user-data" = templatefile(
"${path.module}/cloud-init.yaml.tpl", "${path.module}/cloud-init.yaml.tpl",
{ {
@ -25,13 +23,18 @@ resource "lxd_container" "vpn" {
) )
} }
limits = {
cpu = "1"
memory = "256MiB"
}
device { device {
name = "eth0" name = "eth0"
type = "nic" type = "nic"
properties = { properties = {
nictype = "macvlan" nictype = "macvlan"
parent = "eno1" parent = "eno1" # TODO make parent interface a variable
} }
} }
} }