Skip to content

Commit 2b53072

Browse files
committed
support for dns server
1 parent 81e453a commit 2b53072

File tree

5 files changed

+14
-1
lines changed

5 files changed

+14
-1
lines changed

example/dev.tfvars

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,4 +35,5 @@ containers = [
3535
environment = "dev"
3636
default_password = "BasicLXCContainer"
3737
public_key_encryption = "ssh-ed25519"
38-
public_key = "AAAAC3NzaC1lZDI1NTE5AAAAIKOPgZn0hyLV+UGoAZkIUlUYeyIqbSOPYSU+wpqoIZ7h"
38+
public_key = "AAAAC3NzaC1lZDI1NTE5AAAAIKOPgZn0hyLV+UGoAZkIUlUYeyIqbSOPYSU+wpqoIZ7h"
39+
dns = "192.168.0.73"

example/main.tf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,6 @@ module "lxc_containers" {
1010
default_password = var.default_password
1111
public_key_encryption = var.public_key_encryption
1212
public_key = var.public_key
13+
dns = var.dns
1314

1415
}

example/variables.tf

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,3 +74,8 @@ variable "public_key" {
7474
type = string
7575
default = "AAAAC3NzaC1lZDI1NTE5AAAAIKOPgZn0hyLV+UGoAZkIUlUYeyIqbSOPYSU+wpqoIZ7h"
7676
}
77+
variable "dns" {
78+
description = "DNS server"
79+
type = string
80+
default = "8.8.8.8"
81+
}

main.tf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ resource "proxmox_lxc" "container" {
3333
size = each.value.storage_size
3434
}
3535
start = true
36+
nameserver = var.dns
3637

3738
network {
3839
name = "eth0"

variables.tf

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,3 +73,8 @@ variable "public_key" {
7373
type = string
7474
default = "AAAAC3NzaC1lZDI1NTE5AAAAIKOPgZn0hyLV+UGoAZkIUlUYeyIqbSOPYSU+wpqoIZ7h"
7575
}
76+
variable "dns" {
77+
description = "DNS server"
78+
type = string
79+
default = "8.8.8.8"
80+
}

0 commit comments

Comments
 (0)