mirror of
https://gitea.fenix-dev.com/fenix-gitea-admin/iac-opentofu-private.git
synced 2025-10-27 15:53:06 +00:00
vaultwarden password and proxmox
This commit is contained in:
4
main.tf
4
main.tf
@ -8,6 +8,10 @@ terraform {
|
||||
source = "ottramst/vaultwarden"
|
||||
version = "0.4.4"
|
||||
}
|
||||
proxmox = {
|
||||
source = "telmate/proxmox"
|
||||
version = "3.0.2-rc03"
|
||||
}
|
||||
}
|
||||
backend "consul" {
|
||||
address = "consul-server.iac-consul.svc.cluster.local:8500" # Consul service DNS inside cluster
|
||||
|
||||
3
proxmox.tf
Normal file
3
proxmox.tf
Normal file
@ -0,0 +1,3 @@
|
||||
provider "proxmox" {
|
||||
pm_api_url = var.proxmox_server
|
||||
}
|
||||
5
proxmox.variables.tf
Normal file
5
proxmox.variables.tf
Normal file
@ -0,0 +1,5 @@
|
||||
variable "proxmox_server" {
|
||||
description = "Proxmox server URL"
|
||||
type = string
|
||||
sensitive = false
|
||||
}
|
||||
5
secrets/proxmox.secrets.tfvars
Normal file
5
secrets/proxmox.secrets.tfvars
Normal 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
|
||||
@ -10,3 +10,19 @@ resource "vaultwarden_account_register" "vaultwarden-acount-fenix" {
|
||||
email = var.vaultwarden_email
|
||||
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"
|
||||
}
|
||||
Reference in New Issue
Block a user