add var for username in flatcar
This commit is contained in:
parent
73ff8144c2
commit
49a0fd6093
3 changed files with 10 additions and 3 deletions
|
@ -57,7 +57,7 @@ resource "hcloud_server" "master" {
|
|||
connection {
|
||||
host = self.ipv4_address
|
||||
timeout = "3m"
|
||||
user = "core"
|
||||
user = ${var.user}
|
||||
}
|
||||
|
||||
inline = [
|
||||
|
@ -114,7 +114,7 @@ resource "hcloud_server" "worker" {
|
|||
connection {
|
||||
host = self.ipv4_address
|
||||
timeout = "3m"
|
||||
user = "core"
|
||||
user = ${var.user}
|
||||
}
|
||||
|
||||
inline = [
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
---
|
||||
passwd:
|
||||
users:
|
||||
- name: core
|
||||
- name: ${user}
|
||||
ssh_authorized_keys: ${ssh_keys}
|
||||
storage:
|
||||
files:
|
||||
|
|
|
@ -8,6 +8,11 @@ variable "prefix" {
|
|||
default = "k8s"
|
||||
}
|
||||
|
||||
variable "user" {
|
||||
type = string
|
||||
default = "core"
|
||||
}
|
||||
|
||||
variable "machines" {
|
||||
type = map(object({
|
||||
node_type = string
|
||||
|
@ -16,6 +21,8 @@ variable "machines" {
|
|||
}))
|
||||
}
|
||||
|
||||
|
||||
|
||||
variable "ssh_public_keys" {
|
||||
type = list(string)
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue