Move terraform files into modules
This commit is contained in:
parent
4e495dbc51
commit
bae9fe9e0f
14 changed files with 286 additions and 104 deletions
modules/services
33
modules/services/main.tf
Normal file
33
modules/services/main.tf
Normal file
|
@ -0,0 +1,33 @@
|
|||
terraform {
|
||||
required_providers {
|
||||
authentik = {
|
||||
source = "goauthentik/authentik"
|
||||
version = "~> 2024.8.0"
|
||||
}
|
||||
postgresql = {
|
||||
source = "cyrilgdn/postgresql"
|
||||
version = "~> 1.23.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
provider "authentik" {
|
||||
url = "${var.authentik_url}"
|
||||
token = "${var.authentik_token}"
|
||||
}
|
||||
|
||||
provider "postgresql" {
|
||||
host = "${var.postgresql_host}"
|
||||
port = "${var.postgresql_port}"
|
||||
database = "postgres"
|
||||
username = "${var.postgresql_username}"
|
||||
password = "${var.postgresql_password}"
|
||||
sslmode = "verify-full"
|
||||
connect_timeout = 15
|
||||
}
|
||||
|
||||
locals {
|
||||
services_auth = {for key, val in var.services : key => val if val.auth}
|
||||
services_database = {for key, val in var.services : key => val if val.database}
|
||||
services_s3 = {for key, val in var.services : key => val if val.s3}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue