This commit is contained in:
2023-11-28 15:22:53 +01:00
parent 2aba25f5d7
commit c2fdf16e8e
2 changed files with 57 additions and 47 deletions

View File

@@ -27,7 +27,7 @@ resource "null_resource" "get_known" {
count = local.needUser?1:0
triggers = { always_run = "${timestamp()}" }
provisioner "local-exec" {
command = "ssh-keyscan -p ${data.kubernetes_service.gitea-ssh.spec.0.port.0.port} ${data.kubernetes_ingress_v1.gitea.spec[0].rule[0].host} > ${path.module}/known_host.txt"
command = "ssh-keyscan -p ${data.kubernetes_service.gitea-ssh.spec.0.port.0.port} ${var.gitea-ssh-domain!=""?var.gitea-ssh-domain:data.kubernetes_ingress_v1.gitea.spec[0].rule[0].host} > ${path.module}/known_host.txt"
}
}
@@ -53,6 +53,11 @@ resource "kubectl_manifest" "ssh-creds" {
data:
known_hosts: "${data.local_file.known_host[0].content}"
EOF
lifecycle {
ignore_changes = [
yaml_body,
]
}
}
data "kubernetes_secret_v1" "ssh-creds-read" {

View File

@@ -6,6 +6,31 @@ metadata:
name: organisation
description: null
options:
haveGitea:
default: false
examples:
- false
type: boolean
issuer:
default: letsencrypt-prod
examples:
- letsencrypt-prod
type: string
app-group:
default: dev
examples:
- dev
type: string
domain-name:
default: your_company.com
examples:
- your_company.com
type: string
ingress-class:
default: traefik
examples:
- traefik
type: string
domain:
default: your-company
examples:
@@ -41,52 +66,6 @@ options:
default: backup-settings
type: string
type: object
ingress-class:
default: traefik
examples:
- traefik
type: string
datasets:
default: []
items:
properties:
engine:
default: pg
type: string
name:
default: ''
type: string
type: object
type: array
haveGitea:
default: false
examples:
- false
type: boolean
issuer:
default: letsencrypt-prod
examples:
- letsencrypt-prod
type: string
domain-name:
default: your_company.com
examples:
- your_company.com
type: string
app-group:
default: dev
examples:
- dev
type: string
stages:
default: []
items:
properties:
name:
default: prod
type: string
type: object
type: array
distributions:
default:
core: core
@@ -102,6 +81,32 @@ options:
default: domain
type: string
type: object
gitea-ssh-domain:
default: ''
examples:
- ''
type: string
stages:
default: []
items:
properties:
name:
default: prod
type: string
type: object
type: array
datasets:
default: []
items:
properties:
engine:
default: pg
type: string
name:
default: ''
type: string
type: object
type: array
dependencies: []
providers:
kubernetes: true