Terraform-provider-helm: Need to be able to control --kube-context

Created on 11 Oct 2017  ·  9Comments  ·  Source: hashicorp/terraform-provider-helm

When running terraform it currently just uses the default helm host and kube-context. There should be a way to override the kube-context with something else. That way you can have two chart resources installed in different namespaces by different user accounts / contexts with different permissions.

enhancement

Most helpful comment

I believe the proper solution would be defining multiple providers with different aliases and contexts and using those provider aliases in the resources.

All 9 comments

You can do this: https://github.com/mcuadros/terraform-provider-helm/blob/master/docs/index.html.md#statically-defined-credentials

Not exactly what you're asking for but could work.

@kraney if I am right, you want to configure the context, by release and not a provider level?

Yes, that's right. Something finer-grained than at the provider level.

I believe the proper solution would be defining multiple providers with different aliases and contexts and using those provider aliases in the resources.

Definitely agree with @sagikazarmark. If you want to specify a kube context at the release level, wrap you release as a Terraform module and embed the helm provider configuration there, configurable with a variable and provider alias.

I don't think a terraform module is necessary, but it certainly provides better separation.

Multi providers solution is the right way to handle such use-case.

Should this issue be closed? @mcuadros @meyskens @alexsomesan

Closing this issue since is making reference to a version based on Helm 2, if this is still valid to the master branch please reopen it. Thanks.

I'm going to lock this issue because it has been closed for _30 days_ ⏳. This helps our maintainers find and focus on the active issues.

If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. If you feel I made an error 🤖 🙉 , please reach out to my human friends 👉 [email protected]. Thanks!

Was this page helpful?
0 / 5 - 0 ratings