Skip to content

Commit

Permalink
disable destroy tyme provisioner
Browse files Browse the repository at this point in the history
  • Loading branch information
arti-shalb committed May 12, 2023
1 parent 5dead18 commit bef33ca
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions cert-manager.tf
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,14 @@ resource "null_resource" "cluster_issuers" {
}
command = "echo \"${self.triggers.manifest}\" | kubectl apply -s $KUBE_HOST --token $TOKEN --certificate-authority $(echo $CA_CERTIFICATE | base64 -d > /tmp/ca0011; echo /tmp/ca0011) -f -"
}
provisioner "local-exec" {
when = destroy
interpreter = ["/bin/bash", "-c"]
environment = {
KUBE_HOST = data.aws_eks_cluster.cluster.endpoint
CA_CERTIFICATE = data.aws_eks_cluster.cluster.certificate_authority[0].data
TOKEN = data.aws_eks_cluster_auth.cluster.token
}
command = "echo \"${self.triggers.manifest}\" | kubectl delete -s $KUBE_HOST --token $TOKEN --certificate-authority $(echo $CA_CERTIFICATE | base64 -d > /tmp/ca0011; echo /tmp/ca0011) -f -"
}
# provisioner "local-exec" {
# when = destroy
# interpreter = ["/bin/bash", "-c"]
# environment = {
# KUBE_HOST = data.aws_eks_cluster.cluster.endpoint
# CA_CERTIFICATE = data.aws_eks_cluster.cluster.certificate_authority[0].data
# TOKEN = data.aws_eks_cluster_auth.cluster.token
# }
# command = "echo \"${self.triggers.manifest}\" | kubectl delete -s $KUBE_HOST --token $TOKEN --certificate-authority $(echo $CA_CERTIFICATE | base64 -d > /tmp/ca0011; echo /tmp/ca0011) -f -"
# }
}

0 comments on commit bef33ca

Please sign in to comment.