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

file resource for nomad volume #283

Closed
thatsk opened this issue Aug 30, 2022 · 1 comment
Closed

file resource for nomad volume #283

thatsk opened this issue Aug 30, 2022 · 1 comment

Comments

@thatsk
Copy link

thatsk commented Aug 30, 2022

resource "nomad_volume" "mysql_volume" {
jobspec = file("${path.module}/volume.hcl")
}

is there way we can pass like this rather then defining into it.

@lgfa29
Copy link
Contributor

lgfa29 commented Aug 31, 2022

Thanks for the idea @thatsk 🙂

Unfortunately this approach goes against the way Terraform works, and it has given a lot of headache in the nomad_job resource. Since all you're give to Terraform is a string, it can't actually compare its own local state and the remote state in Nomad to detect changes, which results in problems like #1 and prevents us from exposing values in the resource like in #125 (comment).

While I can see how it would be great to be able to use the same input in the nomad and terraform CLI the experience we had shows that it actually results in more problems than it's worth 😕

@lgfa29 lgfa29 closed this as completed Aug 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants