A Python tool that automatically creates Twingate resources by scanning connector IP addresses in your specified network.
This tool leverages the Twingate GraphQL API to automate the creation of resources based on connector IP addresses. It scans both public and private IPs associated with connectors in your specified network and creates corresponding Twingate resources with standardized naming conventions.
This is a work from a YouTube tutorial by NetworkChuck, and here is the YouTube Video
- Automatically discovers and creates resources for:
- Public IP addresses of connectors
- Private IP addresses of connectors
- Standardized naming convention:
- Public IPs:
Resource-Public-{IP}
(dots replaced with dashes) - Private IPs:
Resource-Private-{IP}
(dots replaced with dashes)
- Public IPs:
- Comprehensive error handling and logging
- Uses GraphQL for efficient API interactions
- Configuration via environment variables
- Clone the repository
- Create a
.env
file with the required variables using the.example.env
file as a reference - Install the required dependencies using
poetry install
- Run the script using
poetry run python3 main.py
- This script is designed to work with Twingate's GraphQL API. Ensure your API key has the necessary permissions to create resources.
- The script will log all actions and errors to the console.
- The script will create resources in the network specified in the
.env
file. - The script will create resources for both public and private IPs associated with connectors in the specified network.
- The script will use the Twingate API to create resources.
- The script will create resources for all connectors in the specified network.
- NetworkChuck for the tutorial
- Twingate for the API