-
Notifications
You must be signed in to change notification settings - Fork 102
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
resource/job: set namespace on register #386
Conversation
Hi @FourLeafTec 👋 Thank you for the PR, and apologies for the delay on getting this reviewed. I think the changes look good, but I'm curious to understand how you reached this problem. The Nomad API should use the namespace from the job if none is set in the request: Since the provider doesn't set any
I have not use |
Ohh I see, I think it's the same problem as #274. If We added the provider "nomad" {
ignore_env_vars = {
"NOMAD_NAMESPACE" = true
"NOMAD_REGION" = true
}
} But setting the correct namespace sounds like a good thing to do regardless. Just watch out for the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pushed a commit to also set the namespace on PlanOpts
and another one to add a changelog entry.
Thank you for the contribution!
… coder's allocation. If coder is running the terraform CLI as a Nomad job, then it may be reading the NOMAD_NAMESPACE env var from that allocation. Added the ignore_env_vars to fix this problem. hashicorp/terraform-provider-nomad#386
When register jobs by Http api need to set the job namespace in the request.
coder/coder#10074