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.
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!
Most helpful comment
https://github.com/terraform-providers/terraform-provider-helm/pull/137#discussion_r227920062