Skip to content

heretic098/terraform-provider-tailscale

 
 

Repository files navigation

terraform-provider-tailscale

Go Reference Go Report Card Github Actions

This repository contains the source code for the Tailscale Terraform provider. This Terraform provider lets you interact with the Tailscale API.

See the documentation in the Terraform registry for the most up-to-date information and latest release.

This provider is maintained by Tailscale. Thanks to everyone who contributed to the development of the Tailscale Terraform provider, and special thanks to davidsbond.

Getting Started

To install this provider, copy and paste this code into your Terraform configuration. Then, run terraform init:

terraform {
  required_providers {
    tailscale = {
      source = "tailscale/tailscale"
      version = "0.13.6"
    }
  }
}

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"
}

Updating an existing installation

To update an existing terraform deployment currently using the original davidsbond/tailscale provider, use:

terraform state replace-provider registry.terraform.io/davidsbond/tailscale registry.terraform.io/tailscale/tailscale

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.

Releases

No releases published

Packages

No packages published

Languages

  • Go 97.2%
  • Makefile 2.8%