48 Commits

Author SHA1 Message Date
cefab0efa4 Merge pull request 'Update proxmox.tf' (#130) from fenix-admin into main
Reviewed-on: fenix-gitea-admin/iac-teste#130
2025-08-25 14:31:29 +00:00
31fa88ff4f Merge pull request 'Update proxmox.tf' (#129) from fenix-admin into main
Reviewed-on: fenix-gitea-admin/iac-teste#129
2025-08-25 14:20:06 +00:00
1447478dcd Merge pull request 'Update .gitea/workflows/ci-test.yaml' (#128) from fenix-admin into main
Reviewed-on: fenix-gitea-admin/iac-teste#128
2025-08-25 14:00:57 +00:00
66b694226f Merge pull request 'Update proxmox.tf' (#127) from fenix-admin into main
Reviewed-on: fenix-gitea-admin/iac-teste#127
2025-08-25 13:57:28 +00:00
15b709490a Merge pull request 'Update proxmox.tf' (#126) from fenix-admin into main
Reviewed-on: fenix-gitea-admin/iac-teste#126
2025-08-25 13:49:57 +00:00
44a090d18a Merge pull request 'Update .gitea/workflows/ci-test.yaml' (#125) from fenix-admin into main
Reviewed-on: fenix-gitea-admin/iac-teste#125
2025-08-25 13:38:49 +00:00
6d3258e135 Merge pull request 'Update proxmox.tf' (#124) from fenix-admin into main
Reviewed-on: fenix-gitea-admin/iac-teste#124
2025-08-25 13:30:03 +00:00
2350a5d3a7 Merge pull request 'Update proxmox.tf' (#123) from fenix-admin into main
Reviewed-on: fenix-gitea-admin/iac-teste#123
2025-08-25 13:23:35 +00:00
3d221d64ed Merge pull request 'Update proxmox.tf' (#122) from fenix-admin into main
Reviewed-on: fenix-gitea-admin/iac-teste#122
2025-08-25 13:19:47 +00:00
dd024fa9fe Merge pull request 'Update proxmox.tf' (#121) from fenix-admin into main
Reviewed-on: fenix-gitea-admin/iac-teste#121
2025-08-25 13:16:26 +00:00
973a440b98 Merge pull request 'Update proxmox.tf' (#120) from fenix-admin into main
Reviewed-on: fenix-gitea-admin/iac-teste#120
2025-08-25 12:58:18 +00:00
9e873c5b66 Merge pull request 'Update proxmox.tf' (#119) from fenix-admin into main
Reviewed-on: fenix-gitea-admin/iac-teste#119
2025-08-25 12:20:10 +00:00
237fb83745 Merge pull request 'Update proxmox.tf' (#118) from fenix-admin into main
Reviewed-on: fenix-gitea-admin/iac-teste#118
2025-08-25 12:13:54 +00:00
b28e80fa88 Merge pull request 'Update proxmox.tf' (#117) from fenix-admin into main
Reviewed-on: fenix-gitea-admin/iac-teste#117
2025-08-25 12:01:42 +00:00
8a4384e1db Merge pull request 'Update proxmox.tf' (#116) from fenix-admin into main
Reviewed-on: fenix-gitea-admin/iac-teste#116
2025-08-25 11:40:29 +00:00
b57d6e362e Merge pull request 'Update proxmox.tf' (#115) from fenix-admin into main
Reviewed-on: fenix-gitea-admin/iac-teste#115
2025-08-25 11:25:23 +00:00
54912d7145 Merge pull request 'Update proxmox.tf' (#114) from fenix-admin into main
Reviewed-on: fenix-gitea-admin/iac-teste#114
2025-08-25 11:14:10 +00:00
d786488ef8 Merge pull request 'Update proxmox.tf' (#113) from fenix-admin into main
Reviewed-on: fenix-gitea-admin/iac-teste#113
2025-08-25 11:03:02 +00:00
5668ffa755 Merge pull request 'Update proxmox.tf' (#112) from fenix-admin into main
Reviewed-on: fenix-gitea-admin/iac-teste#112
2025-08-25 10:52:06 +00:00
028f65435e Merge pull request 'Update proxmox.tf' (#111) from fenix-admin into main
Reviewed-on: fenix-gitea-admin/iac-teste#111
2025-08-25 10:46:57 +00:00
d69654b00e Merge pull request 'Update main.tf' (#110) from fenix-admin into main
Reviewed-on: fenix-gitea-admin/iac-teste#110
2025-08-25 10:39:40 +00:00
be3b9024ec Merge pull request 'Update main.tf' (#109) from fenix-admin into main
Reviewed-on: fenix-gitea-admin/iac-teste#109
2025-08-25 10:36:20 +00:00
dc3f135dd3 Merge pull request 'fenix-admin' (#108) from fenix-admin into main
Reviewed-on: fenix-gitea-admin/iac-teste#108
2025-08-25 10:30:34 +00:00
0e3906dcdd Merge pull request 'fenix-admin' (#107) from fenix-admin into main
Reviewed-on: fenix-gitea-admin/iac-teste#107
2025-08-25 10:14:31 +00:00
567d26c024 Merge pull request 'Update proxmox.tf' (#106) from fenix-admin into main
Reviewed-on: fenix-gitea-admin/iac-teste#106
2025-08-25 10:06:05 +00:00
de6d6b924d Merge pull request 'Update proxmox.tf' (#105) from fenix-admin into main
Reviewed-on: fenix-gitea-admin/iac-teste#105
2025-08-25 08:26:24 +00:00
42912412c4 Merge pull request 'Update proxmox.tf' (#104) from fenix-admin into main
Reviewed-on: fenix-gitea-admin/iac-teste#104
2025-08-25 08:17:43 +00:00
80f5fa299b Merge pull request 'Update proxmox.tf' (#103) from fenix-admin into main
Reviewed-on: fenix-gitea-admin/iac-teste#103
2025-08-25 08:13:44 +00:00
bc307d9abc Merge pull request 'Update proxmox.tf' (#102) from fenix-admin into main
Reviewed-on: fenix-gitea-admin/iac-teste#102
2025-08-24 22:58:34 +00:00
701b59e3c0 Merge pull request 'Update proxmox.tf' (#101) from fenix-admin into main
Reviewed-on: fenix-gitea-admin/iac-teste#101
2025-08-24 22:49:18 +00:00
3ae4a8d6e2 Merge pull request 'Update proxmox.tf' (#100) from fenix-admin into main
Reviewed-on: fenix-gitea-admin/iac-teste#100
2025-08-24 22:30:22 +00:00
172f4ec3bb Merge pull request 'fenix-admin' (#99) from fenix-admin into main
Reviewed-on: fenix-gitea-admin/iac-teste#99
2025-08-24 22:24:11 +00:00
419c255f24 Merge pull request 'Update proxmox.tf' (#98) from fenix-admin into main
Reviewed-on: fenix-gitea-admin/iac-teste#98
2025-08-24 22:12:49 +00:00
262bd14507 Merge pull request 'Update proxmox.tf' (#97) from fenix-admin into main
Reviewed-on: fenix-gitea-admin/iac-teste#97
2025-08-24 22:08:48 +00:00
e0d3f63691 Merge pull request 'Update proxmox.tf' (#96) from fenix-admin into main
Reviewed-on: fenix-gitea-admin/iac-teste#96
2025-08-24 22:04:06 +00:00
892ce5c19f Merge pull request 'Update proxmox.tf' (#95) from fenix-admin into main
Reviewed-on: fenix-gitea-admin/iac-teste#95
2025-08-24 21:56:56 +00:00
ed2f1a4a9d Merge pull request 'Update proxmox.tf' (#94) from fenix-admin into main
Reviewed-on: fenix-gitea-admin/iac-teste#94
2025-08-24 21:52:39 +00:00
d30a053d23 Merge pull request 'Update proxmox.tf' (#93) from fenix-admin into main
Reviewed-on: fenix-gitea-admin/iac-teste#93
2025-08-24 21:48:05 +00:00
df7518f162 Merge pull request 'Update proxmox.tf' (#92) from fenix-admin into main
Reviewed-on: fenix-gitea-admin/iac-teste#92
2025-08-24 21:00:03 +00:00
0df892ad1e Merge pull request 'Update proxmox.tf' (#91) from fenix-admin into main
Reviewed-on: fenix-gitea-admin/iac-teste#91
2025-08-24 20:49:05 +00:00
817f80c70b Merge pull request 'Update proxmox.tf' (#90) from fenix-admin into main
Reviewed-on: fenix-gitea-admin/iac-teste#90
2025-08-24 20:39:06 +00:00
0d9674942e Merge pull request 'Update proxmox.tf' (#89) from fenix-admin into main
Reviewed-on: fenix-gitea-admin/iac-teste#89
2025-08-24 19:58:56 +00:00
80f8d0ef70 Merge pull request 'Update proxmox.tf' (#88) from fenix-admin into main
Reviewed-on: fenix-gitea-admin/iac-teste#88
2025-08-24 18:03:08 +00:00
1ad34ea3e4 Merge pull request 'Update proxmox.tf' (#87) from fenix-admin into main
Reviewed-on: fenix-gitea-admin/iac-teste#87
2025-08-24 17:49:25 +00:00
3495ab1c10 Merge pull request 'Update .gitea/workflows/ci-test.yaml' (#86) from fenix-admin into main
Reviewed-on: fenix-gitea-admin/iac-teste#86
2025-08-24 17:10:42 +00:00
3a3d37030f Merge pull request 'Update .gitea/workflows/ci-test.yaml' (#85) from fenix-admin into main
Reviewed-on: fenix-gitea-admin/iac-teste#85
2025-08-24 17:07:10 +00:00
d5827b5909 Merge pull request 'Update .gitea/workflows/ci-test.yaml' (#84) from fenix-admin into main
Reviewed-on: fenix-gitea-admin/iac-teste#84
2025-08-24 17:02:58 +00:00
98c537dcf5 Merge pull request 'fenix-admin' (#83) from fenix-admin into main
Reviewed-on: fenix-gitea-admin/iac-teste#83
2025-08-24 16:35:14 +00:00
14 changed files with 65 additions and 401 deletions

View File

@ -15,22 +15,8 @@ jobs:
PM_API_TOKEN_SECRET: ${{ secrets.PM_API_TOKEN_SECRET }}
BW_EMAIL: ${{ secrets.BW_EMAIL }}
BW_PASSWORD: ${{ secrets.BW_PASSWORD }}
BW_CLIENTID: ${{ secrets.BW_CLIENTID }}
BW_CLIENTSECRET: ${{ secrets.BW_CLIENTSECRET }}
VAULTWARDEN_LINK: ${{secrets.VAULTWARDEN_LINK }}
steps:
- name: Verificar se commit pede por [deploy-opentofu]
if: "!contains(gitea.event.head_commit.message, '[deploy-opentofu]')"
run: |
echo "Commit não contém [deploy-opentofu], a pipeline será ignorada."
exit 1
- name: Executar deploy opentofu
run: echo "Commit contém [deploy-opentofu], a pipeline será executada."
- name: Updating apt-get
run: |
apt-get update -y
@ -40,12 +26,12 @@ jobs:
with:
path: infra/iac
#- name: cloning iac secrets repository
# uses: actions/checkout@v4
# with:
# repository: fenix-gitea-admin/iac-opentofu-private-secrets
# token: ${{ secrets.GGITEA_TOKEN }}
# path: infra/secrets
- name: cloning iac secrets repository
uses: actions/checkout@v4
with:
repository: fenix-gitea-admin/iac-teste-secrets
token: ${{ secrets.GGITEA_TOKEN }}
path: infra/secrets
- name: Install cloudflare prerequisites
@ -83,28 +69,16 @@ jobs:
}
EOF
- name: vaultwarden urls as secrets
working-directory:
run: |
bw config server $VAULTWARDEN_LINK
bw login --apikey
BW_SESSION=$(bw unlock "$BW_PASSWORD" --raw)
bw get item "iac.proxmox-ssh-link" --session "$BW_SESSION" | jq -r '.notes' > "proxmox-ssh-link.txt"
- name: Start cloudflared Access TCP -> SOCKS5 (background)
env:
CF_SVC_ID: ${{ secrets.CF_SVC_ID }}
CF_SVC_SECRET: ${{ secrets.CF_SVC_SECRET }}
HOSTNAME: "proxmox-ssh.fenix-dev.com"
run: |
Hostname=$(cat proxmox-ssh-link.txt)
# Inicia cloudflared access tcp/ssh com service token e listener socks local
# O binário 'cloudflared' tem variações de flags entre versões; estes flags funcionam nas versões recentes.
nohup cloudflared access tcp \
--hostname "$Hostname" \
--hostname "$HOSTNAME" \
--listener "tcp://127.0.0.1:1081" \
--service-token-id "$CF_SVC_ID" \
--service-token-secret "$CF_SVC_SECRET" \
@ -135,39 +109,10 @@ jobs:
sleep 3
cat dante.log
- name: vaultwarden getsecrets
- name: vaultwarden login
working-directory: infra/iac
run: |
BW_SESSION=$(bw unlock "$BW_PASSWORD" --raw)
# Ler o arquivo de referência
for secret in $(jq -c '.secrets[]' secrets/vault-secrets-map.json); do
name=$(echo "$secret" | jq -r '.name')
type=$(echo "$secret" | jq -r '.type')
output=$(echo "$secret" | jq -r '.output')
echo "$name $type $output"
item_id=$(bw get item "$name" | jq -r '.id')
echo "$item_id"
mkdir -p "$(dirname "$output")"
echo "dir made"
if [ "$type" == "attachment" ]; then
echo "attachment get"
bw get attachment "$output" --itemid "$item_id" --output "$output" --session "$BW_SESSION"
elif [ "$type" == "note" ]; then
echo "note get"
bw get item "$name" --session "$BW_SESSION" | jq -r '.notes' > "$output"
fi
done
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.11'
- name: Install dependencies
run: |
pip install ruamel.yaml
BW_SESSION=$(bw login)
- name: Init OpenTofu
working-directory: infra/iac
@ -177,11 +122,9 @@ jobs:
- name: Plan
working-directory: infra/iac
run: |
# Find all .tfvars in the secrets folder
# Find all .auto.tfvars in the secrets folder
VAR_FILES=""
ls -la ../secrets/secrets
for f in ../secrets/secrets/*.tfvars; do
echo "found - $f"
for f in ../secrets/secrets/*.auto.tfvars; do
VAR_FILES="$VAR_FILES -var-file=$f"
done
tofu plan $VAR_FILES -out=./tfplan | tee ./tfplan.txt

18
LICENSE
View File

@ -1,18 +0,0 @@
MIT License
Copyright (c) 2025 fenix-gitea-admin
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
associated documentation files (the "Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the
following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial
portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO
EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
USE OR OTHER DEALINGS IN THE SOFTWARE.

View File

@ -1,19 +0,0 @@
locale: "pt_PT.UTF-8"
keyboard:
layout: "pt"
variant: "nodeadkeys"
users:
- default
ssh_pwauth: true
package_update: true
packages:
- qemu-guest-agent
- net-tools
- curl
runcmd:
- systemctl enable qemu-guest-agent
- systemctl start qemu-guest-agent
- echo "done" > /tmp/cloud-config.done

View File

@ -1,36 +0,0 @@
package_update: true
%{ if length(each.value.extra_packages) > 0 ~}
packages:
%{ for pkg in each.value.extra_packages ~}
- ${pkg}
%{ endfor ~}
%{ endif ~}
%{ if length(each.value.extra_users) > 0 ~}
users:
%{ for u in each.value.extra_users ~}
- name: ${u.name}
groups:
%{ if length(u.groups) > 0 ~}
%{ for g in u.groups ~}
- ${g}
%{ endfor ~}
%{ endif ~}
shell: /bin/bash
sudo: ALL=(ALL) NOPASSWD:ALL
%{ endfor ~}
chpasswd:
list: ${"|"}
%{ for u in each.value.extra_users ~}
${u.name}:${u.password}
%{ endfor ~}
expire: false
%{ endif ~}
%{ if length(each.value.extra_runcmd) > 0 ~}
runcmd:
%{ for cmd in each.value.extra_runcmd ~}
- ${cmd}
%{ endfor ~}
%{ endif ~}

View File

@ -1,2 +0,0 @@
#cloud-config
${content}

View File

@ -1,23 +0,0 @@
FROM ghcr.io/opentofu/opentofu:1.9-minimal AS tofu
FROM ubuntu:24.04
# Copy the tofu binary
COPY --from=tofu /usr/local/bin/tofu /usr/local/bin/tofu
# Install dependencies
RUN apt-get update && apt-get install -y \
git \
curl \
nodejs \
npm \
unzip \
&& rm -rf /var/lib/apt/lists/*
RUN curl -L -o /tmp/bw.zip https://github.com/bitwarden/cli/releases/download/v1.22.1/bw-linux-1.22.1.zip \
&& unzip /tmp/bw.zip -d /usr/local/bin \
&& chmod +x /usr/local/bin/bw \
&& rm /tmp/bw.zip
WORKDIR /workspace

View File

@ -1,5 +1,9 @@
terraform {
required_providers {
random = {
source = "hashicorp/random"
version = "~> 3.6"
}
vaultwarden = {
source = "ottramst/vaultwarden"
version = "0.4.4"
@ -20,3 +24,5 @@ terraform {
lock = true # enable state locking
}
}
provider "random" {}

View File

@ -1,45 +0,0 @@
#!/usr/bin/env python3
from ruamel.yaml import YAML
import sys
import json
from collections.abc import Mapping
def deep_merge_yaml(dict1, dict2):
result = dict1.copy()
for key, value in dict2.items():
if key in result:
if isinstance(result[key], list) and isinstance(value, list):
result[key] = result[key] + value
elif isinstance(result[key], Mapping) and isinstance(value, Mapping):
result[key] = deep_merge_yaml(result[key], value)
else:
result[key] = value
else:
result[key] = value
return result
def main():
input_data = json.load(sys.stdin)
file1 = input_data["file1"]
file2 = input_data["file2"]
yaml = YAML()
yaml.indent(mapping=2, sequence=4, offset=2)
with open(file1, "r") as f1, open(file2, "r") as f2:
yaml1 = yaml.load(f1)
yaml2 = yaml.load(f2)
merged = deep_merge_yaml(yaml1, yaml2)
from io import StringIO
output = StringIO()
yaml.dump(merged, output)
print(json.dumps({
"merged_yaml": output.getvalue()
}))
if __name__ == "__main__":
main()

View File

@ -30,58 +30,32 @@ resource "proxmox_virtual_environment_file" "cloud_init_yaml" {
source_raw {
file_name = "user-data-cloud-config.yaml"
data = file("${path.module}/cloud-init-base.yaml")
}
}
data = <<-EOF
#cloud-config
users:
- default
- name: testeuser
groups: sudo
shell: /bin/bash
sudo: ALL=(ALL) NOPASSWD:ALL
ssh_pwauth: true
locals {
rendered_yaml_per_vm ={
for vm in var.proxmox_k8s_vms : vm.name =>
templatefile("${path.module}/cloud-init-vm.yaml.tftpl",
{
each = {
value = vm
}
})
}
}
chpasswd:
list: |
testeuser:testepassword
expire: false
data "external" "merged_yaml" {
for_each = { for vm in var.proxmox_k8s_vms : vm.name => vm }
depends_on = [local_file.rendered_yaml_file]
program = ["python3", "${path.module}/merge_yaml.py"]
query = {
file1 = "${path.module}/cloud-init-base.yaml"
file2 = "${path.module}/cloud-init-extra-${each.key}.yaml"
}
}
resource "local_file" "rendered_yaml_file" {
for_each = { for vm in var.proxmox_k8s_vms : vm.name => vm }
content = local.rendered_yaml_per_vm[each.key]
filename = "${path.module}/cloud-init-extra-${each.key}.yaml"
}
# Gerar um snippet cloud-init por VM
resource "proxmox_virtual_environment_file" "vm_user_data" {
for_each = { for vm in var.proxmox_k8s_vms : vm.name => vm }
node_name = "fenix"
datastore_id = "local-snippets"
content_type = "snippets"
source_raw {
file_name = "cloud-init-iac-k8s-${each.key}.yaml"
data = templatefile("${path.module}/cloud-init-wrapper.yaml.tftpl", {
content = data.external.merged_yaml[each.key].result["merged_yaml"]
})
package_update: true
packages:
- qemu-guest-agent
- net-tools
- curl
runcmd:
- systemctl enable qemu-guest-agent
- systemctl start qemu-guest-agent
- echo "done" > /tmp/cloud-config.done
EOF
}
}
@ -111,6 +85,13 @@ resource "proxmox_virtual_environment_vm" "proxmox-kubernetes-VM-template" {
dedicated = 4096
}
# Configuração do disco rígido
disk {
datastore_id = "local-lvm"
interface = "scsi1"
size = 64
}
disk {
datastore_id = "local-lvm"
file_id = proxmox_virtual_environment_download_file.latest_ubunto_cloud_img.id
@ -121,59 +102,32 @@ resource "proxmox_virtual_environment_vm" "proxmox-kubernetes-VM-template" {
# Configuração da interface de rede
network_device {
bridge = "vmbr0"
model = "virtio"
}
initialization {
dns {
servers = ["1.1.1.1"]
}
ip_config {
ipv4 {
address = "dhcp"
}
ip_config {
ipv4 {
address = "dhcp" # IP estático + máscara de rede
}
}
user_data_file_id = proxmox_virtual_environment_file.cloud_init_yaml.id
}
}
resource "proxmox_virtual_environment_vm" "k8s_vms" {
for_each = { for vm in var.proxmox_k8s_vms : vm.name => vm }
resource "proxmox_virtual_environment_vm" "VM-Kubernetes-01" {
depends_on = [proxmox_virtual_environment_vm.proxmox-kubernetes-VM-template]
name = each.value.name
node_name = each.value.node_name
vm_id = each.value.vm_id
name = "VM-Kubernetes-01"
node_name = "fenix"
clone {
vm_id = proxmox_virtual_environment_vm.proxmox-kubernetes-VM-template.id
}
cpu {
cores = each.value.cores
agent {
enabled = true
}
}
memory {
dedicated = each.value.memory
}
disk {
datastore_id = each.value.data_store
size = each.value.disk_size
interface = "scsi1"
}
initialization {
ip_config {
ipv4 {
address = each.value.ip
gateway = each.value.gateway
}
}
user_data_file_id = proxmox_virtual_environment_file.vm_user_data[each.key].id
}
agent {
enabled = true
}
}

View File

@ -32,25 +32,3 @@ variable "proxmox_apikey" {
variable "node_name" {
default = "fenix"
}
# Lista de VMs (override de valores específicos)
variable "proxmox_k8s_vms" {
type = list(object({
name = string
vm_id = number
node_name = string
ip = string
cores = optional(number)
memory = optional(number)
data_store = optional(string)
gateway = string
disk_size = optional(number)
extra_users = optional(list(object({
name = string
password = string
groups = list(string)
})))
extra_packages = optional(list(string))
extra_runcmd = optional(list(string))
}))
}

View File

@ -3,56 +3,3 @@ PM_API_TOKEN_ID = "tokenid"
PM_API_TOKEN_SECRET = "tokensecret"
# tokenid is read automatically from PM_API_TOKEN_ID
# token is read automatically from PM_API_TOKEN_SECRET
proxmox_server = "https://proxmox.example.com:443/api2/json"
proxmox_apikey = "user@pam!token=fdjkdslfjdsflkj"
proxmox_server_ssh = "127.0.0.1:1080"
proxmox_username_ssh = "user"
proxmox_password_ssh = "password"
# tokenid is read automatically from PM_API_TOKEN_ID
# token is read automatically from PM_API_TOKEN_SECRET
proxmox_k8s_vms = [
{
name = "k8s-master-01"
vm_id = 3001
node_name = "node"
ip = "192.168.1.99/24"
cores = 2
memory = 2000
disk_size = 32
data_store = "local-lvm"
gateway = "192.168.1.1"
extra_users = [
{
name = "user"
password = "pass"
groups = ["sudo"]
}
]
extra_packages = []
extra_runcmd = []
},
{
name = "k8s-worker-01"
vm_id = 3002
node_name = "node"
ip = "192.168.1.101/24"
cores = 1
memory = 2000
disk_size = 32
data_store = "local-lvm"
gateway = "192.168.1.1"
extra_users = [
{
name = "user"
password = "pass"
groups = ["sudo"]
}
]
extra_packages = []
extra_runcmd = []
},
]

View File

@ -1,19 +0,0 @@
{
"secrets": [
{
"name": "iac.opentofu.consul.secrets",
"type": "note",
"output": "../secrets/secrets/consul.secrets.tfvars"
},
{
"name": "iac.opentofu.proxmox.secrets",
"type": "note",
"output": "../secrets/secrets/proxmox.secrets.tfvars"
},
{
"name": "iac.opentofu.vaultwarden.secrets",
"type": "note",
"output": "../secrets/secrets/vaultwarden.secrets.tfvars"
}
]
}

View File

@ -4,5 +4,3 @@ vaultwarden_master_password = "SuperSecretMasterPassword"
vaultwarden_admin_token = "tokenadmin"
vaultwarden_client_id = "clientid"
vaultwarden_client_secret = "clientsecret"
# email is read automatically from BW_EMAIL
# password is read automatically from BW_PASSWORD