Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
86cf2b6
Add AWS inventory with region and organization discovery
ekrichbaum Oct 24, 2026
7028c13
Enhance AWS source documentation with account_name
ekrichbaum Oct 25, 2026
561e7c5
Update AWS source tests with new assertions
ekrichbaum Oct 25, 2026
d39e605
Add account_names dictionary for account tracking
ekrichbaum Oct 25, 2026
2e34144
Add account_name option to AWS config
ekrichbaum Oct 25, 2026
f80b15c
Enhance sync_snapshot and sync_instance methods
ekrichbaum Oct 25, 2026
bebc903
Rename test for missing VRF to reflect default creation
ekrichbaum Oct 25, 2026
24b0d3d
Update VRF creation logic in connection.py
ekrichbaum Oct 25, 2026
e38f477
Update descriptions for config options in config.py
ekrichbaum Oct 25, 2026
73aa78a
Update documentation on VPC VRF handling
ekrichbaum Oct 25, 2026
b0eeb65
Enhance AWS connection handling for networks and addresses
ekrichbaum Oct 26, 2026
55a3404
Remove read_only attribute from VRF object class
ekrichbaum Oct 26, 2026
00be56e
Add tests for incomplete network discovery and organization
ekrichbaum Oct 26, 2026
6b91377
Comment out optional AWS service sync settings
ekrichbaum Oct 28, 2026
2a7a1a3
Enhance AWS source description in README
ekrichbaum Oct 28, 2026
8dd6cbb
Refactor AWS source tests for tag handling and errors
ekrichbaum Oct 28, 2026
65d6870
Add tests for AWS services integration
ekrichbaum Oct 28, 2026
e4ba004
Enhance AWS resource validation and syncing
ekrichbaum Oct 28, 2026
0ba0be7
Add sync options for S3, Lambda, and EKS
ekrichbaum Oct 28, 2026
1db80ad
Implement access denial handling in AWS client
ekrichbaum Oct 28, 2026
0f49d92
Add custom_fields to object classes
ekrichbaum Oct 28, 2026
8b5c9f9
Revise AWS source documentation for optional services
ekrichbaum Oct 28, 2026
948d170
Enhance AWS source documentation on failures and conflicts
ekrichbaum Oct 28, 2026
5e428e9
Add AWSAccessCheck dataclass and access tracking
ekrichbaum Oct 28, 2026
8dab317
Update print statement to say 'Goodbye World'
ekrichbaum Oct 28, 2026
68314b7
Refactor AWS service tests and add conflict handling
ekrichbaum Oct 28, 2026
107c1f2
bad paste correction. replacing file contents.
ekrichbaum Oct 29, 2026
12b1529
Enhance AWS connection with access and tagging methods
ekrichbaum Oct 29, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Test

on:
push:
branches: [ "main", "development" ]
branches: [ "main", "development", "AWS" ]
pull_request:
branches: [ "main", "development" ]
workflow_dispatch:
Expand Down Expand Up @@ -31,7 +31,7 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install -r requirements-aws.txt
pip install pytest

- name: Install vcsim
Expand Down
3 changes: 3 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
FROM python:3.14-slim AS builder

COPY requirements.txt .
COPY requirements-aws.txt .

ARG VENV=/opt/netbox-sync/venv
ARG INSTALL_AWS=false

# Install dependencies
RUN python3 -m venv $VENV && \
$VENV/bin/python3 -m pip install --upgrade pip && \
$VENV/bin/pip install -r requirements.txt && \
if [ "$INSTALL_AWS" = "true" ]; then $VENV/bin/pip install -r requirements-aws.txt; fi && \
$VENV/bin/pip install vmware-vcenter==9.1.1.0 && \
$VENV/bin/python3 -m pip uninstall -y pip && \
find $VENV -type d -name "__pycache__" -print0 | xargs -0 -n1 rm -rf
Expand Down
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ This is a tool to sync data from different sources to a NetBox instance.

