/terraform-provider-netbox

Terraform provider for NetBox

Primary LanguageGoMozilla Public License 2.0MPL-2.0

Terraform Provider for Netbox

Requirements

Usage

provider "netbox" {
  host  = "http://localhost:8000"
  token = "66a48ac409ec56b3f345eee3d10a42fa2fc1b8b9"
}

resource "netbox_ipam_prefix" "example" {
  prefix = "10.0.0.0/16"
  status = "reserved"
}

Contributing

To build the provider:

$ go build

To test the provider:

$ go test -v ./...

To run all acceptance tests:

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

$ TF_ACC=1 go test -v ./...

To run a subset of acceptance tests:

$ TF_ACC=1 go test -v ./... -run=TestAccIpamPrefix

The following environment variables must be set to run acceptance tests:

  • NETBOX_HOST
  • NETBOX_TOKEN