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

add namespace to nomad_job #125

Closed
cgbaker opened this issue Jul 10, 2020 · 2 comments
Closed

add namespace to nomad_job #125

cgbaker opened this issue Jul 10, 2020 · 2 comments

Comments

@cgbaker
Copy link
Contributor

cgbaker commented Jul 10, 2020

some users have requested the ability to specify the namespace on a nomad job without having explicitly putting it into the job spec. this can be done by taking the existing computed attribute namespace and allowing it to be (optionally) specified.

specifically, would like to be able to do something like this:

provider "nomad" {
  address = "http://localhost:4646"
}

resource "nomad_namespace" "mynamespace" {
  name = "mynamespace"
}

resource "nomad_job" "myjob" {
  jobspec = file("${path.module}/myjob.nomad")
  detach = false
  namespace = nomad_namespace.mynamespace.name
}
@cgbaker cgbaker added this to the 1.4.9 milestone Jul 10, 2020
@cgbaker cgbaker self-assigned this Jul 14, 2020
@gogococo gogococo self-assigned this Jul 14, 2020
@cgbaker cgbaker removed their assignment Jul 23, 2020
@cgbaker
Copy link
Contributor Author

cgbaker commented Aug 14, 2020

because this is a computed field, making it also optional (so that users can specify it) causes a bunch of problems with the terraform plugin SDK, as it currently stands. we can revisit this later; they plan is to provide a new Nomad job resource which is structured to allow all viable fields at the top level.

@cgbaker cgbaker removed this from the 1.4.9 milestone Aug 14, 2020
@lgfa29
Copy link
Contributor

lgfa29 commented Oct 29, 2020

Closing this for now as it has the same underlying issue of #1. We will address this problem in #149.

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