Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Need to get value from values.yaml (helm) in terraform not from Terraform variables or hardcoded #794

Closed
shamanthreddyTR opened this issue Oct 27, 2021 · 3 comments

Comments

@shamanthreddyTR
Copy link

shamanthreddyTR commented Oct 27, 2021

Terraform version: 13.5
Helm Provider version: 3.0
Kubernetes version: 1.19

## Terraform configuration
resource "helm_release" "ngnix-ingress-controller" {
  name       = `"ingress-controller"`
  repository = "https://kubernetes.github.io/ingress-nginx"
  namespace = kubernetes_namespace.post-namespace.metadata.0.name
  chart      = "ingress-nginx"
  version = "3.34.0"
 
  values = [<<EOF
controller:
  config:
    proxy-body-size : "0"
    proxy-connect-timeout : "60"
    proxy-read-timeout : "5400"
    proxy-send-timeout : "5400"
EOF
  ]
}
`

## Question

Im setting up Ingress via terraform using helm and kubenetes provider,In the below code I had hardcorded the values like (proxy-body-size : "0" , proxy-connect-timeout : "60" etc ) but I wanted to get them from helm values.yaml and run it via terraform.
@timothyclarke
Copy link

timothyclarke commented Jan 4, 2022

@shamanthreddyTR Isn't that a more generic "How do I read a file into terraform" question ?
eg values = file("values.yaml")

@sunshine69
Copy link

I am not sure if it work, form what I see in my test

values = [
      "${file("values.yaml")}"
    ]

does not work at all. Using set for each item work. Is it a new bug?

@github-actions
Copy link

github-actions bot commented Aug 7, 2023

Marking this issue as stale due to inactivity. If this issue receives no comments in the next 30 days it will automatically be closed. If this issue was automatically closed and you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. This helps our maintainers find and focus on the active issues. Maintainers may also remove the stale label at their discretion. Thank you!

@github-actions github-actions bot added the stale label Aug 7, 2023
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Sep 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants