Code development platform for open source projects from the European Union institutions :large_blue_circle: EU Login authentication by SMS has been phased out. To see alternatives please check here

Skip to content
Snippets Groups Projects
Commit 09ba7b81 authored by David Parimucha's avatar David Parimucha
Browse files

Merge branch 'feature-keycloak' into 'main'

Feature - helm charts and databases for keycloak

See merge request simpl/Operations/terraform-modules!2
parents f9354eae 987ee72e
Branches
Tags database-v0.0.1 helm-v0.0.2
1 merge request!2Feature - helm charts and databases for keycloak
terraform {
required_version = ">= 1.0"
required_providers {
ovh = {
source = "ovh/ovh"
version = "~>0.40"
}
}
}
resource "ovh_cloud_project_database" "this" {
for_each = var.database-project
service_name = each.value["database-project-service-name"]
description = each.value["database-project-description"]
engine = each.value["database-project-engine"]
version = each.value["database-project-version"]
plan = each.value["database-project-plan"]
flavor = each.value["database-project-flavor"]
dynamic "nodes" {
for_each = var.custom-nodes
content {
region = nodes.value["database-project-nodes-region"]
network_id = nodes.value["database-project-nodes-network-id"]
subnet_id = nodes.value["database-project-nodes-subnet-id"]
}
}
}
variable "database-project" {
description = "map variable for helm releases"
type = map(object({
database-project-service-name = string
database-project-description = string
database-project-engine = string
database-project-version = string
database-project-plan = string
database-project-flavor = string
}))
}
variable "custom-nodes" {
description = "custom nodes variable for database config"
type = map(object({
database-project-nodes-subnet-id = string
database-project-nodes-network-id = string
database-project-nodes-region = string
}))
}
# variable "database-project-nodes-region" {
# description = "region for database nodes block"
# type = string
# }
#
# variable "database-project-nodes-network-id" {
# description = "network id for database nodes block"
# type = string
# }
#
# variable "database-project-nodes-subnet-id" {
# description = "subnet id for database nodes block"
# type = string
# }
#
resource "helm_release" "nginx" {
name = var.helm-release-name
repository = var.helm-release-repository
chart = var.helm-release-chart
version = var.helm-release-version
resource "helm_release" "this" {
for_each = var.helm-release
name = each.value["helm-release-name"]
repository = each.value["helm-release-repository"]
chart = each.value["helm-release-chart"]
version = each.value["helm-release-version"]
namespace = each.value["helm-release-namespace"]
create_namespace = each.value["helm-release-create-namespace"]
values = each.value["helm-release-custom-config-files"]
# [
# file("${path.module}/config/cert-manager-values.yaml"),
# file("${path.module}/config/issuer.yaml"),
# ]
}
......@@ -18,22 +18,15 @@ variable "helm-client-ca-certificate" {
type = string
}
variable "helm-release-name" {
description = "name of the helm release"
type = string
}
variable "helm-release-repository" {
description = "helm repository release"
type = string
}
variable "helm-release-chart" {
description = "helm chart name"
type = string
}
variable "helm-release-version" {
description = "chart version"
type = string
variable "helm-release" {
description = "map variable for helm releases"
type = map(object({
helm-release-create-namespace = bool
helm-release-namespace = string
helm-release-version = string
helm-release-chart = string
helm-release-repository = string
helm-release-name = string
helm-release-custom-config-files = list(string)
}))
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment