mirror of
https://gitea.fenix-dev.com/fenix-gitea-admin/iac-opentofu-private.git
synced 2025-10-26 23:33:17 +00:00
bitwarden item credncial
This commit is contained in:
4
main.tf
4
main.tf
@ -8,6 +8,10 @@ terraform {
|
||||
source = "ottramst/vaultwarden"
|
||||
version = "0.4.4"
|
||||
}
|
||||
bitwarden = {
|
||||
source = "maxlaverse/bitwarden"
|
||||
version = ">= 0.15.0"
|
||||
}
|
||||
proxmox = {
|
||||
source = "telmate/proxmox"
|
||||
version = "3.0.2-rc03"
|
||||
|
||||
@ -2,3 +2,5 @@ vaultwarden_server = "https://vaultwarden.example.com"
|
||||
vaultwarden_email = "admin@example.com"
|
||||
vaultwarden_master_password = "SuperSecretMasterPassword"
|
||||
vaultwarden_admin_token = "tokenadmin"
|
||||
vaultwarden_client_id = "clientid"
|
||||
vaultwarden_client_secret = "clientsecret"
|
||||
@ -1,3 +1,11 @@
|
||||
provider "bitwarden" {
|
||||
endpoint = var.vaultwarden_server
|
||||
email = var.vaultwarden_email
|
||||
master_password = var.vaultwarden_master_password
|
||||
admin_token = var.vaultwarden_admin_token
|
||||
client_id = var.vaultwarden_client_id
|
||||
client_secret = var.vaultwarden_client_secret
|
||||
}
|
||||
provider "vaultwarden" {
|
||||
endpoint = var.vaultwarden_server
|
||||
email = var.vaultwarden_email
|
||||
@ -21,8 +29,9 @@ resource "vaultwarden_organization_collection" "vaultwarden-collection-iac" {
|
||||
}
|
||||
|
||||
|
||||
resource "vaultwarden_item_login" "service_password" {
|
||||
name = "MyService Password"
|
||||
username = "serviceuser"
|
||||
password = "aaaaaaa"
|
||||
resource "bitwarden_item_login" "administrative-user" {
|
||||
name = "teste"
|
||||
username = "teste"
|
||||
password = "teste"
|
||||
collection_ids = [vaultwarden_organization_collection.vaultwarden-collection-iac.id]
|
||||
}
|
||||
@ -21,3 +21,15 @@ variable "vaultwarden_admin_token" {
|
||||
type = string
|
||||
sensitive = true
|
||||
}
|
||||
|
||||
variable "vaultwarden_client_id" {
|
||||
description = "Vaultwarden client id"
|
||||
type = string
|
||||
sensitive = true
|
||||
}
|
||||
|
||||
variable "vaultwarden_client_secret" {
|
||||
description = "Vaultwarden client secret"
|
||||
type = string
|
||||
sensitive = true
|
||||
}
|
||||
Reference in New Issue
Block a user