Skip to content

Commit

Permalink
fix: don't assume remote state for eks auth (#1048)
Browse files Browse the repository at this point in the history
* feat: allow variables to specify values in main.tf

* filter out nonexistent variables

* loop

* feat: generate provider configs for kubectl & helm

* remove custom provider

* tidy

* conditionals

* index

* feat: extra_templates allows users to control templates

* commit from ci -- updated golden files

* no template header

* Update config/v2/config.go

Co-authored-by: Hayden Spitzley <[email protected]>

* maps

* fix: don't assume remote state for eks provider

* commit from ci -- updated golden files

---------

Co-authored-by: jakeyheath <[email protected]>
Co-authored-by: Hayden Spitzley <[email protected]>
  • Loading branch information
3 people authored May 1, 2024
1 parent c0f58ef commit 1a8553c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions templates/templates/common/kubernetes_provider.tmpl
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{{ define "kubernetes_provider" -}}
{{ if .Kubernetes.ClusterComponentName -}}
data "aws_eks_cluster" "cluster" {
name = data.terraform_remote_state.{{ .Kubernetes.ClusterComponentName }}.outputs.cluster_id
name = {{ .Kubernetes.ClusterComponentName }}
}

data "aws_eks_cluster_auth" "cluster" {
name = data.terraform_remote_state.{{ .Kubernetes.ClusterComponentName }}.outputs.cluster_id
name = {{ .Kubernetes.ClusterComponentName }}
}

provider "kubernetes" {
Expand Down
4 changes: 2 additions & 2 deletions testdata/v2_full_yaml/terraform/envs/staging/k8s-comp/fogg.tf

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 1a8553c

Please sign in to comment.