Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/hashicorp/terraform-provider-nomad
Terraform Nomad provider
https://github.com/hashicorp/terraform-provider-nomad
nomad terraform terraform-provider
Last synced: 1 day ago
JSON representation
Terraform Nomad provider
- Host: GitHub
- URL: https://github.com/hashicorp/terraform-provider-nomad
- Owner: hashicorp
- License: mpl-2.0
- Created: 2017-06-05T20:53:54.000Z (over 7 years ago)
- Default Branch: main
- Last Pushed: 2024-12-12T10:03:55.000Z (11 days ago)
- Last Synced: 2024-12-15T14:04:52.222Z (8 days ago)
- Topics: nomad, terraform, terraform-provider
- Language: Go
- Homepage: https://registry.terraform.io/providers/hashicorp/nomad/latest
- Size: 11 MB
- Stars: 145
- Watchers: 25
- Forks: 101
- Open Issues: 25
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
- Code of conduct: .github/CODE_OF_CONDUCT.md
- Codeowners: CODEOWNERS
- Support: .github/SUPPORT.md
Awesome Lists containing this project
README
Nomad Terraform Provider
========================- Website: https://registry.terraform.io/providers/hashicorp/nomad
Maintainers
-----------This provider plugin is maintained by the Nomad team at [HashiCorp](https://www.hashicorp.com/).
Requirements
------------- [Terraform](https://www.terraform.io/downloads.html) 1.0.x
- [Go](https://golang.org/doc/install) 1.21 (to build the provider plugin)Building The Provider
---------------------Clone repository to: `$GOPATH/src/github.com/hashicorp/terraform-provider-nomad`
```sh
$ mkdir -p $GOPATH/src/github.com/hashicorp; cd $GOPATH/src/github.com/hashicorp
$ git clone [email protected]:hashicorp/terraform-provider-nomad
```Enter the provider directory and build the provider
```sh
$ cd $GOPATH/src/github.com/hashicorp/terraform-provider-nomad
$ make build
```Using the provider
----------------------To use a released provider in your Terraform environment, run
[`terraform init`](https://www.terraform.io/docs/commands/init.html) and
Terraform will automatically install the provider. To specify a particular
provider version when installing released providers, see the [Terraform
documentation on provider versioning](https://www.terraform.io/docs/configuration/providers.html#version-provider-versions).Refer to the section below for instructions on how to to use a custom-built
version of the provider.For either installation method, documentation about the provider specific
configuration options can be found on the
[provider's website](https://www.terraform.io/docs/providers/nomad/).Developing the Provider
---------------------------If you wish to work on the provider, you'll first need
[Go](http://www.golang.org) installed on your machine (version 1.20+ is
*required*). You'll also need to correctly setup a
[GOPATH](http://golang.org/doc/code.html#GOPATH), as well as adding
`$GOPATH/bin` to your `$PATH`.To compile the provider, run `make build`. This will build the provider and put
the provider binary in the `$GOPATH/bin` directory.```sh
$ make build
...
$ $GOPATH/bin/terraform-provider-nomad
...
```To use the provider binary in a local configuration, create a file called
`.terraformrc` in your home directory and specify a [development
override][tf_docs_dev_overrides] for the `nomad` provider.```hcl
provider_installation {
dev_overrides {
"hashicorp/nomad" = "/bin/"
}
}
```In order to test the provider, you can simply run `make test`.
```sh
$ make test
```In order to run the full suite of Acceptance tests:
1. setup test environment
```sh
nomad agent -dev -acl-enabled
```2. obtain a management token
```sh
nomad acl bootstrap
```4. set nomad agent address (if differs from `http://localhost:4646`) and token secret ID and run tests
```sh
NOMAD_TOKEN= NOMAD_ADDR=http://: make testacc
```Acceptance tests expect fresh instance of nomad agent, so all steps must be
performed every time tests are executed.*Note:* Acceptance tests create real resources, and may cost money to run.
[tf_docs_dev_overrides]: https://developer.hashicorp.com/terraform/cli/config/config-file#development-overrides-for-provider-developers