Skip to content

Commit a104e84

Browse files
authored
Merge branch 'e-breuninger:master' into master
2 parents 75c0e74 + 9560200 commit a104e84

51 files changed

Lines changed: 1672 additions & 247 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/ci-testing.yml

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -34,18 +34,15 @@ jobs:
3434
fail-fast: false
3535
matrix:
3636
netbox-version:
37-
- v4.1.0
38-
- v4.1.1
39-
- v4.1.2
40-
- v4.1.3
41-
- v4.1.4
42-
- v4.1.5
43-
- v4.1.6
44-
- v4.1.7
45-
- v4.1.8
46-
# - v4.1.9 has a regression - do not use
47-
- v4.1.10
48-
- v4.1.11
37+
# - v4.2.1 has a bug where mac addresses cannot be assigned
38+
- v4.2.2
39+
- v4.2.3
40+
- v4.2.4
41+
- v4.2.5
42+
- v4.2.6
43+
- v4.2.7
44+
- v4.2.8
45+
- v4.2.9
4946
steps:
5047
- uses: actions/checkout@v4
5148
- name: Set up Go

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
- name: Set up Go
2727
uses: actions/setup-go@v5
2828
with:
29-
go-version: 1.23
29+
go-version-file: go.mod
3030
- name: Import GPG key
3131
id: import_gpg
3232
uses: crazy-max/ghaction-import-gpg@v6.3.0