Available source types:
* VMware vCenter Server
* AWS EC2, EBS, and network interfaces, with opt-in S3, Lambda, and EKS inventory (see [AWS source](docs/source_aws.md))
* [bb-ricardo/check_redfish](https://github.com/bb-Ricardo/check_redfish) inventory files

**IMPORTANT: READ INSTRUCTIONS CAREFULLY BEFORE RUNNING THIS PROGRAM**
Expand Down Expand Up @@ -38,6 +39,10 @@ This ensures stale objects are removed from NetBox keeping an accurate current s
* VMWare vCenter >= 6.0
#### Source: check_redfish (if used)
* check_redfish >= 1.2.0
#### Source: AWS (if used)
* Optional boto3 SDK, AWS read-only credentials, and automatic or explicit region discovery
* Optional AWS Organizations discovery with collector permissions and a trusted inventory role in each member account
* Existing VPC-specific NetBox VRFs for IP import; see [AWS setup](docs/source_aws.md)

# Installing
* here we assume we install in ```/opt```
Expand Down
763 changes: 763 additions & 0 deletions docs/source_aws.md

Large diffs are not rendered by default.

4 changes: 3 additions & 1 deletion module/config/file_output.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
from module.sources.vmware.config import VMWareConfig
from module.sources.check_redfish.config import CheckRedfishConfig
from module.sources.hetzner.config import HetznerConfig
from module.sources.aws.config import AWSConfig
from module.common.logging import get_logger
from module.config import default_config_file_path, source_config_section_name
from module.config.files import ConfigFile, ConfigFileINI, ConfigFileYAML
Expand All @@ -35,7 +36,8 @@ class ConfigFileOutput(DescriptionFormatterMixin):
source_config_list = [
VMWareConfig,
CheckRedfishConfig,
HetznerConfig
HetznerConfig,
AWSConfig
]

header = f"Welcome to the {__description__} configuration file."
Expand Down
10 changes: 7 additions & 3 deletions module/netbox/object_classes.py
Original file line number Diff line number Diff line change
Expand Up @@ -1323,6 +1323,8 @@ def __init__(self, *args, **kwargs):
NBInventoryItem.object_type,
NBPowerPort.object_type,
NBClusterGroup.object_type,
NBCluster.object_type,
NBVirtualDisk.object_type,
NBVMInterface.object_type,
NBVM.object_type,
NBModule.object_type
Expand Down Expand Up @@ -1522,7 +1524,6 @@ class NBVRF(NetBoxObject):
object_type = "ipam.vrf"
primary_key = "name"
prune = False
read_only = True

def __init__(self, *args, **kwargs):
self.data_model = {
Expand Down Expand Up @@ -1915,7 +1916,8 @@ def __init__(self, *args, **kwargs):
"scope_id": self.scopes,
# supports pre4.2.0 clusters with site
"site": NBSite,
"tags": NBTagList
"tags": NBTagList,
"custom_fields": NBCustomField
}
super().__init__(*args, **kwargs)

Expand Down Expand Up @@ -2032,6 +2034,7 @@ def __init__(self, *args, **kwargs):
"untagged_vlan": NBVLAN,
"tagged_vlans": NBVLANList,
"description": 200,
"custom_fields": NBCustomField,
"tags": NBTagList
}
super().__init__(*args, **kwargs)
Expand Down Expand Up @@ -2134,7 +2137,8 @@ def __init__(self, *args, **kwargs):
"virtual_machine": NBVM,
"description": 200,
"size": int, # in MB
"tags": NBTagList
"tags": NBTagList,
"custom_fields": NBCustomField
}
super().__init__(*args, **kwargs)

Expand Down
3 changes: 2 additions & 1 deletion module/sources/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
# define all available sources here
from module.sources.vmware.connection import VMWareHandler
from module.sources.hetzner.connection import HetznerHandler
from module.sources.aws.connection import AWSHandler
from module.sources.check_redfish.import_inventory import CheckRedfish

from module.common.logging import get_logger
Expand All @@ -19,7 +20,7 @@
from module.config import source_config_section_name

# list of valid sources
valid_sources = [VMWareHandler, CheckRedfish, HetznerHandler]
valid_sources = [VMWareHandler, CheckRedfish, HetznerHandler, AWSHandler]


def validate_source(source_class_object=None, state="pre"):
Expand Down
Loading