{"id":18952412,"url":"https://github.com/tailscale/terraform-provider-tailscale","last_synced_at":"2025-05-15T14:08:07.206Z","repository":{"id":37453888,"uuid":"327685695","full_name":"tailscale/terraform-provider-tailscale","owner":"tailscale","description":"Terraform provider for Tailscale","archived":false,"fork":false,"pushed_at":"2025-05-06T17:58:50.000Z","size":6840,"stargazers_count":283,"open_issues_count":28,"forks_count":47,"subscribers_count":21,"default_branch":"main","last_synced_at":"2025-05-06T18:48:55.090Z","etag":null,"topics":["tailscale","terraform-provider"],"latest_commit_sha":null,"homepage":"https://registry.terraform.io/providers/tailscale/tailscale","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tailscale.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":".github/CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2021-01-07T17:51:24.000Z","updated_at":"2025-05-05T19:39:00.000Z","dependencies_parsed_at":"2023-11-13T22:25:48.919Z","dependency_job_id":"abcc55fc-cb87-4c20-b17e-dc54b7f72718","html_url":"https://github.com/tailscale/terraform-provider-tailscale","commit_stats":{"total_commits":289,"total_committers":40,"mean_commits":7.225,"dds":0.532871972318339,"last_synced_commit":"098f8794086424dc4c295139e1454a392b23c130"},"previous_names":[],"tags_count":55,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tailscale%2Fterraform-provider-tailscale","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tailscale%2Fterraform-provider-tailscale/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tailscale%2Fterraform-provider-tailscale/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tailscale%2Fterraform-provider-tailscale/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tailscale","download_url":"https://codeload.github.com/tailscale/terraform-provider-tailscale/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254355335,"owners_count":22057354,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["tailscale","terraform-provider"],"created_at":"2024-11-08T13:33:16.593Z","updated_at":"2025-05-15T14:08:07.144Z","avatar_url":"https://github.com/tailscale.png","language":"Go","funding_links":[],"categories":["Install from Source","others","Go"],"sub_categories":["What is Tailscale?"],"readme":"# terraform-provider-tailscale\n\n[![Go Reference](https://pkg.go.dev/badge/github.com/tailscale/terraform-provider-tailscale.svg)](https://pkg.go.dev/github.com/tailscale/terraform-provider-tailscale)\n[![Go Report Card](https://goreportcard.com/badge/github.com/tailscale/terraform-provider-tailscale)](https://goreportcard.com/report/github.com/tailscale/terraform-provider-tailscale)\n![Github Actions](https://github.com/tailscale/terraform-provider-tailscale/actions/workflows/ci.yml/badge.svg?branch=main)\n\nThis repository contains the source code for the [Tailscale Terraform provider](https://registry.terraform.io/providers/tailscale/tailscale).\nThis Terraform provider lets you interact with the [Tailscale](https://tailscale.com) API.\n\nSee the [documentation](https://registry.terraform.io/providers/tailscale/tailscale/latest/docs) in the Terraform registry\nfor the most up-to-date information and latest release.\n\nThis provider is maintained by Tailscale. Thanks to everyone who contributed to the development of the Tailscale Terraform provider, and special thanks to [davidsbond](https://github.com/davidsbond).\n\n## Getting Started\n\nTo install this provider, copy and paste this code into your Terraform configuration. Then, run `terraform init`:\n\n```terraform\nterraform {\n  required_providers {\n    tailscale = {\n      source = \"tailscale/tailscale\"\n      version = \"~\u003e 0.16\" // Latest 0.16.x\n    }\n  }\n}\n\nprovider \"tailscale\" {\n  api_key = \"tskey-api-...\"\n}\n```\n\nIn the `provider` block, set your API key in the `api_key` field. Alternatively, use the `TAILSCALE_API_KEY` environment variable.\n\n### Using OAuth client\n\nInstead of using a personal API key, you can configure the provider to use an [OAuth client](https://tailscale.com/kb/1215/oauth-clients/), e.g.:\n\n```terraform\nprovider \"tailscale\" {\n  oauth_client_id = \"...\"\n  oauth_client_secret = \"tskey-client-...\"\n}\n```\n\n### API endpoint\n\nThe 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.\n\n```terraform\nprovider \"tailscale\" {\n  api_key = \"tskey-api-...\"\n  base_url = \"https://api.us.tailscale.com\"\n}\n```\n\n## Updating an existing installation\nTo update an existing terraform deployment currently using the original `davidsbond/tailscale` provider, use:\n```\nterraform state replace-provider registry.terraform.io/davidsbond/tailscale registry.terraform.io/tailscale/tailscale\n```\n\n## Contributing\n\nPlease review the [contributing guidelines](./CONTRIBUTING.md) and [code of conduct](.github/CODE_OF_CONDUCT.md) before\ncontributing to this codebase. Please create a [new issue](https://github.com/tailscale/terraform-provider-tailscale/issues/new/choose)\nfor bugs and feature requests and fill in as much detail as you can.\n\n### Local Provider Development\n\nThe [Terraform plugin documentation on debugging](https://developer.hashicorp.com/terraform/plugin/debugging)\nprovides helpful strategies for debugging while developing plugins.\n\nNamely, adding a [development override](https://developer.hashicorp.com/terraform/cli/config/config-file#development-overrides-for-provider-developers)\nfor the `tailscale/tailscale` provider allows for using your local copy of the provider instead of a published version.\n\nYour `terraformrc` should look something like the following:\n\n```hcl\nprovider_installation {\n  # This disables the version and checksum verifications for this\n  # provider and forces Terraform to look for the tailscale/tailscale\n  # provider plugin in the given directory.\n  dev_overrides {\n    \"tailscale/tailscale\" = \"/path/to/this/repo/on/disk\"\n  }\n  # For all other providers, install them directly from their origin provider\n  # registries as normal. If you omit this, Terraform will _only_ use\n  # the dev_overrides block, and so no other providers will be available.\n  direct {}\n}\n```\n\nRemember to run `make build` to build the provider and pick up your local changes.\n\n#### Acceptance Tests\n\nTests in this repo that are prefixed with `TestAcc` are acceptance tests which run against a real instance of the tailscale control plane.\nThese tests are skipped unless the `TF_ACC` environment variable is set.\nRunning `make testacc` sets the `TF_ACC` variable and runs the tests.\n\nThe `TF_ACC` environment variable is handled by [Terraform core code](https://developer.hashicorp.com/terraform/plugin/sdkv2/testing/acceptance-tests#requirements-and-recommendations)\nand is not directly referenced in provider code.\n\nThe following tailscale specific environment variables must also be set:\n- `TAILSCALE_BASE_URL`\n  - URL of the control plane\n- `TAILSCALE_API_KEY`\n  - Tests will be performed against the tailnet which the key belongs to\n- `TAILSCALE_TEST_DEVICE_NAME`\n  - The FQDN of a device owned by the owner of the API key in use\n\nIf you run a local control server with the `terraform-acceptance-testing` test scenario, then you can use the make rule `testacc_local`\nwhich will correctly populate the necessary environment variables for you.\n\n```\n./tool/go run ./cmd/tailcontrol --dev --generate-test-devices=terraform-acceptance-testing \u0026\nmake testacc_local\n```\n\n## Releasing\n\nPushing a tag of the format `vX.Y.Z` will trigger the [release workflow](./.github/workflows/release.yml) which uses [goreleaser](https://github.com/goreleaser/goreleaser) to build and sign artifacts and generate a [GitHub release](https://github.com/tailscale/terraform-provider-tailscale/releases).\n\nGitHub releases are pulled in and served by the [HashiCorp Terrafrom](https://registry.terraform.io/providers/tailscale/tailscale/latest) and [OpenTofu](https://github.com/opentofu/registry/blob/main/providers/t/tailscale/tailscale.json) registries for usage of the provider via Terraform or OpenTofu.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftailscale%2Fterraform-provider-tailscale","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftailscale%2Fterraform-provider-tailscale","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftailscale%2Fterraform-provider-tailscale/lists"}