CHANGELOG.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,32 @@
1+
## 4.0.0 (June 12th, 2025)
2+
3+
**BREAKING CHANGES**
4+
5+
NetBox 4.2 came with some breaking changes and these are reflected in the provider.
6+
7+
* resource/netbox_device_interface: Make `mac_address` attribute read-only
8+
* resource/netbox_device_interface: Add read-only `mac_addresses` attribute
9+
10+
ENHANCEMENTS
11+
12+
provider: Now supports NetBox 4.2.x
13+
* **New Resource:** `netbox_mac_address`
14+
* resource/netbox_cluster: Add `location_id`, `site_group_id`, `region_id`, `scope_id` and `scope_type` attributes
15+
* resource/netbox_prefix: Add `location_id`, `site_group_id` and `region_id` attributes
16+
* resource/netbox_device_interface: Allow `q-in-q` value in `mode` attribute
17+
* resource/netbox_circuit_termination: Add `location_id`, `site_group_id`, `region_id`, `site_id` and `provider_network_id` attributes
18+
19+
BUG FIXES
20+
21+
* resource/netbox_location: Mark `site_id` as required
22+
23+
## 3.11.1 (June 12th, 2025)
24+
25+
ENHANCEMENTS
26+
27+
* **New Data Source:** `netbox_device_power_ports` ([#721](https://github.com/e-breuninger/terraform-provider-netbox/pull/721) by [@mraerino](https://github.com/mraerino))
28+
* **New Resource:** `netbox_available_vlan` ([#717](https://github.com/e-breuninger/terraform-provider-netbox/pull/717) by [@MacherelR](https://github.com/MacherelR))
29+
130
## 3.11.0 (May 27th, 2025)
231

332
* provider: Add `default_tags` attribute ([#711](https://github.com/e-breuninger/terraform-provider-netbox/pull/711) by [@mraerino](https://github.com/mraerino))

GNUmakefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
TEST?=netbox/*.go
2-
TEST_FUNC?=TestAccNetboxVirtualMachine*
2+
TEST_FUNC?=TestAccNetboxMACAddr*
33
GOFMT_FILES?=$$(find . -name '*.go' | grep -v vendor)
44
DOCKER_COMPOSE=docker compose
55

6-
export NETBOX_VERSION=v4.1.11
6+
export NETBOX_VERSION=v4.2.2
77
export NETBOX_SERVER_URL=http://localhost:8001
88
export NETBOX_API_TOKEN=0123456789abcdef0123456789abcdef01234567
99
export NETBOX_TOKEN=$(NETBOX_API_TOKEN)

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
11
# terraform-provider-netbox
22

3-
The Terraform Netbox provider is a plugin for Terraform that allows for the full lifecycle management of [Netbox](https://netbox.readthedocs.io/en/stable/) resources.
3+
The Terraform Netbox provider is a plugin for Terraform that allows for the full lifecycle management of [Netbox](https://netboxlabs.com/docs/netbox/) resources.
44
This provider is maintained by E. Breuninger.
55

66
See: [Official documentation](https://registry.terraform.io/providers/e-breuninger/netbox/latest/docs) in the Terraform registry.
77

88
## Requirements
99

1010
- [Terraform](https://www.terraform.io/downloads.html) >= 0.12.x
11-
- [Go](https://golang.org/doc/install) >= 1.14
1211

1312
## Supported netbox versions
1413

@@ -18,7 +17,8 @@ Since version [1.6.6](https://github.com/e-breuninger/terraform-provider-netbox/
1817

1918
| Netbox version | Provider version |
2019
| --------------- | ---------------- |
21-
| v4.1.0 - 4.1.11 | v3.10.0 and up |
20+
| v4.2.2 - 4.2.9 | v4.0.0 and up |
21+
| v4.1.0 - 4.1.11 | v3.10.0 - 3.11.1 |
2222
| v4.0.0 - 4.0.11 | v3.9.0 - 3.9.2 |
2323
| v3.7.0 - 3.7.8 | v3.8.0 - 3.8.9 |
2424
| v3.6.0 - 3.6.9 | v3.7.0 - 3.7.7 |
@@ -70,7 +70,7 @@ For a more examples, see the [provider documentation](https://registry.terraform
7070

7171
## Developing the Provider
7272

73-
If you wish to work on the provider, you need [Go](http://www.golang.org) installed on your machine (see [Requirements](#requirements) above).
73+
If you wish to work on the provider, you need [Go](http://www.golang.org) installed on your machine.
7474

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

docker/docker-compose.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
services:
33
postgres:
4-
image: postgres:12-alpine
4+
image: postgres:14-alpine
55
environment:
66
- POSTGRES_USER=netbox
77
- POSTGRES_PASSWORD=netbox
@@ -34,6 +34,7 @@ services:
3434
- SUPERUSER_EMAIL=admin@example.com
3535
- SUPERUSER_PASSWORD=admin
3636
- SUPERUSER_API_TOKEN=${NETBOX_API_TOKEN}
37+
- METRICS_ENABLED=true
3738
healthcheck:
3839
test: ["CMD", "curl", "-f", "http://localhost:8080/metrics"]
3940
interval: 10s

docs/data-sources/cluster.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,11 @@ data "netbox_cluster" "vmw_cluster_01" {
3535
- `comments` (String)
3636
- `custom_fields` (Map of String)
3737
- `description` (String)
38+
- `location_id` (Number)
39+
- `region_id` (Number)
40+
- `scope_id` (Number)
41+
- `scope_type` (String)
42+
- `site_group_id` (Number)
3843
- `tags` (Set of String)
3944

4045

docs/data-sources/device_interfaces.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,13 +45,24 @@ Read-Only:
4545
- `enabled` (Boolean)
4646
- `id` (Number)
4747
- `mac_address` (String)
48+
- `mac_addresses` (Set of Object) (see [below for nested schema](#nestedobjatt--interfaces--mac_addresses))
4849
- `mode` (Map of String)
4950
- `mtu` (Number)
5051
- `name` (String)
5152
- `tag_ids` (List of Number)
5253
- `tagged_vlans` (List of Object) (see [below for nested schema](#nestedobjatt--interfaces--tagged_vlans))
5354
- `untagged_vlan` (List of Object) (see [below for nested schema](#nestedobjatt--interfaces--untagged_vlan))
5455

56+
<a id="nestedobjatt--interfaces--mac_addresses"></a>
57+
### Nested Schema for `interfaces.mac_addresses`
58+
59+
Read-Only:
60+
61+
- `description` (String)
62+
- `id` (Number)
63+
- `mac_address` (String)
64+
65+
5566
<a id="nestedobjatt--interfaces--tagged_vlans"></a>
5667
### Nested Schema for `interfaces.tagged_vlans`
5768

docs/data-sources/prefix.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,9 @@ for more information on available lookup expressions.
3737
### Read-Only
3838

3939
- `id` (Number) The ID of this resource.
40+
- `location_id` (Number)
41+
- `region_id` (Number)
42+
- `site_group_id` (Number)
4043
- `tags` (Set of String)
4144

4245

docs/data-sources/prefixes.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,10 @@ Read-Only:
4141

4242
- `description` (String)
4343
- `id` (Number)
44+
- `location_id` (Number)
4445
- `prefix` (String)
46+
- `region_id` (Number)
47+
- `site_group_id` (Number)
4548
- `site_id` (Number)
4649
- `status` (String)
4750
- `tags` (Set of String)

0 commit comments

Comments
 (0)