terraform-provider-tailscale
terraform-provider-tailscale copied to clipboard
Terraform provider for Tailscale
terraform-provider-tailscale
This repository contains the source code for the Terraform Tailscale Provider a Terraform provider implementation for interacting with the Tailscale API.
See the documentation in the Terraform registry for the most up-to-date information and latest release.
This provider is unofficial and not affiliated in any way with the team at Tailscale. I've been given thanks for creating it, but do not expect anyone who actually works at Tailscale to help you with problems regarding this provider.
Getting Started
To install this provider, copy and paste this code into your Terraform configuration. Then, run terraform init
:
terraform {
required_providers {
tailscale = {
source = "davidsbond/tailscale"
version = "0.2.0"
}
}
}
provider "tailscale" {
api_key = "my_api_key"
tailnet = "example.com"
}
In the provider
block, replace api_key
and tailnet
with your own tailnet and API key. Alternatively, use the
TAILSCALE_API_KEY
and TAILSCALE_TAILNET
environment variables.
The default api endpoint is https://api.tailscale.com
. If your coordination/control server api is at another endpoint, you can pass in base_url
in the provider block.
provider "tailscale" {
api_key = "my_api_key"
tailnet = "example.com"
base_url = "https://api.us.tailscale.com"
}
Contributing
Please review the contributing guidelines and code of conduct before contributing to this codebase. Please create a new issue for bugs and feature requests and fill in as much detail as you can.