No description
  • Go 94.4%
  • HCL 2.4%
  • HTML 1.2%
  • Shell 1.1%
  • Makefile 0.9%
Find a file
2020-07-21 11:57:26 -04:00
.github Make CoC and support channels more visible 2017-11-01 23:05:42 +01:00
ns1 deprecate manage_plan permission (#131) 2020-07-21 11:57:26 -04:00
scripts Fix Changelog Links Script for ns1 provider 2017-06-26 13:59:07 -04:00
vendor use NS1 SDK (2.3.0) 2020-03-19 15:16:51 -04:00
website Update index.html.markdown (#129) 2020-07-21 11:45:06 -04:00
.gitignore Update ns1-go and add tests to support passing multiple ip_prefixes 2019-07-03 16:36:46 -04:00
.go-version provider: Ensured Go 1.11 in TravisCI and README 2019-02-22 18:30:11 -05:00
.travis.yml bump go version for CI and README (1.11+ to 1.12+) (#76) 2019-10-10 15:18:46 -04:00
CHANGELOG.md Cleanup after v1.8.4 release 2020-06-24 17:46:13 +00:00
GNUmakefile Minor Documentation and Makefile fixes (#89) 2019-11-18 10:43:10 -05:00
go.mod use NS1 SDK (2.3.0) 2020-03-19 15:16:51 -04:00
go.sum use NS1 SDK (2.3.0) 2020-03-19 15:16:51 -04:00
LICENSE initial commit 2017-06-05 20:56:54 +00:00
main.go move to standalone sdk 2019-12-30 11:04:59 -08:00
README.md replace examples in README with links to docs (#120) 2020-04-24 22:37:39 -04:00

NS1 Terraform Provider

This project is in active development.

Contents

  1. Requirements - lists the requirements for building the provider
  2. Building The Provider - lists the steps for building the provider
  3. Using The Provider - details how to use the provider
  4. Developing The Provider - steps for contributing back to the provider
  5. Known Isssues/Roadmap - check here for some of the improvements we are working on

Requirements

  • Terraform 0.10+
  • Go 1.12+ (to build the provider plugin)

Building The Provider

Clone repository to: $GOPATH/src/github.com/terraform-providers/terraform-provider-ns1

$ mkdir -p $GOPATH/src/github.com/terraform-providers
$ cd $GOPATH/src/github.com/terraform-providers
$ git clone git@github.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 Resources and Data Sources is maintained as part of this repository, in the /website directory. This is published to www.terraform.io/docs/providers/ns1 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 $PATH.

To compile the provider, run make build. This will build the provider and put the provider binary in the $GOPATH/bin directory.

$ make bin
...
$ $GOPATH/bin/terraform-provider-ns1
...

In order to test the provider, you can simply run make test.

$ make test

In order to run the full suite of Acceptance tests, run make testacc.

Note: Acceptance tests create real resources, and often cost money to run.

$ make testacc

Some helpful things for debugging:

  • Set TF_LOG=DEBUG for verbose logging.
  • Additionally set NS1_DEBUG environment variable to include details of the API requests in the logs.

Contributions

Pull Requests and issues are welcome. See the NS1 Contribution Guidelines for more information.

Known Issues/Roadmap

  • 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 record data source ASAP, to cover simple read-only use cases