Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix deprecated null_resource with terraform_data
Signed-off-by: Zach Jacobson <[email protected]>
  • Loading branch information
zjaco13 committed Sep 6, 2024
commit 7d5b9dc0a56e1d6d5316701700d4b8157e9330f4
6 changes: 3 additions & 3 deletions terraform/cert-manager.tf
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,17 @@ resource "kubectl_manifest" "application_argocd_cert_manager" {
})
}

resource "null_resource" "wait_for_cert_manager" {
resource "terraform_data" "wait_for_cert_manager" {
provisioner "local-exec" {
command = "kubectl wait --for=jsonpath=.status.health.status=Healthy -n argocd application/cert-manager && kubectl wait --for=jsonpath=.status.sync.status=Synced --timeout=300s -n argocd application/cert-manager && sleep 60"
command = "kubectl wait --for=jsonpath=.status.health.status=Healthy -n argocd application/cert-manager && kubectl wait --for=jsonpath=.status.sync.status=Synced --timeout=300s -n argocd application/cert-manager"
}

depends_on = [kubectl_manifest.application_argocd_cert_manager]
}

resource "kubectl_manifest" "cluster_issuer_prod" {
depends_on = [
null_resource.wait_for_cert_manager,
terraform_data.wait_for_cert_manager,
kubectl_manifest.application_argocd_ingress_nginx
]
yaml_body = templatefile("${path.module}/templates/manifests/cluster-issuer.yaml", {
Expand Down
5 changes: 4 additions & 1 deletion terraform/versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ terraform {
source = "alekc/kubectl"
version = ">= 2.0.0"
}
null = {}
http = {
source = "hashicorp/http"
version = ">= 3.4.4"
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this module needed?

}
}