File tree Expand file tree Collapse file tree 5 files changed +14
-1
lines changed Expand file tree Collapse file tree 5 files changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -35,4 +35,5 @@ containers = [
3535environment = " dev"
3636default_password = " BasicLXCContainer"
3737public_key_encryption = " ssh-ed25519"
38- public_key = " AAAAC3NzaC1lZDI1NTE5AAAAIKOPgZn0hyLV+UGoAZkIUlUYeyIqbSOPYSU+wpqoIZ7h"
38+ public_key = " AAAAC3NzaC1lZDI1NTE5AAAAIKOPgZn0hyLV+UGoAZkIUlUYeyIqbSOPYSU+wpqoIZ7h"
39+ dns = " 192.168.0.73"
Original file line number Diff line number Diff 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}
Original file line number Diff line number Diff 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+ }
Original file line number Diff line number Diff 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"
Original file line number Diff line number Diff 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+ }
You can’t perform that action at this time.
0 commit comments