NS1 Terraform Provider
This project is in active development.
- NS1 Website: https://www.ns1.com
- Terraform Website: https://www.terraform.io
- Mailing list: Google Groups
- Requirements - lists the requirements for building the provider
- Building The Provider - lists the steps for building the provider
- Using The Provider - details how to use the provider
- Developing The Provider - steps for contributing back to the provider
- Known Isssues/Roadmap - check here for some of the improvements we are working on
Building The Provider
Clone repository to:
$ mkdir -p $GOPATH/src/github.com/terraform-providers $ cd $GOPATH/src/github.com/terraform-providers $ git clone email@example.com:terraform-providers/terraform-provider-ns1
Enter the provider directory and build the provider
$ cd $GOPATH/src/github.com/terraform-providers/terraform-provider-ns1 $ make build
Using The Provider
The documentation and examples for NS1
Data Sources is
maintained as part of this repository, in the
/website directory. This is
as part of the release process.
Developing The Provider
If you wish to work on the provider, you'll first need Go installed on your machine
(version 1.11+ is required). You'll also need to correctly setup a GOPATH,
as well as adding
$GOPATH/bin to your
To compile the provider, run
make build. This will build the provider and put the provider binary in
$ make bin ... $ $GOPATH/bin/terraform-provider-ns1 ...
In order to test the provider, you can simply run
$ make test
In order to run the full suite of Acceptance tests, run
Note: Acceptance tests create real resources, and often cost money to run.
$ make testacc
Some helpful things for debugging:
TF_LOG=DEBUGfor verbose logging.
- Additionally set
NS1_DEBUGenvironment variable to include details of the API requests in the logs.
Pull Requests and issues are welcome. See the NS1 Contribution Guidelines for more information.
- Currently, some arguments marked as required in resource documentation are de-facto optional. A resource will be created/updated without error, but in general will lead to a "dirty terraform" state, since the defaulted attributes on the returned state may not match the resource descriptions. We're working on making these either truly Required or truly Optional as appropriate.
- Currently, some resources do not return attributes for optional features that are unused. We are working on making the resource schemas fixed, with proper defaults returned for optional/unused features.
- We'll be adding a
recorddata source ASAP, to cover simple read-only use cases