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

deps: provider should avoid importing github.com/hashicorp/vault #150

Closed
jrasell opened this issue Sep 2, 2020 · 3 comments
Closed

deps: provider should avoid importing github.com/hashicorp/vault #150

jrasell opened this issue Sep 2, 2020 · 3 comments

Comments

@jrasell
Copy link
Member

jrasell commented Sep 2, 2020

Vault issue comment reference: hashicorp/vault#9575 (comment)

The Nomad provider currently imports github.com/hashicorp/vault because of its use of config.DefaultTokenHelper() within provider.go. A per the above discussion Vault imports should be limited to sdk and api otherwise problems may occur.

A quick look indicates there is no token helper functionality within either of the recommended packages, although this was not exhaustive.

jrasell added a commit to hashicorp/levant that referenced this issue Sep 2, 2020
The Nomad module setup is not designed nor intended to have any
pkg apart from api imported. This caused problems when using the
jobspec package. The Nomad Terraform provider has exactly this
problem and has its own version of the Parse functionality. I
attempted to import this to avoid more duplication but ran into
hashicorp/terraform-provider-nomad#150.

This is therefore a temp solution so the project can be easily
used and released.
@tristanmorgan
Copy link
Member

A note for anyone caught when you broke your Vault token helper.... this is the error message displayed.

╷
│ Error: Error getting token helper: unknown error getting the external helper path
│ 
│   with provider["registry.terraform.io/hashicorp/nomad"],
│   on <input-prompt> line 1:
│   (source code not available)
│ 
╵

Is there a reason why a vault misconfiguration should affect a 3 line nomad config?

data "nomad_job" "example" {
  job_id = "example"
}

@lgfa29
Copy link
Contributor

lgfa29 commented Jul 12, 2023

Hi @tristanmorgan,

The Nomad provider uses the same logic as Vault to find a token, so if your Vault token helper is incorrect, the Nomad provider will fail as well.

@lgfa29
Copy link
Contributor

lgfa29 commented Mar 18, 2024

Closed by #445

@lgfa29 lgfa29 closed this as completed Mar 18, 2024
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