mirror of
https://github.com/dat515-2025/Group-8.git
synced 2026-03-22 06:57:47 +01:00
40 lines
784 B
HCL
40 lines
784 B
HCL
terraform {
|
|
required_providers {
|
|
kubectl = {
|
|
source = "gavinbunney/kubectl"
|
|
version = "1.19.0"
|
|
}
|
|
helm = {
|
|
source = "hashicorp/helm"
|
|
version = "3.0.2"
|
|
}
|
|
kubernetes = {
|
|
source = "hashicorp/kubernetes"
|
|
version = "2.38.0"
|
|
}
|
|
}
|
|
}
|
|
|
|
resource "kubernetes_namespace" "argocd" {
|
|
metadata {
|
|
name = "argocd"
|
|
}
|
|
}
|
|
|
|
resource "helm_release" "argocd" {
|
|
name = "argocd"
|
|
namespace = "argocd"
|
|
repository = "https://argoproj.github.io/argo-helm"
|
|
chart = "argo-cd"
|
|
depends_on = [kubernetes_namespace.argocd]
|
|
}
|
|
|
|
resource "kubectl_manifest" "argocd-tunnel-bind" {
|
|
depends_on = [helm_release.argocd]
|
|
|
|
yaml_body = templatefile("${path.module}/argocd-ui.yaml", {
|
|
base_domain = var.cloudflare_domain
|
|
})
|
|
}
|
|
|