Skip to content

dhoppeIT/terraform-twingate-resource

Repository files navigation

terraform-twingate-resource

Terraform module to manage the following Twingate resources:

  • twingate_resource

Usage

Copy and paste the following code snippet to your Terraform configuration, specify the required variables and run the command terraform init.

module "twingate_remote_network" {
  source  = "gitlab.com/terraform-child-modules-48151/terraform-twingate-remote-network/local"
  version = "1.0.0"

  name = "example-network"

  location = "ON_PREMISE"
}

module "twingate_resource" {
  source  = "gitlab.com/terraform-child-modules-48151/terraform-twingate-resource/local"
  version = "1.0.0"

  name              = "example-resource"
  address           = "example.com"
  remote_network_id = module.twingate_remote_network.id
}

Requirements

Name Version
terraform >= 1.0
twingate ~> 3.0

Providers

Name Version
twingate ~> 3.0

Modules

No modules.

Resources

Name Type
twingate_resource.this resource
twingate_security_policy.this data source

Inputs

Name Description Type Default Required
access_group Restrict access to certain group map(any) {} no
access_service Restrict access to certain service account map(any) {} no
address The Resource's IP/CIDR or FQDN/DNS zone string n/a yes
alias Set a DNS alias address for the Resource string null no
is_active Set the resource as active or inactive bool true no
is_authoritative Determines whether assignments in the access block will override any existing assignments bool true no
is_browser_shortcut_enabled Controls whether an 'Open in Browser' shortcut will be shown for this Resource in the Twingate Client bool false no
is_visible Controls whether this Resource will be visible in the main Resource list in the Twingate Client bool true no
name The name of the Resource string n/a yes
protocols Restrict access to certain protocols and ports object( { allow_icmp = optional(bool) tcp = optional(object( { policy = optional(string) ports = optional(list(string)) } )) udp = optional(object( { policy = optional(string) ports = optional(list(string)) } )) } ) {} no
remote_network_id Remote Network ID where the Resource lives string n/a yes
security_policy_id The ID of a twingate_security_policy to set as this Resource's Security Policy string "Default Policy" no

Outputs

Name Description
id Autogenerated ID of the Resource, encoded in base64

Authors

Created and maintained by Dennis Hoppe.

License

Apache 2 licensed. See LICENSE for full details.