diff --git a/terraform/kubernetes/templates/deployment.tf b/terraform/kubernetes/deployment.tf similarity index 100% rename from terraform/kubernetes/templates/deployment.tf rename to terraform/kubernetes/deployment.tf diff --git a/terraform/kubernetes/templates/ingress.tf b/terraform/kubernetes/ingress.tf similarity index 100% rename from terraform/kubernetes/templates/ingress.tf rename to terraform/kubernetes/ingress.tf diff --git a/terraform/kubernetes/templates/secret.tf b/terraform/kubernetes/secret.tf similarity index 100% rename from terraform/kubernetes/templates/secret.tf rename to terraform/kubernetes/secret.tf diff --git a/terraform/kubernetes/templates/service.tf b/terraform/kubernetes/service.tf similarity index 100% rename from terraform/kubernetes/templates/service.tf rename to terraform/kubernetes/service.tf diff --git a/terraform/templates/kubernetes-automation-example/certmanager-cloudflare.tf b/terraform/templates/kubernetes-automation-example/certmanager-cloudflare.tf new file mode 100644 index 0000000..3cb6e6a --- /dev/null +++ b/terraform/templates/kubernetes-automation-example/certmanager-cloudflare.tf @@ -0,0 +1,15 @@ +resource "kubernetes_secret" "cloudflare_api_key_secret" { + + depends_on = [kubernetes_namespace.certmanager] + + metadata { + name = "cloudflare-api-key-secret" + namespace = "certmanager" + } + + data = { + api-key = var.cloudflare_api_key + } + + type = "Opaque" +} \ No newline at end of file diff --git a/terraform/templates/kubernetes-automation-example/certmanager-clusterissuer.tf b/terraform/templates/kubernetes-automation-example/certmanager-clusterissuer.tf new file mode 100644 index 0000000..1346f1c --- /dev/null +++ b/terraform/templates/kubernetes-automation-example/certmanager-clusterissuer.tf @@ -0,0 +1,31 @@ +resource "kubectl_manifest" "cloudflare_prod" { + + depends_on = [time_sleep.wait_for_certmanager] + + yaml_body = <