Resources and access
terraform / check (push) Waiting to run

This commit is contained in:
stolzor committed 2026-10-11 21:04:27 +03:00
1 parent 64be99308b
commit 5cba142003
38 files changed
+565 -353

No files matched your search

+12
View File
@@ -0,0 +1,12 @@
resource "random_password" "this" {
length = 32
special = false
}
resource "postgresql_role" "this" {
name = var.role
login = true
password = random_password.this.result
roles = [var.owner]
assume_role = var.owner
}
+8
View File
@@ -0,0 +1,8 @@
output "username" {
value = postgresql_role.this.name
}
output "password" {
value = random_password.this.result
sensitive = true
}
+7
View File
@@ -0,0 +1,7 @@
variable "role" {
type = string
}
variable "owner" {
type = string
}
+12
View File
@@ -0,0 +1,12 @@
terraform {
required_providers {
postgresql = {
source = "cyrilgdn/postgresql"
version = ">= 1.27.0"
}
random = {
source = "hashicorp/random"
version = ">= 3.9.1"
}
}
}