diff --git a/builtin/providers/nomad/provider_test.go b/builtin/providers/nomad/provider_test.go index 8364cdd69c8b..ccc8a1480ac5 100644 --- a/builtin/providers/nomad/provider_test.go +++ b/builtin/providers/nomad/provider_test.go @@ -11,7 +11,7 @@ import ( // How to run the acceptance tests for this provider: // // - Obtain an official Nomad release from https://nomadproject.io -// and extra "nomad" somewhere +// and extra the "nomad" binary // // - Run the following to start the Nomad agent in development mode: // nomad agent -dev diff --git a/builtin/providers/nomad/resource_job.go b/builtin/providers/nomad/resource_job.go index dfe133c4973f..4f0b3512328b 100644 --- a/builtin/providers/nomad/resource_job.go +++ b/builtin/providers/nomad/resource_job.go @@ -79,7 +79,10 @@ func resourceJobRegister(d *schema.ResourceData, meta interface{}) error { log.Printf("[DEBUG] Deregistering job: %q", prevId) _, _, err := client.Jobs().Deregister(prevId, nil) if err != nil { - return fmt.Errorf("error deregistering previous job %q: %s", prevId, err) + return fmt.Errorf( + "error deregistering previous job %q "+ + "before registering new job %q: %s", + prevId, jobspecStruct.ID, err) } // Success! Clear our state. diff --git a/website/source/docs/providers/nomad/index.html.markdown b/website/source/docs/providers/nomad/index.html.markdown index 81a61ee7ef92..dd048cdce280 100644 --- a/website/source/docs/providers/nomad/index.html.markdown +++ b/website/source/docs/providers/nomad/index.html.markdown @@ -32,5 +32,5 @@ resource "nomad_job" "monitoring" { The following arguments are supported: -* `address` - (Optional) The HTTP(S) API address of the agent to use. Defaults to "127.0.0.1:4646". `NOMAD_ADDR` can also be used. -* `region` - (Optional) The Nomad region to target. `NOMAD_REGION` can also be used. +* `address` - (Optional) The HTTP(S) API address of the Nomad agent to use. Defaults to `127.0.0.1:4646`. The `NOMAD_ADDR` environment variable can also be used. +* `region` - (Optional) The Nomad region to target. The `NOMAD_REGION` environment variable can also be used.