File tree Expand file tree Collapse file tree
templates/kubernetes/terraform/modules/kubernetes Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -57,7 +57,7 @@ resource "null_resource" "cert_manager_issuer" {
5757 }
5858 # local exec call requires kubeconfig to be updated
5959 provisioner "local-exec" {
60- command = " kubectl apply -f - <<EOF\n ${ data . template_file . cert_manager_issuer . rendered } \n EOF"
60+ command = " kubectl apply ${ local . k8s_exec_context } -f - <<EOF\n ${ data . template_file . cert_manager_issuer . rendered } \n EOF"
6161 }
6262 depends_on = [helm_release . cert_manager ]
6363}
Original file line number Diff line number Diff line change 1+ locals {
2+ k8s_exec_context = " --context ${ data . aws_eks_cluster . cluster . name } --server ${ data . aws_eks_cluster . cluster . endpoint } "
3+ }
4+
15data "aws_caller_identity" "current" {}
26
37
Original file line number Diff line number Diff line change @@ -230,7 +230,7 @@ resource "null_resource" "oathkeeper_kratos_proxy_rules" {
230230 }
231231 # local exec call requires kubeconfig to be updated
232232 provisioner "local-exec" {
233- command = " kubectl apply -f - <<EOF\n ${ data . template_file . oathkeeper_kratos_proxy_rules [0 ]. rendered } \n EOF"
233+ command = " kubectl apply ${ local . k8s_exec_context } -f - <<EOF\n ${ data . template_file . oathkeeper_kratos_proxy_rules [0 ]. rendered } \n EOF"
234234 }
235235 depends_on = [helm_release . oathkeeper ]
236236}
You can’t perform that action at this time.
0 commit comments