Terraform-provider-helm: Helm Repository does not work with remote state.

Created on 2 Nov 2018  ·  5Comments  ·  Source: hashicorp/terraform-provider-helm

Terraform Version

  • v0.11.8
  • provider: 0.6.2

Affected Resource(s)

  • helm_repository

The repository resource installs itself in the users helm directory, if you create such a resource but are storing terraform state in a remote state e.g. s3 then terraform will report that this resource has been created but any other user using the same terraform will not have access to that repostitory.

I am not sure if it is possible to somehow store repository information in/retrieve data from the remote state. This is useful if you have multiple devs working on terraform/run from CI pipeline.

bug

Most helpful comment

https://github.com/terraform-providers/terraform-provider-helm/pull/137#discussion_r227920062

Anyway the real problem is the helm_repository resource that most likely should be deprecated and make helm_release download charts.

All 5 comments

I've run into this as well and the local repo state seems to be fundamental to how helm v2 operates. Although it would unfortunately thrash the tf state, I think it should work if helm_repository decided the repo config was out of sync and re-created it rather than erroring out because the repo config is missing completely.

https://github.com/terraform-providers/terraform-provider-helm/pull/137#discussion_r227920062

Anyway the real problem is the helm_repository resource that most likely should be deprecated and make helm_release download charts.

My solution was to add a null_resource, forced to run every time through this hack:

triggers {
    run_everytime = "${timestamp()}"
}

which basically executes helm add repo <local_repo_name> https://chartmuseum.company.com

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

Related issues

shamsalmon picture shamsalmon  ·  34Comments

eeeschwartz picture eeeschwartz  ·  23Comments

iliasbertsimas picture iliasbertsimas  ·  12Comments

aaronmell picture aaronmell  ·  22Comments

stefanthorpe picture stefanthorpe  ·  14Comments