Skip to content

devops-workflow/terraform-google-tailscale-subnet-relay

 
 

Repository files navigation

terraform-google-tailscale-subnet-relay

Releases

Terraform Module Registry

Terraform module to manage a Tailscale subnet relay instance on GCP

Features

  • generates auth key for device login
  • manages a GCP instance runnng tailscale

Usage

module "tailscale-subnet-relay" {
  source  = "notablehealth/tailscale-subnet-relay/google"
  # Recommend pinning every module to a specific version
  # version = "x.x.x"

}

Set Tailscale provider authorization via environment variables

  • TAILSCALE_API_KEY
  • TAILSCALE_TAILNET

Requirements

Name Version
terraform >= 1.4.6
google ~> 4.68
tailscale ~> 0.13.7

Providers

Name Version
google 4.68.0
tailscale 0.13.7

Modules

No modules.

Resources

Name Type
google_compute_instance.tailscale resource
tailscale_tailnet_key.self resource

Inputs

Name Description Type Default Required
boot_image GCP instance boot image string "ubuntu-os-cloud/ubuntu-2204-lts" no
enable_display Enable display for debugging bool false no
instance_description DCP instance description string "Tailscale subnet relay" no
instance_labels Label key/pairs to assign to instance map(any) {} no
instance_tags List of tags to assign to instance list(string) [] no
machine_type GCP instance machine type string "n1-standard-1" no
name GCP instance name string "tailscale" no
project GCP project ID string n/a yes
subnetwork_cidr_ip_blocks List of subnet cidrs to route (, separated) string "" no
tailscale_key_expiry Expiration of Tailscale authentication key in seconds number 3600 no
tailscale_repo_key Tailscale package repository GPG key string "https://pkgs.tailscale.com/stable/ubuntu/jammy.noarmor.gpg " no
tailscale_repo_list Tailscale package repository list string "https://pkgs.tailscale.com/stable/ubuntu/jammy.tailscale-keyring.list" no
tailscale_tags List of Tailscale tags set(string) [] no
vpc_network_name VPC network name where tailscale instance will be placed string n/a yes
vpc_subnetwork_name VPC subnet name where tailscale instance will be placed string n/a yes
zone GCP zone where tailscale instance will be placed string n/a yes

Outputs

Name Description
id Identifier for the instance with format projects/{{project}}/zones/{{zone}}/instances/{{name}}
instance_id Server-assigned unique identifier of instance
instance_name The name of the instance
network_ip The private IPv4 address assigned to the instance
self_link URI of the instance

About

Terrafom module to manage a Tailscale subnet relay instance

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • HCL 86.6%
  • Shell 13.4%