Compare commits

...

2 Commits

Author SHA1 Message Date
de3bff8f14 Creating cluster issuer with yaml piped into terraform
Some checks failed
Ansible Linting / ansible-lint (push) Failing after 4s
Secops Linting and Safety Checks / checkov-scan-s3 (push) Failing after 15s
2025-10-03 18:01:16 -07:00
54a6ddbe5d Changing out the kubectl provider for a new one 2025-10-03 17:59:01 -07:00
3 changed files with 35 additions and 3 deletions

View File

@ -20,8 +20,8 @@ terraform {
version = "2.37.1"
}
kubectl = {
source = "alekc/kubectl"
version = "2.0.0"
source = "gavinbunney/kubectl"
version = " 1.19.0"
}
helm = {
source = "hashicorp/helm"

View File

@ -0,0 +1,18 @@
apiVersion: cert-manager.io/v1
kind: ClusterIssuer
metadata:
name: letsencrypt
spec:
acme:
# The ACME server URL
server: https://acme-staging-v02.api.letsencrypt.org/directory
preferredChain: "ISRG Root X1"
# Email address used for ACME registration
email: dev@shockrah.xyz
# Name of a secret used to store the ACME account private key
privateKeySecretRef:
name: letsencrypt
solvers:
- http01:
ingress:
class: nginx

View File

@ -13,4 +13,18 @@ resource helm_release shockrah_cert_manager {
value = "true"
}
]
}
}
data kubectl_file_documents cluster_issuer {
content = file("cluster-issuer.yaml")
}
resource kubectl_manifest cluster_issuer {
for_each = data.kubectl_file_documents.cluster_issuer.manifests
yaml_body = each.value
depends_on = [
data.kubectl_file_documents.cluster_issuer
]
}