From 59dfe69415b4a2d657e3187be04eb6d9290b96ea Mon Sep 17 00:00:00 2001 From: Tine Date: Mon, 22 Jul 2024 22:30:27 +0200 Subject: [PATCH] feat: better? --- k8s.tjo.cloud/kubeconfig | 2 +- proxmox.tjo.cloud/main.tf | 0 proxmox.tjo.cloud/terraform.tf | 27 +++++++++++++++++++++++++++ proxmox.tjo.cloud/variables.tf | 28 ++++++++++++++++++++++++++++ 4 files changed, 56 insertions(+), 1 deletion(-) create mode 100644 proxmox.tjo.cloud/main.tf create mode 100644 proxmox.tjo.cloud/terraform.tf create mode 100644 proxmox.tjo.cloud/variables.tf diff --git a/k8s.tjo.cloud/kubeconfig b/k8s.tjo.cloud/kubeconfig index c56d7d6..6343db2 100755 --- a/k8s.tjo.cloud/kubeconfig +++ b/k8s.tjo.cloud/kubeconfig @@ -4,7 +4,7 @@ clusters: - name: tjo-cloud cluster: server: https://api.k8s.tjo.cloud:6443 - certificate-authority-data: LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUJpakNDQVRDZ0F3SUJBZ0lSQU5MekZhUjV4SENpZHFZQjB5K0Z2ZVF3Q2dZSUtvWkl6ajBFQXdJd0ZURVQKTUJFR0ExVUVDaE1LYTNWaVpYSnVaWFJsY3pBZUZ3MHlOREEzTWpBeE56STNNRFZhRncwek5EQTNNVGd4TnpJMwpNRFZhTUJVeEV6QVJCZ05WQkFvVENtdDFZbVZ5Ym1WMFpYTXdXVEFUQmdjcWhrak9QUUlCQmdncWhrak9QUU1CCkJ3TkNBQVN3T2xEMnBYeXRyQjdFUkFNZFQ5VVkwaDZNN1BtU1k1SjVBa2F4bk8vYm1FOW84bjNMTU9JbVZFaFYKdEdScFhvNTl6MHQ5dnJJRkd3VGNLeGlpaG5STW8yRXdYekFPQmdOVkhROEJBZjhFQkFNQ0FvUXdIUVlEVlIwbApCQll3RkFZSUt3WUJCUVVIQXdFR0NDc0dBUVVGQndNQ01BOEdBMVVkRXdFQi93UUZNQU1CQWY4d0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ts: - name: oidc@tjo-cloud context: diff --git a/proxmox.tjo.cloud/main.tf b/proxmox.tjo.cloud/main.tf new file mode 100644 index 0000000..e69de29 diff --git a/proxmox.tjo.cloud/terraform.tf b/proxmox.tjo.cloud/terraform.tf new file mode 100644 index 0000000..02d7c7d --- /dev/null +++ b/proxmox.tjo.cloud/terraform.tf @@ -0,0 +1,27 @@ +terraform { + required_providers { + proxmox = { + source = "bpg/proxmox" + version = "0.61.1" + } + digitalocean = { + source = "digitalocean/digitalocean" + version = "~> 2.0" + } + } +} + +provider "proxmox" { + # FIXME: Traefik/NGINX breaks this! 500 ERROR + endpoint = "https://178.63.49.225:8006/api2/json" + insecure = true + api_token = var.proxmox_token + ssh { + agent = true + username = "root" + } +} + +provider "digitalocean" { + token = var.digitalocean_token +} diff --git a/proxmox.tjo.cloud/variables.tf b/proxmox.tjo.cloud/variables.tf new file mode 100644 index 0000000..2604f30 --- /dev/null +++ b/proxmox.tjo.cloud/variables.tf @@ -0,0 +1,28 @@ +variable "tailscale_authkey" { + type = string + sensitive = true +} + +variable "oidc_username" { + type = string +} +variable "oidc_password" { + type = string + sensitive = true +} +variable "oidc_client_id" { + type = string +} +variable "oidc_issuer_url" { + type = string +} + +variable "digitalocean_token" { + type = string + sensitive = true +} + +variable "proxmox_token" { + type = string + sensitive = true +}