fix
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
locals {
|
||||
forward-outpost-providers = jsondecode(data.http.get_forward_outpost.response_body).results[0].providers
|
||||
forward-outpost-pk = jsondecode(data.http.get_forward_outpost.response_body).results[0].pk
|
||||
app-name = var.component == var.instance ? var.instance : format("%s-%s", var.component, var.instance)
|
||||
main-group = format("app-%s", local.app-name)
|
||||
external-url = format("https://%s", var.dns-names[0])
|
||||
rules-icons = [ for v in var.dns-names : {
|
||||
app_name = var.component == var.instance ? var.instance : format("%s-%s", var.component, var.instance)
|
||||
main-group = format("app-%s", local.app_name)
|
||||
external-url = format("https://%s", var.dns_names[0])
|
||||
rules-icons = [ for v in var.dns_names : {
|
||||
"host" = "${v}"
|
||||
"http" = {
|
||||
"paths" = [{
|
||||
@@ -28,10 +28,10 @@ resource "kubectl_manifest" "prj_ingress_icon" {
|
||||
namespace: "${var.namespace}"
|
||||
labels: ${jsonencode(var.labels)}
|
||||
spec:
|
||||
ingressClassName: "${var.ingress-class}"
|
||||
ingressClassName: "${var.ingress_class}"
|
||||
rules: ${jsonencode(local.rules-icons)}
|
||||
tls:
|
||||
- hosts: ${jsonencode(var.dns-names)}
|
||||
- hosts: ${jsonencode(var.dns_names)}
|
||||
secretName: "${var.instance}-cert"
|
||||
EOF
|
||||
}
|
||||
@@ -41,7 +41,7 @@ data "authentik_flow" "default-authorization-flow" {
|
||||
}
|
||||
|
||||
resource "authentik_provider_proxy" "prj_forward" {
|
||||
name = local.app-name
|
||||
name = local.app_name
|
||||
external_host = local.external-url
|
||||
authorization_flow = data.authentik_flow.default-authorization-flow.id
|
||||
mode = "forward_single"
|
||||
@@ -74,7 +74,7 @@ resource "kubectl_manifest" "prj_middleware" {
|
||||
apiVersion: traefik.containo.us/v1alpha1
|
||||
kind: Middleware
|
||||
metadata:
|
||||
name: "forward-${local.app-name}"
|
||||
name: "forward-${local.app_name}"
|
||||
namespace: "${var.namespace}"
|
||||
labels: ${jsonencode(var.labels)}
|
||||
spec:
|
||||
|
||||
@@ -13,13 +13,13 @@ variable "domain" {
|
||||
variable "namespace" {
|
||||
type = string
|
||||
}
|
||||
variable "ingress-class" {
|
||||
variable "ingress_class" {
|
||||
type = string
|
||||
}
|
||||
variable "labels" {
|
||||
type = map(string)
|
||||
}
|
||||
variable "dns-names" {
|
||||
variable "dns_names" {
|
||||
type = list(string)
|
||||
}
|
||||
variable "access-token-validity" {
|
||||
|
||||
Reference in New Issue
Block a user