You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
this driver pins the Nomad API package to version 1.1.0. This version unfortunately does not support some of the new settings introduced in Nomad 1.1.0, support was only added in version 1.1.3. For example you currently can't specify on_update in a service or check block.
Terraform Version
Terraform v1.0.4
on linux_amd64
+ provider registry.terraform.io/hashicorp/nomad v1.4.15
Nomad Version
Name Address Port Status Leader Protocol Build Datacenter Region
infra-1.de 172.24.124.52 4648 alive false 2 1.1.1 gce-int de
infra-2.de 172.24.124.29 4648 alive false 2 1.1.1 gce-int de
infra-3.de 172.24.124.27 4648 alive true 2 1.1.1 gce-int de
Affected Resource(s)
nomad_job
Terraform Configuration Files
resource"nomad_job""example" {
jobspec=<<EOTjob "example" { datacenters = ["gce-int"] group "cache" { network { port "db" { to = 6379 } } service { name = "example" port = "db" task = "redis" on_update = "ignore" } task "redis" { driver = "docker" config { image = "redis:3.2" ports = ["db"] } resources { cpu = 500 memory = 256 } } }}EOT
}
Panic Output
If Terraform produced a panic, please provide a link to a GitHub Gist containing the output of the crash.log.
Error: error parsing jobspec: error parsing 'job': 1 error occurred:
* group: 'cache', service (0): invalid key: on_update
with nomad_job.example,
on jobs.tf line 59, in resource "nomad_job" "example":
59: resource "nomad_job" "example" {
Expected Behavior
The job should have been deployed. on_update is a valid key in a service block.
Actual Behavior
The job failed to be parsed
Steps to Reproduce
Please list the steps required to reproduce the issue, for example:
Configure your Nomad provider to point at your DC and adjust it in the jobspec
terraform apply
The text was updated successfully, but these errors were encountered:
I was updating the Nomad version, but I think there aren't any significant changes that would impact the provider 🤔
In your specific case, the on_update service attribute was added in Nomad 1.1.0 readiness check, so it's already supported by the provider.
I think that what you are missing is enabling the HCL2 parser. This is required since new fields are only added to this parser. To maintain backwards compatibility, we chose to have this not be the default.
New fields are now being ported to the v1 parser (hashicorp/nomad#10931), so they will be supported in future releases once this work is out.
Give it a try with HCL2 and let us know if the problem persists.
Hello,
this driver pins the Nomad API package to version
1.1.0
. This version unfortunately does not support some of the new settings introduced in Nomad1.1.0
, support was only added in version1.1.3
. For example you currently can't specifyon_update
in aservice
orcheck
block.Terraform Version
Nomad Version
Affected Resource(s)
Terraform Configuration Files
Panic Output
If Terraform produced a panic, please provide a link to a GitHub Gist containing the output of the
crash.log
.Expected Behavior
The job should have been deployed.
on_update
is a valid key in aservice
block.Actual Behavior
The job failed to be parsed
Steps to Reproduce
Please list the steps required to reproduce the issue, for example:
terraform apply
The text was updated successfully, but these errors were encountered: