terraform-provider-netbox

command module
v0.1.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 7, 2021 License: MPL-2.0 Imports: 5 Imported by: 0

README

Terraform Provider for Netbox

Intended to be a bare minimum terraform provider for Netbox IPAM functionality.

Get an available IP-address from a given prefix and reserve it for your server.

Requirements

Building The Provider

  1. Clone the repository
  2. Enter the repository directory
  3. Build the provider using the make build_dev command:
$ make build_dev

Using the provider

Make sure to set the given environment variables:

NETBOX_HOST=https://netbox.example.com
NETBOX_TOKEN=fawofiawjef0230-f8jqf0a8e9j

An optional configuration for disabling TLS verification is available:

NETBOX_TLS_VERIFY=false  # defaults to true

Developing the Provider

If you wish to work on the provider, you'll first need Go installed on your machine (see Requirements above).

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

To generate or update documentation, run go generate.

In order to run the full suite of Acceptance tests, run make testacc. Note: Acceptance tests create real resources in Netbox, make sure you use a test instance.

$ make testacc

Running the provider from local dev build

  1. Build the provider
$ make build_dev
  1. Set ~/.terraformrc to:
provider_installation {
  dev_overrides {
    "academicwork/netbox" = "/home/YOUR-USERNAME/.terraform.d/plugins/academicwork/netbox/dev/YOUR-ARCHITECHTURE/" # architecture could be linux_amd64 for example
  }
  direct {}
}

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL