mirror of
https://gitea.fenix-dev.com/fenix-gitea-admin/iac-opentofu-private.git
synced 2025-10-27 07:43:07 +00:00
bitwarden item credncial
This commit is contained in:
4
main.tf
4
main.tf
@ -8,6 +8,10 @@ terraform {
|
|||||||
source = "ottramst/vaultwarden"
|
source = "ottramst/vaultwarden"
|
||||||
version = "0.4.4"
|
version = "0.4.4"
|
||||||
}
|
}
|
||||||
|
bitwarden = {
|
||||||
|
source = "maxlaverse/bitwarden"
|
||||||
|
version = ">= 0.15.0"
|
||||||
|
}
|
||||||
proxmox = {
|
proxmox = {
|
||||||
source = "telmate/proxmox"
|
source = "telmate/proxmox"
|
||||||
version = "3.0.2-rc03"
|
version = "3.0.2-rc03"
|
||||||
|
|||||||
@ -2,3 +2,5 @@ vaultwarden_server = "https://vaultwarden.example.com"
|
|||||||
vaultwarden_email = "admin@example.com"
|
vaultwarden_email = "admin@example.com"
|
||||||
vaultwarden_master_password = "SuperSecretMasterPassword"
|
vaultwarden_master_password = "SuperSecretMasterPassword"
|
||||||
vaultwarden_admin_token = "tokenadmin"
|
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" {
|
provider "vaultwarden" {
|
||||||
endpoint = var.vaultwarden_server
|
endpoint = var.vaultwarden_server
|
||||||
email = var.vaultwarden_email
|
email = var.vaultwarden_email
|
||||||
@ -21,8 +29,9 @@ resource "vaultwarden_organization_collection" "vaultwarden-collection-iac" {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
resource "vaultwarden_item_login" "service_password" {
|
resource "bitwarden_item_login" "administrative-user" {
|
||||||
name = "MyService Password"
|
name = "teste"
|
||||||
username = "serviceuser"
|
username = "teste"
|
||||||
password = "aaaaaaa"
|
password = "teste"
|
||||||
|
collection_ids = [vaultwarden_organization_collection.vaultwarden-collection-iac.id]
|
||||||
}
|
}
|
||||||
@ -21,3 +21,15 @@ variable "vaultwarden_admin_token" {
|
|||||||
type = string
|
type = string
|
||||||
sensitive = true
|
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