vaultwarden password and proxmox

This commit is contained in:
Tomás Limpinho
2025-08-19 11:36:54 +01:00
parent 80a950fec7
commit 32004c9a78
5 changed files with 33 additions and 0 deletions

View File

@ -8,6 +8,10 @@ terraform {
source = "ottramst/vaultwarden" source = "ottramst/vaultwarden"
version = "0.4.4" version = "0.4.4"
} }
proxmox = {
source = "telmate/proxmox"
version = "3.0.2-rc03"
}
} }
backend "consul" { backend "consul" {
address = "consul-server.iac-consul.svc.cluster.local:8500" # Consul service DNS inside cluster address = "consul-server.iac-consul.svc.cluster.local:8500" # Consul service DNS inside cluster

3
proxmox.tf Normal file
View File

@ -0,0 +1,3 @@
provider "proxmox" {
pm_api_url = var.proxmox_server
}

5
proxmox.variables.tf Normal file
View File

@ -0,0 +1,5 @@
variable "proxmox_server" {
description = "Proxmox server URL"
type = string
sensitive = false
}

View File

@ -0,0 +1,5 @@
proxmox_server = "proxmox.example.com"
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

View File

@ -10,3 +10,19 @@ resource "vaultwarden_account_register" "vaultwarden-acount-fenix" {
email = var.vaultwarden_email email = var.vaultwarden_email
password = var.vaultwarden_master_password password = var.vaultwarden_master_password
} }
resource "vaultwarden_organization" "vaultwarden-organization-fenix-iac" {
name = "fenix-iac"
}
resource "vaultwarden_organization_collection" "vaultwarden-collection-iac" {
organization_id = vaultwarden_organization.vaultwarden-organization-fenix-iac.id
name = "iac-collection"
}
resource "vaultwarden_item_login" "service_password" {
name = "MyService Password"
username = "serviceuser"
password = "aaaaaaa"
}