Hi, I am trying to get JWT authentication in the terraform vault provider to work so i can read/write secrets from vault to use in my terraform builds.
The problem is that the provider exits with the error that no vault token was provided even though i clearly provided one as seen here:
$ terraform plan -lock=false -out=$PLAN_BUILD -var="vaulttoken=${VAULT_TOKEN}" ╷ │ Error: Error making API request. │ │ Namespace: admin │ URL: PUT [MASKED]/v1/auth/jwt/login │ Code: 400. Errors: │ │ * missing token │ │ with provider["registry.terraform.io/hashicorp/vault"], │ on providers.tf line 17, in provider "vault": │ 17: provider "vault" { │ ╵
This is the relevant terraform configuration i am using:
provider "vault" {
address = "[MASKED]"
auth_login {
path = "auth/jwt/login"
namespace="admin"
method = "jwt"
parameters = {
role="kafka-all"
token=var.vaulttoken
}
}
}
any help / suggestions are appreciated as i am stuck on this for quite some time now.