add just in case

This commit is contained in:
2024-11-07 11:53:30 +00:00
parent 700d508c8d
commit 786b1d56c0
3 changed files with 159 additions and 106 deletions
+9 -6
View File
@@ -14,7 +14,7 @@ variable "nginx_sites" {
}))
}
/*
resource "local_file" "nginx" {
# for_each = var.nginx_sites
for_each = { for key, value in var.nginx_sites : key => value if value.enabled == true }
@@ -38,7 +38,7 @@ resource "local_file" "nginx" {
}
}
*/
#resource "kubernetes_config_map" "automatic-configmap" {
# metadata {
@@ -67,6 +67,9 @@ resource "kubernetes_config_map" "automatic-configmap" {
metadata {
name = "sites-terraform"
namespace = "reverse-proxy"
annotations = {
"reloader.stakater.com/match" : "true",
}
}
data = {
@@ -82,10 +85,10 @@ resource "kubernetes_config_map" "automatic-configmap" {
}) if value.enabled == true
}
provisioner "local-exec" {
command = "kubectl get pods -n reverse-proxy -o name | xargs -I{} kubectl delete -n reverse-proxy {}"
quiet = true
}
# provisioner "local-exec" {
# command = "kubectl get pods -n reverse-proxy -o name | xargs -I{} kubectl delete -n reverse-proxy {}"
# quiet = true
# }
}