85 GitHub stars and counting — zerotier/terraform-provider-zerotier is a Go project TopGit is tracking across repositories on the platform. Terraform provider for controlling ZeroTier Central
Snapshot summary built from the project's own GitHub metadata — there's no written TopGit review yet. The page will update automatically when a full review is published.
WHY NO REVIEW YET
TopGit writes full reviews for the most-starred, most-requested repositories. This page is a snapshot until then — see the READ ME tab for the original README in full.
ZeroTier is a smart Ethernet switch for planet Earth.
It's a distributed network hypervisor built atop a cryptographically
secure global peer to peer network. It provides advanced network
virtualization and management capabilities on par with an enterprise
SDN switch, but across both local and wide area networks, connecting
almost any kind of app or device.
It does not distinguish between on-premise, cloud, desktop, or mobile
devices. You can even ZeroTier-enable individual programs with the SDK
socket interface.
This Terraform provider allows you to manipulate objects in the ZeroTier Central API:
Networks
ZeroTier Networks can be thought of as encrypted virtual Ethernet
switches.
resource "zerotier_network" "occams_router" {
name = "occams_router"
description = "The prefix with largest number of bits is usually correct"
assignment_pool {
start = "10.1.0.1"
end = "10.1.0.254"
}
route {
target = "10.1.0.0/24"
}
flow_rules = "accept;"
}
ZeroTier networks can also push routes to network members, if they
want to receive them.
resource "zerotier_network" "schrödingers_nat" {
name = "schrödingers_nat"
description = "A packet's destination is simultaneiously Alice and Bob until observed by a NAT table."
assignment_pool {
start = "10.2.0.1"
end = "10.2.0.254"
}
route {
target = "10.2.0.0/24"
}
route {
target = "0.0.0.0/0"
via = "10.2.0.1"
}
flow_rules = "accept;"
}
ZeroTier networks have a robust flow_rules language, allowing you do
to things like dropping select traffic, or even as advanced as
Ethernet tapping. Please refer to the ZeroTier Reference Manual for
details.
resource "zerotier_network" "silence_of_the_lan" {
name = "silence_of_the_lan"
description = "It puts the bits in the bucket. It does this whenever it is told."
assignment_pool {
start = "10.3.0.1"
end = "10.3.0.254"
}
route {
target = "10.3.0.0/24"
}
flow_rules = "drop;"
}
Pre 1.0.0 versions of this provider allowed you to specify an IPv4 CIDR
instead of a start/end range. This was removed to reflect the reality
of the current Central API. If you would like to use a CIDR, please
see the ZeroTier Network Terraform Module
on the Registry, or Github
Members
Members are associations between Nodes and Networks. These are created
when a node is authorized in the WebUI.
resource "zerotier_member" "bob" {
name = "in Bob we trust"
member_id = "1234ABCDEF"
network_id = zerotier_network.schrödingers_nat.id
}
Identities
The zerotier_identity resource is the odd-ball of the bunch. You
cannot create an Identity in the API. A ZeroTier identity is the
cryptographic identity of a ZeroTier node. It is more akin to a
Terraform TLS Private Key.
In "normal" ZeroTier usage, the ZeroTier Identity is created by the ZeroTier
client on first launch. When a client tries to join a ZeroTier
Network, the public half shows up in the WebUI, waiting for
Authorization from an administrator. (A "member" association in the
API).
Without a third party to certify the validity of the identity
(Certificate Authority model), the node's identity needs to be verified
out-of-band of ZeroTier. This usually means it is Trusted on First
Use. This is the same pattern as SSH keys.
With dymamic and ephemeral infrastructure, we have the usual
chicken-and-egg problem. We cannot associate a member with a network
until we know the identity.
The zerotier_identity resource lets us pre-generate an identity
for use with a zerotier_member resource, but a freshly provisioned
instance or container will not know the secret.
Therefore, the secret part of the identity will need to somehow be installed on the node by one of:
Injection via userdata / environment
Pre-baking of the secret into the booted instance or container
Mounting of the secret as a volume
In any event, usage of the zerotier_identity resource means the
secret will be stored in the Terraform State, creating a potential
security risk, and should be documented as such.
The zerotier_token resource will return a token from the Central
API. You can use this to inject a token into containers or instance
cloud-init scripts for things that also need to talk to the Central
API.
zerotier_token "foo" {
name = "foo"
}
zerotier_token "bar" {
name = "bar"
}
Putting it all together.
This example connects two docker containers with zerotier. You can then docker exec into one and ping the other over the ZeroTier network.
And everything should be cleaned up! Note that you can do more with the allocation system to better scope your IP addresses; this is just a way to show off more that you can do.
Development
Included here is a description of the Make tasks and environment variables you need to run the tests and perform builds.
make checks: runs fmt, lint, docs and test
make test
FORCE_TESTS=1: do not use test cache
QUIET_TESTS=1: do not show test log (just results)
TEST=<pattern>: run a specific test or tests that match the pattern
ZEROTIER_CENTRAL_TOKEN
set in env or write to test-token.txt at the root.
env is preferred but the token from file is just propagated to env and gitignored. No different, just easier to use.
GitHub Actions (.github/workflows/ci.yaml) runs go build ./..., go vet ./... and go test -race ./pkg/.... The acceptance tests in the repo root need ZEROTIER_CENTRAL_TOKEN and Docker, and do not run in CI.
Cleanup commands you may find useful
Sometimes tests fail and resources get left behind
docker ps -a -f name=zerotier --format {{.ID}} | xargs docker rm -f removed orphaned containers with "zerotier" in the name.
docker network prune removed orphaned networks
rm /tmp/tftest if problems downloading kreuzwerker/docker.
Delete the "hello-word" auth token from your central account.
Don't use your main central account for tests. Use an alternate. Delete it and recreate when too many networks to clean up.
Is zerotier/terraform-provider-zerotier open source?
Yes — zerotier/terraform-provider-zerotier ships under the BSD-3-Clause license, which makes its source code freely readable (and, depending on license terms, forkable and reusable). Source: github.com/zerotier/terraform-provider-zerotier.
What else is in the Developer Tools space?
zerotier/terraform-provider-zerotier is tracked by TopGit under the Developer Tools category, alongside 3 GitHub-tagged topics. Trending and Topics pages list peer repositories of comparable stars and language.
What is zerotier/terraform-provider-zerotier?
zerotier/terraform-provider-zerotier (zerotier/terraform-provider-zerotier) is a Go project on GitHub. From the project's own README: Terraform provider for controlling ZeroTier Central
What license does zerotier/terraform-provider-zerotier use?
zerotier/terraform-provider-zerotier is released under the BSD-3-Clause license. Always verify the LICENSE file directly on GitHub for the authoritative terms — license strings can be edited out of sync with a project's actual stance.
Where can I see zerotier/terraform-provider-zerotier in action?
The project maintains a homepage at https://zerotier.com. The README tab on this page also usually contains screenshots and a quickstart.
Where do I read more about zerotier/terraform-provider-zerotier?
This TopGit page is a snapshot — the READ ME tab shows the project's own README content (links stripped, images preserved). The GitHub repository at github.com/zerotier/terraform-provider-zerotier is the definitive source.
Why is zerotier/terraform-provider-zerotier categorized under Developer Tools?
TopGit places zerotier/terraform-provider-zerotier in the Developer Tools category based on its GitHub topics and description (tagged: "terraform", "zerotier", "zerotier-one"). Categories are assigned from real repository metadata, not editorial guesswork.
Read full README in the tab above.
Still deciding about terraform-provider-zerotier?
One click hands the question to an AI along with this page — see what it says about terraform-provider-zerotier.