fix
This commit is contained in:
@@ -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" {
|
||||
|
||||
Reference in New Issue
Block a user