mirror of
https://github.com/optim-enterprises-bv/terraform-talos.git
synced 2025-10-29 17:42:47 +00:00
Add robot creds
This commit is contained in:
@@ -88,3 +88,13 @@ spec:
|
||||
key: network
|
||||
- name: HCLOUD_INSTANCES_ADDRESS_FAMILY
|
||||
value: dualstack
|
||||
- name: ROBOT_USER_NAME
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: hcloud
|
||||
key: user
|
||||
- name: ROBOT_PASSWORD
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: hcloud
|
||||
key: password
|
||||
|
||||
@@ -25,6 +25,8 @@ resource "hcloud_server" "controlplane" {
|
||||
lbv6 = local.lbv6
|
||||
hcloud_network = hcloud_network.main.id
|
||||
hcloud_token = var.hcloud_token
|
||||
robot_user = var.robot_user
|
||||
robot_password = var.robot_password
|
||||
labels = "topology.kubernetes.io/region=${element(var.regions, count.index)}"
|
||||
})
|
||||
)
|
||||
|
||||
@@ -132,6 +132,8 @@ cluster:
|
||||
data:
|
||||
network: ${base64encode(hcloud_network)}
|
||||
token: ${base64encode(hcloud_token)}
|
||||
user: ${base64encode(robot_user)}
|
||||
password: ${base64encode(robot_password)}
|
||||
externalCloudProvider:
|
||||
enabled: true
|
||||
manifests:
|
||||
|
||||
@@ -5,6 +5,20 @@ variable "hcloud_token" {
|
||||
sensitive = true
|
||||
}
|
||||
|
||||
variable "robot_user" {
|
||||
description = "The hezner cloud token (export TF_VAR_robot_user=$USER)"
|
||||
type = string
|
||||
default = ""
|
||||
sensitive = true
|
||||
}
|
||||
|
||||
variable "robot_password" {
|
||||
description = "The hezner cloud token (export TF_VAR_robot_password=$PASSWORD)"
|
||||
type = string
|
||||
default = ""
|
||||
sensitive = true
|
||||
}
|
||||
|
||||
variable "regions" {
|
||||
description = "The id of the hezner region (oreder is important)"
|
||||
type = list(string)
|
||||
|
||||
Reference in New Issue
Block a user