published on Monday, Apr 13, 2026 by Twingate
published on Monday, Apr 13, 2026 by Twingate
Kubernetes Resources are Twingate resources accessed via a Gateway.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as std from "@pulumi/std";
import * as twingate from "@twingate/pulumi-twingate";
const prod = new twingate.TwingateRemoteNetwork("prod", {name: "Production Network"});
const tls = new twingate.TwingateX509CertificateAuthority("tls", {
name: "My TLS CA",
certificate: std.file({
input: "ca.pem",
}).then(invoke => invoke.result),
});
const main = new twingate.TwingateGateway("main", {
remoteNetworkId: prod.id,
address: "10.0.0.1:8443",
x509CaId: tls.id,
});
// Kubernetes resource accessed via in-cluster DNS
const prodCluster = new twingate.TwingateKubernetesResource("prod_cluster", {
name: "Production K8s",
gatewayId: main.id,
remoteNetworkId: prod.id,
});
// Kubernetes resource accessed via external address
const externalCluster = new twingate.TwingateKubernetesResource("external_cluster", {
name: "External K8s",
address: "k8s-api.example.com",
gatewayId: main.id,
remoteNetworkId: prod.id,
});
import pulumi
import pulumi_std as std
import pulumi_twingate as twingate
prod = twingate.TwingateRemoteNetwork("prod", name="Production Network")
tls = twingate.TwingateX509CertificateAuthority("tls",
name="My TLS CA",
certificate=std.file(input="ca.pem").result)
main = twingate.TwingateGateway("main",
remote_network_id=prod.id,
address="10.0.0.1:8443",
x509_ca_id=tls.id)
# Kubernetes resource accessed via in-cluster DNS
prod_cluster = twingate.TwingateKubernetesResource("prod_cluster",
name="Production K8s",
gateway_id=main.id,
remote_network_id=prod.id)
# Kubernetes resource accessed via external address
external_cluster = twingate.TwingateKubernetesResource("external_cluster",
name="External K8s",
address="k8s-api.example.com",
gateway_id=main.id,
remote_network_id=prod.id)
package main
import (
"github.com/Twingate/pulumi-twingate/sdk/v4/go/twingate"
"github.com/pulumi/pulumi-std/sdk/v2/go/std"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
prod, err := twingate.NewTwingateRemoteNetwork(ctx, "prod", &twingate.TwingateRemoteNetworkArgs{
Name: pulumi.String("Production Network"),
})
if err != nil {
return err
}
invokeFile, err := std.File(ctx, &std.FileArgs{
Input: "ca.pem",
}, nil)
if err != nil {
return err
}
tls, err := twingate.NewTwingateX509CertificateAuthority(ctx, "tls", &twingate.TwingateX509CertificateAuthorityArgs{
Name: pulumi.String("My TLS CA"),
Certificate: pulumi.String(invokeFile.Result),
})
if err != nil {
return err
}
main, err := twingate.NewTwingateGateway(ctx, "main", &twingate.TwingateGatewayArgs{
RemoteNetworkId: prod.ID(),
Address: pulumi.String("10.0.0.1:8443"),
X509CaId: tls.ID(),
})
if err != nil {
return err
}
// Kubernetes resource accessed via in-cluster DNS
_, err = twingate.NewTwingateKubernetesResource(ctx, "prod_cluster", &twingate.TwingateKubernetesResourceArgs{
Name: pulumi.String("Production K8s"),
GatewayId: main.ID(),
RemoteNetworkId: prod.ID(),
})
if err != nil {
return err
}
// Kubernetes resource accessed via external address
_, err = twingate.NewTwingateKubernetesResource(ctx, "external_cluster", &twingate.TwingateKubernetesResourceArgs{
Name: pulumi.String("External K8s"),
Address: pulumi.String("k8s-api.example.com"),
GatewayId: main.ID(),
RemoteNetworkId: prod.ID(),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Std = Pulumi.Std;
using Twingate = Twingate.Twingate;
return await Deployment.RunAsync(() =>
{
var prod = new Twingate.TwingateRemoteNetwork("prod", new()
{
Name = "Production Network",
});
var tls = new Twingate.TwingateX509CertificateAuthority("tls", new()
{
Name = "My TLS CA",
Certificate = Std.File.Invoke(new()
{
Input = "ca.pem",
}).Apply(invoke => invoke.Result),
});
var main = new Twingate.TwingateGateway("main", new()
{
RemoteNetworkId = prod.Id,
Address = "10.0.0.1:8443",
X509CaId = tls.Id,
});
// Kubernetes resource accessed via in-cluster DNS
var prodCluster = new Twingate.TwingateKubernetesResource("prod_cluster", new()
{
Name = "Production K8s",
GatewayId = main.Id,
RemoteNetworkId = prod.Id,
});
// Kubernetes resource accessed via external address
var externalCluster = new Twingate.TwingateKubernetesResource("external_cluster", new()
{
Name = "External K8s",
Address = "k8s-api.example.com",
GatewayId = main.Id,
RemoteNetworkId = prod.Id,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.twingate.TwingateRemoteNetwork;
import com.pulumi.twingate.TwingateRemoteNetworkArgs;
import com.pulumi.twingate.TwingateX509CertificateAuthority;
import com.pulumi.twingate.TwingateX509CertificateAuthorityArgs;
import com.pulumi.std.StdFunctions;
import com.pulumi.std.inputs.FileArgs;
import com.pulumi.twingate.TwingateGateway;
import com.pulumi.twingate.TwingateGatewayArgs;
import com.pulumi.twingate.TwingateKubernetesResource;
import com.pulumi.twingate.TwingateKubernetesResourceArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var prod = new TwingateRemoteNetwork("prod", TwingateRemoteNetworkArgs.builder()
.name("Production Network")
.build());
var tls = new TwingateX509CertificateAuthority("tls", TwingateX509CertificateAuthorityArgs.builder()
.name("My TLS CA")
.certificate(StdFunctions.file(FileArgs.builder()
.input("ca.pem")
.build()).result())
.build());
var main = new TwingateGateway("main", TwingateGatewayArgs.builder()
.remoteNetworkId(prod.id())
.address("10.0.0.1:8443")
.x509CaId(tls.id())
.build());
// Kubernetes resource accessed via in-cluster DNS
var prodCluster = new TwingateKubernetesResource("prodCluster", TwingateKubernetesResourceArgs.builder()
.name("Production K8s")
.gatewayId(main.id())
.remoteNetworkId(prod.id())
.build());
// Kubernetes resource accessed via external address
var externalCluster = new TwingateKubernetesResource("externalCluster", TwingateKubernetesResourceArgs.builder()
.name("External K8s")
.address("k8s-api.example.com")
.gatewayId(main.id())
.remoteNetworkId(prod.id())
.build());
}
}
resources:
prod:
type: twingate:TwingateRemoteNetwork
properties:
name: Production Network
tls:
type: twingate:TwingateX509CertificateAuthority
properties:
name: My TLS CA
certificate:
fn::invoke:
function: std:file
arguments:
input: ca.pem
return: result
main:
type: twingate:TwingateGateway
properties:
remoteNetworkId: ${prod.id}
address: 10.0.0.1:8443
x509CaId: ${tls.id}
# Kubernetes resource accessed via in-cluster DNS
prodCluster:
type: twingate:TwingateKubernetesResource
name: prod_cluster
properties:
name: Production K8s
gatewayId: ${main.id}
remoteNetworkId: ${prod.id}
# Kubernetes resource accessed via external address
externalCluster:
type: twingate:TwingateKubernetesResource
name: external_cluster
properties:
name: External K8s
address: k8s-api.example.com
gatewayId: ${main.id}
remoteNetworkId: ${prod.id}
Create TwingateKubernetesResource Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new TwingateKubernetesResource(name: string, args: TwingateKubernetesResourceArgs, opts?: CustomResourceOptions);@overload
def TwingateKubernetesResource(resource_name: str,
args: TwingateKubernetesResourceArgs,
opts: Optional[ResourceOptions] = None)
@overload
def TwingateKubernetesResource(resource_name: str,
opts: Optional[ResourceOptions] = None,
gateway_id: Optional[str] = None,
remote_network_id: Optional[str] = None,
alias: Optional[str] = None,
access_groups: Optional[Sequence[TwingateKubernetesResourceAccessGroupArgs]] = None,
bearer_token_file: Optional[str] = None,
ca_file: Optional[str] = None,
address: Optional[str] = None,
in_cluster: Optional[bool] = None,
is_visible: Optional[bool] = None,
name: Optional[str] = None,
protocols: Optional[TwingateKubernetesResourceProtocolsArgs] = None,
access_policies: Optional[Sequence[TwingateKubernetesResourceAccessPolicyArgs]] = None,
security_policy_id: Optional[str] = None,
tags: Optional[Mapping[str, str]] = None)func NewTwingateKubernetesResource(ctx *Context, name string, args TwingateKubernetesResourceArgs, opts ...ResourceOption) (*TwingateKubernetesResource, error)public TwingateKubernetesResource(string name, TwingateKubernetesResourceArgs args, CustomResourceOptions? opts = null)
public TwingateKubernetesResource(String name, TwingateKubernetesResourceArgs args)
public TwingateKubernetesResource(String name, TwingateKubernetesResourceArgs args, CustomResourceOptions options)
type: twingate:TwingateKubernetesResource
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args TwingateKubernetesResourceArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args TwingateKubernetesResourceArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args TwingateKubernetesResourceArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args TwingateKubernetesResourceArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args TwingateKubernetesResourceArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var twingateKubernetesResourceResource = new Twingate.TwingateKubernetesResource("twingateKubernetesResourceResource", new()
{
GatewayId = "string",
RemoteNetworkId = "string",
Alias = "string",
AccessGroups = new[]
{
new Twingate.Inputs.TwingateKubernetesResourceAccessGroupArgs
{
AccessPolicies = new[]
{
new Twingate.Inputs.TwingateKubernetesResourceAccessGroupAccessPolicyArgs
{
ApprovalMode = "string",
Duration = "string",
Mode = "string",
},
},
GroupId = "string",
SecurityPolicyId = "string",
},
},
BearerTokenFile = "string",
CaFile = "string",
Address = "string",
InCluster = false,
IsVisible = false,
Name = "string",
Protocols = new Twingate.Inputs.TwingateKubernetesResourceProtocolsArgs
{
AllowIcmp = false,
Tcp = new Twingate.Inputs.TwingateKubernetesResourceProtocolsTcpArgs
{
Policy = "string",
Ports = new[]
{
"string",
},
},
Udp = new Twingate.Inputs.TwingateKubernetesResourceProtocolsUdpArgs
{
Policy = "string",
Ports = new[]
{
"string",
},
},
},
AccessPolicies = new[]
{
new Twingate.Inputs.TwingateKubernetesResourceAccessPolicyArgs
{
ApprovalMode = "string",
Duration = "string",
Mode = "string",
},
},
SecurityPolicyId = "string",
Tags =
{
{ "string", "string" },
},
});
example, err := twingate.NewTwingateKubernetesResource(ctx, "twingateKubernetesResourceResource", &twingate.TwingateKubernetesResourceArgs{
GatewayId: pulumi.String("string"),
RemoteNetworkId: pulumi.String("string"),
Alias: pulumi.String("string"),
AccessGroups: twingate.TwingateKubernetesResourceAccessGroupArray{
&twingate.TwingateKubernetesResourceAccessGroupArgs{
AccessPolicies: twingate.TwingateKubernetesResourceAccessGroupAccessPolicyArray{
&twingate.TwingateKubernetesResourceAccessGroupAccessPolicyArgs{
ApprovalMode: pulumi.String("string"),
Duration: pulumi.String("string"),
Mode: pulumi.String("string"),
},
},
GroupId: pulumi.String("string"),
SecurityPolicyId: pulumi.String("string"),
},
},
BearerTokenFile: pulumi.String("string"),
CaFile: pulumi.String("string"),
Address: pulumi.String("string"),
InCluster: pulumi.Bool(false),
IsVisible: pulumi.Bool(false),
Name: pulumi.String("string"),
Protocols: &twingate.TwingateKubernetesResourceProtocolsArgs{
AllowIcmp: pulumi.Bool(false),
Tcp: &twingate.TwingateKubernetesResourceProtocolsTcpArgs{
Policy: pulumi.String("string"),
Ports: pulumi.StringArray{
pulumi.String("string"),
},
},
Udp: &twingate.TwingateKubernetesResourceProtocolsUdpArgs{
Policy: pulumi.String("string"),
Ports: pulumi.StringArray{
pulumi.String("string"),
},
},
},
AccessPolicies: twingate.TwingateKubernetesResourceAccessPolicyArray{
&twingate.TwingateKubernetesResourceAccessPolicyArgs{
ApprovalMode: pulumi.String("string"),
Duration: pulumi.String("string"),
Mode: pulumi.String("string"),
},
},
SecurityPolicyId: pulumi.String("string"),
Tags: pulumi.StringMap{
"string": pulumi.String("string"),
},
})
var twingateKubernetesResourceResource = new TwingateKubernetesResource("twingateKubernetesResourceResource", TwingateKubernetesResourceArgs.builder()
.gatewayId("string")
.remoteNetworkId("string")
.alias("string")
.accessGroups(TwingateKubernetesResourceAccessGroupArgs.builder()
.accessPolicies(TwingateKubernetesResourceAccessGroupAccessPolicyArgs.builder()
.approvalMode("string")
.duration("string")
.mode("string")
.build())
.groupId("string")
.securityPolicyId("string")
.build())
.bearerTokenFile("string")
.caFile("string")
.address("string")
.inCluster(false)
.isVisible(false)
.name("string")
.protocols(TwingateKubernetesResourceProtocolsArgs.builder()
.allowIcmp(false)
.tcp(TwingateKubernetesResourceProtocolsTcpArgs.builder()
.policy("string")
.ports("string")
.build())
.udp(TwingateKubernetesResourceProtocolsUdpArgs.builder()
.policy("string")
.ports("string")
.build())
.build())
.accessPolicies(TwingateKubernetesResourceAccessPolicyArgs.builder()
.approvalMode("string")
.duration("string")
.mode("string")
.build())
.securityPolicyId("string")
.tags(Map.of("string", "string"))
.build());
twingate_kubernetes_resource_resource = twingate.TwingateKubernetesResource("twingateKubernetesResourceResource",
gateway_id="string",
remote_network_id="string",
alias="string",
access_groups=[{
"access_policies": [{
"approval_mode": "string",
"duration": "string",
"mode": "string",
}],
"group_id": "string",
"security_policy_id": "string",
}],
bearer_token_file="string",
ca_file="string",
address="string",
in_cluster=False,
is_visible=False,
name="string",
protocols={
"allow_icmp": False,
"tcp": {
"policy": "string",
"ports": ["string"],
},
"udp": {
"policy": "string",
"ports": ["string"],
},
},
access_policies=[{
"approval_mode": "string",
"duration": "string",
"mode": "string",
}],
security_policy_id="string",
tags={
"string": "string",
})
const twingateKubernetesResourceResource = new twingate.TwingateKubernetesResource("twingateKubernetesResourceResource", {
gatewayId: "string",
remoteNetworkId: "string",
alias: "string",
accessGroups: [{
accessPolicies: [{
approvalMode: "string",
duration: "string",
mode: "string",
}],
groupId: "string",
securityPolicyId: "string",
}],
bearerTokenFile: "string",
caFile: "string",
address: "string",
inCluster: false,
isVisible: false,
name: "string",
protocols: {
allowIcmp: false,
tcp: {
policy: "string",
ports: ["string"],
},
udp: {
policy: "string",
ports: ["string"],
},
},
accessPolicies: [{
approvalMode: "string",
duration: "string",
mode: "string",
}],
securityPolicyId: "string",
tags: {
string: "string",
},
});
type: twingate:TwingateKubernetesResource
properties:
accessGroups:
- accessPolicies:
- approvalMode: string
duration: string
mode: string
groupId: string
securityPolicyId: string
accessPolicies:
- approvalMode: string
duration: string
mode: string
address: string
alias: string
bearerTokenFile: string
caFile: string
gatewayId: string
inCluster: false
isVisible: false
name: string
protocols:
allowIcmp: false
tcp:
policy: string
ports:
- string
udp:
policy: string
ports:
- string
remoteNetworkId: string
securityPolicyId: string
tags:
string: string
TwingateKubernetesResource Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The TwingateKubernetesResource resource accepts the following input properties:
- Gateway
Id string - The ID of the Gateway used to access this Kubernetes Resource.
- Remote
Network stringId - The ID of the Remote Network the Kubernetes Resource belongs to.
- Access
Groups List<Twingate.Twingate. Inputs. Twingate Kubernetes Resource Access Group> - Restrict access to certain group
- Access
Policies List<Twingate.Twingate. Inputs. Twingate Kubernetes Resource Access Policy> - Restrict access according to JIT access policy
- Address string
- The address of the Kubernetes Resource (IP or FQDN).
- Alias string
- Set a DNS alias address for the Resource. Must be a DNS-valid name string.
- Bearer
Token stringFile - Path to bearer token file.
- Ca
File string - Path to CA certificate file.
- In
Cluster bool - Whether the Gateway is running inside the same Kubernetes cluster that is represented by the Kubernetes Resource. Default is
true. - Is
Visible bool - Controls whether this Resource will be visible in the main Resource list in the Twingate Client. Default is
true. - Name string
- The name of the Kubernetes Resource.
- Protocols
Twingate.
Twingate. Inputs. Twingate Kubernetes Resource Protocols - Restrict access to certain protocols and ports. By default or when this argument is not defined, there is no restriction, and all protocols and ports are allowed.
- Security
Policy stringId - The ID of a
twingate.getTwingateSecurityPolicyto set as this Resource's Security Policy. Default is 'Null' which points toDefault Policyon Admin console. - Dictionary<string, string>
- A map of key-value pair tags to set on this resource.
- Gateway
Id string - The ID of the Gateway used to access this Kubernetes Resource.
- Remote
Network stringId - The ID of the Remote Network the Kubernetes Resource belongs to.
- Access
Groups []TwingateKubernetes Resource Access Group Args - Restrict access to certain group
- Access
Policies []TwingateKubernetes Resource Access Policy Args - Restrict access according to JIT access policy
- Address string
- The address of the Kubernetes Resource (IP or FQDN).
- Alias string
- Set a DNS alias address for the Resource. Must be a DNS-valid name string.
- Bearer
Token stringFile - Path to bearer token file.
- Ca
File string - Path to CA certificate file.
- In
Cluster bool - Whether the Gateway is running inside the same Kubernetes cluster that is represented by the Kubernetes Resource. Default is
true. - Is
Visible bool - Controls whether this Resource will be visible in the main Resource list in the Twingate Client. Default is
true. - Name string
- The name of the Kubernetes Resource.
- Protocols
Twingate
Kubernetes Resource Protocols Args - Restrict access to certain protocols and ports. By default or when this argument is not defined, there is no restriction, and all protocols and ports are allowed.
- Security
Policy stringId - The ID of a
twingate.getTwingateSecurityPolicyto set as this Resource's Security Policy. Default is 'Null' which points toDefault Policyon Admin console. - map[string]string
- A map of key-value pair tags to set on this resource.
- gateway
Id String - The ID of the Gateway used to access this Kubernetes Resource.
- remote
Network StringId - The ID of the Remote Network the Kubernetes Resource belongs to.
- access
Groups List<TwingateKubernetes Resource Access Group> - Restrict access to certain group
- access
Policies List<TwingateKubernetes Resource Access Policy> - Restrict access according to JIT access policy
- address String
- The address of the Kubernetes Resource (IP or FQDN).
- alias String
- Set a DNS alias address for the Resource. Must be a DNS-valid name string.
- bearer
Token StringFile - Path to bearer token file.
- ca
File String - Path to CA certificate file.
- in
Cluster Boolean - Whether the Gateway is running inside the same Kubernetes cluster that is represented by the Kubernetes Resource. Default is
true. - is
Visible Boolean - Controls whether this Resource will be visible in the main Resource list in the Twingate Client. Default is
true. - name String
- The name of the Kubernetes Resource.
- protocols
Twingate
Kubernetes Resource Protocols - Restrict access to certain protocols and ports. By default or when this argument is not defined, there is no restriction, and all protocols and ports are allowed.
- security
Policy StringId - The ID of a
twingate.getTwingateSecurityPolicyto set as this Resource's Security Policy. Default is 'Null' which points toDefault Policyon Admin console. - Map<String,String>
- A map of key-value pair tags to set on this resource.
- gateway
Id string - The ID of the Gateway used to access this Kubernetes Resource.
- remote
Network stringId - The ID of the Remote Network the Kubernetes Resource belongs to.
- access
Groups TwingateKubernetes Resource Access Group[] - Restrict access to certain group
- access
Policies TwingateKubernetes Resource Access Policy[] - Restrict access according to JIT access policy
- address string
- The address of the Kubernetes Resource (IP or FQDN).
- alias string
- Set a DNS alias address for the Resource. Must be a DNS-valid name string.
- bearer
Token stringFile - Path to bearer token file.
- ca
File string - Path to CA certificate file.
- in
Cluster boolean - Whether the Gateway is running inside the same Kubernetes cluster that is represented by the Kubernetes Resource. Default is
true. - is
Visible boolean - Controls whether this Resource will be visible in the main Resource list in the Twingate Client. Default is
true. - name string
- The name of the Kubernetes Resource.
- protocols
Twingate
Kubernetes Resource Protocols - Restrict access to certain protocols and ports. By default or when this argument is not defined, there is no restriction, and all protocols and ports are allowed.
- security
Policy stringId - The ID of a
twingate.getTwingateSecurityPolicyto set as this Resource's Security Policy. Default is 'Null' which points toDefault Policyon Admin console. - {[key: string]: string}
- A map of key-value pair tags to set on this resource.
- gateway_
id str - The ID of the Gateway used to access this Kubernetes Resource.
- remote_
network_ strid - The ID of the Remote Network the Kubernetes Resource belongs to.
- access_
groups Sequence[TwingateKubernetes Resource Access Group Args] - Restrict access to certain group
- access_
policies Sequence[TwingateKubernetes Resource Access Policy Args] - Restrict access according to JIT access policy
- address str
- The address of the Kubernetes Resource (IP or FQDN).
- alias str
- Set a DNS alias address for the Resource. Must be a DNS-valid name string.
- bearer_
token_ strfile - Path to bearer token file.
- ca_
file str - Path to CA certificate file.
- in_
cluster bool - Whether the Gateway is running inside the same Kubernetes cluster that is represented by the Kubernetes Resource. Default is
true. - is_
visible bool - Controls whether this Resource will be visible in the main Resource list in the Twingate Client. Default is
true. - name str
- The name of the Kubernetes Resource.
- protocols
Twingate
Kubernetes Resource Protocols Args - Restrict access to certain protocols and ports. By default or when this argument is not defined, there is no restriction, and all protocols and ports are allowed.
- security_
policy_ strid - The ID of a
twingate.getTwingateSecurityPolicyto set as this Resource's Security Policy. Default is 'Null' which points toDefault Policyon Admin console. - Mapping[str, str]
- A map of key-value pair tags to set on this resource.
- gateway
Id String - The ID of the Gateway used to access this Kubernetes Resource.
- remote
Network StringId - The ID of the Remote Network the Kubernetes Resource belongs to.
- access
Groups List<Property Map> - Restrict access to certain group
- access
Policies List<Property Map> - Restrict access according to JIT access policy
- address String
- The address of the Kubernetes Resource (IP or FQDN).
- alias String
- Set a DNS alias address for the Resource. Must be a DNS-valid name string.
- bearer
Token StringFile - Path to bearer token file.
- ca
File String - Path to CA certificate file.
- in
Cluster Boolean - Whether the Gateway is running inside the same Kubernetes cluster that is represented by the Kubernetes Resource. Default is
true. - is
Visible Boolean - Controls whether this Resource will be visible in the main Resource list in the Twingate Client. Default is
true. - name String
- The name of the Kubernetes Resource.
- protocols Property Map
- Restrict access to certain protocols and ports. By default or when this argument is not defined, there is no restriction, and all protocols and ports are allowed.
- security
Policy StringId - The ID of a
twingate.getTwingateSecurityPolicyto set as this Resource's Security Policy. Default is 'Null' which points toDefault Policyon Admin console. - Map<String>
- A map of key-value pair tags to set on this resource.
Outputs
All input properties are implicitly available as output properties. Additionally, the TwingateKubernetesResource resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Id string
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
- id string
- The provider-assigned unique ID for this managed resource.
- id str
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
Look up Existing TwingateKubernetesResource Resource
Get an existing TwingateKubernetesResource resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: TwingateKubernetesResourceState, opts?: CustomResourceOptions): TwingateKubernetesResource@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
access_groups: Optional[Sequence[TwingateKubernetesResourceAccessGroupArgs]] = None,
access_policies: Optional[Sequence[TwingateKubernetesResourceAccessPolicyArgs]] = None,
address: Optional[str] = None,
alias: Optional[str] = None,
bearer_token_file: Optional[str] = None,
ca_file: Optional[str] = None,
gateway_id: Optional[str] = None,
in_cluster: Optional[bool] = None,
is_visible: Optional[bool] = None,
name: Optional[str] = None,
protocols: Optional[TwingateKubernetesResourceProtocolsArgs] = None,
remote_network_id: Optional[str] = None,
security_policy_id: Optional[str] = None,
tags: Optional[Mapping[str, str]] = None) -> TwingateKubernetesResourcefunc GetTwingateKubernetesResource(ctx *Context, name string, id IDInput, state *TwingateKubernetesResourceState, opts ...ResourceOption) (*TwingateKubernetesResource, error)public static TwingateKubernetesResource Get(string name, Input<string> id, TwingateKubernetesResourceState? state, CustomResourceOptions? opts = null)public static TwingateKubernetesResource get(String name, Output<String> id, TwingateKubernetesResourceState state, CustomResourceOptions options)resources: _: type: twingate:TwingateKubernetesResource get: id: ${id}- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Access
Groups List<Twingate.Twingate. Inputs. Twingate Kubernetes Resource Access Group> - Restrict access to certain group
- Access
Policies List<Twingate.Twingate. Inputs. Twingate Kubernetes Resource Access Policy> - Restrict access according to JIT access policy
- Address string
- The address of the Kubernetes Resource (IP or FQDN).
- Alias string
- Set a DNS alias address for the Resource. Must be a DNS-valid name string.
- Bearer
Token stringFile - Path to bearer token file.
- Ca
File string - Path to CA certificate file.
- Gateway
Id string - The ID of the Gateway used to access this Kubernetes Resource.
- In
Cluster bool - Whether the Gateway is running inside the same Kubernetes cluster that is represented by the Kubernetes Resource. Default is
true. - Is
Visible bool - Controls whether this Resource will be visible in the main Resource list in the Twingate Client. Default is
true. - Name string
- The name of the Kubernetes Resource.
- Protocols
Twingate.
Twingate. Inputs. Twingate Kubernetes Resource Protocols - Restrict access to certain protocols and ports. By default or when this argument is not defined, there is no restriction, and all protocols and ports are allowed.
- Remote
Network stringId - The ID of the Remote Network the Kubernetes Resource belongs to.
- Security
Policy stringId - The ID of a
twingate.getTwingateSecurityPolicyto set as this Resource's Security Policy. Default is 'Null' which points toDefault Policyon Admin console. - Dictionary<string, string>
- A map of key-value pair tags to set on this resource.
- Access
Groups []TwingateKubernetes Resource Access Group Args - Restrict access to certain group
- Access
Policies []TwingateKubernetes Resource Access Policy Args - Restrict access according to JIT access policy
- Address string
- The address of the Kubernetes Resource (IP or FQDN).
- Alias string
- Set a DNS alias address for the Resource. Must be a DNS-valid name string.
- Bearer
Token stringFile - Path to bearer token file.
- Ca
File string - Path to CA certificate file.
- Gateway
Id string - The ID of the Gateway used to access this Kubernetes Resource.
- In
Cluster bool - Whether the Gateway is running inside the same Kubernetes cluster that is represented by the Kubernetes Resource. Default is
true. - Is
Visible bool - Controls whether this Resource will be visible in the main Resource list in the Twingate Client. Default is
true. - Name string
- The name of the Kubernetes Resource.
- Protocols
Twingate
Kubernetes Resource Protocols Args - Restrict access to certain protocols and ports. By default or when this argument is not defined, there is no restriction, and all protocols and ports are allowed.
- Remote
Network stringId - The ID of the Remote Network the Kubernetes Resource belongs to.
- Security
Policy stringId - The ID of a
twingate.getTwingateSecurityPolicyto set as this Resource's Security Policy. Default is 'Null' which points toDefault Policyon Admin console. - map[string]string
- A map of key-value pair tags to set on this resource.
- access
Groups List<TwingateKubernetes Resource Access Group> - Restrict access to certain group
- access
Policies List<TwingateKubernetes Resource Access Policy> - Restrict access according to JIT access policy
- address String
- The address of the Kubernetes Resource (IP or FQDN).
- alias String
- Set a DNS alias address for the Resource. Must be a DNS-valid name string.
- bearer
Token StringFile - Path to bearer token file.
- ca
File String - Path to CA certificate file.
- gateway
Id String - The ID of the Gateway used to access this Kubernetes Resource.
- in
Cluster Boolean - Whether the Gateway is running inside the same Kubernetes cluster that is represented by the Kubernetes Resource. Default is
true. - is
Visible Boolean - Controls whether this Resource will be visible in the main Resource list in the Twingate Client. Default is
true. - name String
- The name of the Kubernetes Resource.
- protocols
Twingate
Kubernetes Resource Protocols - Restrict access to certain protocols and ports. By default or when this argument is not defined, there is no restriction, and all protocols and ports are allowed.
- remote
Network StringId - The ID of the Remote Network the Kubernetes Resource belongs to.
- security
Policy StringId - The ID of a
twingate.getTwingateSecurityPolicyto set as this Resource's Security Policy. Default is 'Null' which points toDefault Policyon Admin console. - Map<String,String>
- A map of key-value pair tags to set on this resource.
- access
Groups TwingateKubernetes Resource Access Group[] - Restrict access to certain group
- access
Policies TwingateKubernetes Resource Access Policy[] - Restrict access according to JIT access policy
- address string
- The address of the Kubernetes Resource (IP or FQDN).
- alias string
- Set a DNS alias address for the Resource. Must be a DNS-valid name string.
- bearer
Token stringFile - Path to bearer token file.
- ca
File string - Path to CA certificate file.
- gateway
Id string - The ID of the Gateway used to access this Kubernetes Resource.
- in
Cluster boolean - Whether the Gateway is running inside the same Kubernetes cluster that is represented by the Kubernetes Resource. Default is
true. - is
Visible boolean - Controls whether this Resource will be visible in the main Resource list in the Twingate Client. Default is
true. - name string
- The name of the Kubernetes Resource.
- protocols
Twingate
Kubernetes Resource Protocols - Restrict access to certain protocols and ports. By default or when this argument is not defined, there is no restriction, and all protocols and ports are allowed.
- remote
Network stringId - The ID of the Remote Network the Kubernetes Resource belongs to.
- security
Policy stringId - The ID of a
twingate.getTwingateSecurityPolicyto set as this Resource's Security Policy. Default is 'Null' which points toDefault Policyon Admin console. - {[key: string]: string}
- A map of key-value pair tags to set on this resource.
- access_
groups Sequence[TwingateKubernetes Resource Access Group Args] - Restrict access to certain group
- access_
policies Sequence[TwingateKubernetes Resource Access Policy Args] - Restrict access according to JIT access policy
- address str
- The address of the Kubernetes Resource (IP or FQDN).
- alias str
- Set a DNS alias address for the Resource. Must be a DNS-valid name string.
- bearer_
token_ strfile - Path to bearer token file.
- ca_
file str - Path to CA certificate file.
- gateway_
id str - The ID of the Gateway used to access this Kubernetes Resource.
- in_
cluster bool - Whether the Gateway is running inside the same Kubernetes cluster that is represented by the Kubernetes Resource. Default is
true. - is_
visible bool - Controls whether this Resource will be visible in the main Resource list in the Twingate Client. Default is
true. - name str
- The name of the Kubernetes Resource.
- protocols
Twingate
Kubernetes Resource Protocols Args - Restrict access to certain protocols and ports. By default or when this argument is not defined, there is no restriction, and all protocols and ports are allowed.
- remote_
network_ strid - The ID of the Remote Network the Kubernetes Resource belongs to.
- security_
policy_ strid - The ID of a
twingate.getTwingateSecurityPolicyto set as this Resource's Security Policy. Default is 'Null' which points toDefault Policyon Admin console. - Mapping[str, str]
- A map of key-value pair tags to set on this resource.
- access
Groups List<Property Map> - Restrict access to certain group
- access
Policies List<Property Map> - Restrict access according to JIT access policy
- address String
- The address of the Kubernetes Resource (IP or FQDN).
- alias String
- Set a DNS alias address for the Resource. Must be a DNS-valid name string.
- bearer
Token StringFile - Path to bearer token file.
- ca
File String - Path to CA certificate file.
- gateway
Id String - The ID of the Gateway used to access this Kubernetes Resource.
- in
Cluster Boolean - Whether the Gateway is running inside the same Kubernetes cluster that is represented by the Kubernetes Resource. Default is
true. - is
Visible Boolean - Controls whether this Resource will be visible in the main Resource list in the Twingate Client. Default is
true. - name String
- The name of the Kubernetes Resource.
- protocols Property Map
- Restrict access to certain protocols and ports. By default or when this argument is not defined, there is no restriction, and all protocols and ports are allowed.
- remote
Network StringId - The ID of the Remote Network the Kubernetes Resource belongs to.
- security
Policy StringId - The ID of a
twingate.getTwingateSecurityPolicyto set as this Resource's Security Policy. Default is 'Null' which points toDefault Policyon Admin console. - Map<String>
- A map of key-value pair tags to set on this resource.
Supporting Types
TwingateKubernetesResourceAccessGroup, TwingateKubernetesResourceAccessGroupArgs
- Access
Policies List<Twingate.Twingate. Inputs. Twingate Kubernetes Resource Access Group Access Policy> - Restrict access according to JIT access policy
- Group
Id string - Group ID that will have permission to access the Resource.
- Security
Policy stringId - The ID of a
twingate.getTwingateSecurityPolicyto use as the access policy for the group IDs in the access block. Default is 'Null' which points toDefault Policyon Admin console.
- Access
Policies []TwingateKubernetes Resource Access Group Access Policy - Restrict access according to JIT access policy
- Group
Id string - Group ID that will have permission to access the Resource.
- Security
Policy stringId - The ID of a
twingate.getTwingateSecurityPolicyto use as the access policy for the group IDs in the access block. Default is 'Null' which points toDefault Policyon Admin console.
- access
Policies List<TwingateKubernetes Resource Access Group Access Policy> - Restrict access according to JIT access policy
- group
Id String - Group ID that will have permission to access the Resource.
- security
Policy StringId - The ID of a
twingate.getTwingateSecurityPolicyto use as the access policy for the group IDs in the access block. Default is 'Null' which points toDefault Policyon Admin console.
- access
Policies TwingateKubernetes Resource Access Group Access Policy[] - Restrict access according to JIT access policy
- group
Id string - Group ID that will have permission to access the Resource.
- security
Policy stringId - The ID of a
twingate.getTwingateSecurityPolicyto use as the access policy for the group IDs in the access block. Default is 'Null' which points toDefault Policyon Admin console.
- access_
policies Sequence[TwingateKubernetes Resource Access Group Access Policy] - Restrict access according to JIT access policy
- group_
id str - Group ID that will have permission to access the Resource.
- security_
policy_ strid - The ID of a
twingate.getTwingateSecurityPolicyto use as the access policy for the group IDs in the access block. Default is 'Null' which points toDefault Policyon Admin console.
- access
Policies List<Property Map> - Restrict access according to JIT access policy
- group
Id String - Group ID that will have permission to access the Resource.
- security
Policy StringId - The ID of a
twingate.getTwingateSecurityPolicyto use as the access policy for the group IDs in the access block. Default is 'Null' which points toDefault Policyon Admin console.
TwingateKubernetesResourceAccessGroupAccessPolicy, TwingateKubernetesResourceAccessGroupAccessPolicyArgs
- Approval
Mode string - This will set the approval model for the policy. The valid values are
AUTOMATICandMANUAL. - Duration string
- This will set the access duration for the policy. Duration must be between 1 hour and 365 days. Examples of valid values include
1hand2d. - Mode string
- This will set the accessPolicy mode for the policy. The valid values are
MANUAL,AUTO_LOCKandACCESS_REQUEST.
- Approval
Mode string - This will set the approval model for the policy. The valid values are
AUTOMATICandMANUAL. - Duration string
- This will set the access duration for the policy. Duration must be between 1 hour and 365 days. Examples of valid values include
1hand2d. - Mode string
- This will set the accessPolicy mode for the policy. The valid values are
MANUAL,AUTO_LOCKandACCESS_REQUEST.
- approval
Mode String - This will set the approval model for the policy. The valid values are
AUTOMATICandMANUAL. - duration String
- This will set the access duration for the policy. Duration must be between 1 hour and 365 days. Examples of valid values include
1hand2d. - mode String
- This will set the accessPolicy mode for the policy. The valid values are
MANUAL,AUTO_LOCKandACCESS_REQUEST.
- approval
Mode string - This will set the approval model for the policy. The valid values are
AUTOMATICandMANUAL. - duration string
- This will set the access duration for the policy. Duration must be between 1 hour and 365 days. Examples of valid values include
1hand2d. - mode string
- This will set the accessPolicy mode for the policy. The valid values are
MANUAL,AUTO_LOCKandACCESS_REQUEST.
- approval_
mode str - This will set the approval model for the policy. The valid values are
AUTOMATICandMANUAL. - duration str
- This will set the access duration for the policy. Duration must be between 1 hour and 365 days. Examples of valid values include
1hand2d. - mode str
- This will set the accessPolicy mode for the policy. The valid values are
MANUAL,AUTO_LOCKandACCESS_REQUEST.
- approval
Mode String - This will set the approval model for the policy. The valid values are
AUTOMATICandMANUAL. - duration String
- This will set the access duration for the policy. Duration must be between 1 hour and 365 days. Examples of valid values include
1hand2d. - mode String
- This will set the accessPolicy mode for the policy. The valid values are
MANUAL,AUTO_LOCKandACCESS_REQUEST.
TwingateKubernetesResourceAccessPolicy, TwingateKubernetesResourceAccessPolicyArgs
- Approval
Mode string - This will set the approval model for the policy. The valid values are
AUTOMATICandMANUAL. - Duration string
- This will set the access duration for the policy. Duration must be between 1 hour and 365 days. Examples of valid values include
1hand2d. - Mode string
- This will set the accessPolicy mode for the policy. The valid values are
MANUAL,AUTO_LOCKandACCESS_REQUEST.
- Approval
Mode string - This will set the approval model for the policy. The valid values are
AUTOMATICandMANUAL. - Duration string
- This will set the access duration for the policy. Duration must be between 1 hour and 365 days. Examples of valid values include
1hand2d. - Mode string
- This will set the accessPolicy mode for the policy. The valid values are
MANUAL,AUTO_LOCKandACCESS_REQUEST.
- approval
Mode String - This will set the approval model for the policy. The valid values are
AUTOMATICandMANUAL. - duration String
- This will set the access duration for the policy. Duration must be between 1 hour and 365 days. Examples of valid values include
1hand2d. - mode String
- This will set the accessPolicy mode for the policy. The valid values are
MANUAL,AUTO_LOCKandACCESS_REQUEST.
- approval
Mode string - This will set the approval model for the policy. The valid values are
AUTOMATICandMANUAL. - duration string
- This will set the access duration for the policy. Duration must be between 1 hour and 365 days. Examples of valid values include
1hand2d. - mode string
- This will set the accessPolicy mode for the policy. The valid values are
MANUAL,AUTO_LOCKandACCESS_REQUEST.
- approval_
mode str - This will set the approval model for the policy. The valid values are
AUTOMATICandMANUAL. - duration str
- This will set the access duration for the policy. Duration must be between 1 hour and 365 days. Examples of valid values include
1hand2d. - mode str
- This will set the accessPolicy mode for the policy. The valid values are
MANUAL,AUTO_LOCKandACCESS_REQUEST.
- approval
Mode String - This will set the approval model for the policy. The valid values are
AUTOMATICandMANUAL. - duration String
- This will set the access duration for the policy. Duration must be between 1 hour and 365 days. Examples of valid values include
1hand2d. - mode String
- This will set the accessPolicy mode for the policy. The valid values are
MANUAL,AUTO_LOCKandACCESS_REQUEST.
TwingateKubernetesResourceProtocols, TwingateKubernetesResourceProtocolsArgs
- Allow
Icmp bool - Whether to allow ICMP (ping) traffic
- Tcp
Twingate.
Twingate. Inputs. Twingate Kubernetes Resource Protocols Tcp - Udp
Twingate.
Twingate. Inputs. Twingate Kubernetes Resource Protocols Udp
- Allow
Icmp bool - Whether to allow ICMP (ping) traffic
- Tcp
Twingate
Kubernetes Resource Protocols Tcp - Udp
Twingate
Kubernetes Resource Protocols Udp
- allow
Icmp Boolean - Whether to allow ICMP (ping) traffic
- tcp
Twingate
Kubernetes Resource Protocols Tcp - udp
Twingate
Kubernetes Resource Protocols Udp
- allow
Icmp boolean - Whether to allow ICMP (ping) traffic
- tcp
Twingate
Kubernetes Resource Protocols Tcp - udp
Twingate
Kubernetes Resource Protocols Udp
- allow_
icmp bool - Whether to allow ICMP (ping) traffic
- tcp
Twingate
Kubernetes Resource Protocols Tcp - udp
Twingate
Kubernetes Resource Protocols Udp
- allow
Icmp Boolean - Whether to allow ICMP (ping) traffic
- tcp Property Map
- udp Property Map
TwingateKubernetesResourceProtocolsTcp, TwingateKubernetesResourceProtocolsTcpArgs
- Policy string
- Whether to allow or deny all ports, or restrict protocol access within certain port ranges: Can be
RESTRICTED(only listed ports are allowed),ALLOW_ALL, orDENY_ALL - Ports List<string>
- List of port ranges between 1 and 65535 inclusive, in the format
100-200for a range, or8080for a single port
- Policy string
- Whether to allow or deny all ports, or restrict protocol access within certain port ranges: Can be
RESTRICTED(only listed ports are allowed),ALLOW_ALL, orDENY_ALL - Ports []string
- List of port ranges between 1 and 65535 inclusive, in the format
100-200for a range, or8080for a single port
- policy String
- Whether to allow or deny all ports, or restrict protocol access within certain port ranges: Can be
RESTRICTED(only listed ports are allowed),ALLOW_ALL, orDENY_ALL - ports List<String>
- List of port ranges between 1 and 65535 inclusive, in the format
100-200for a range, or8080for a single port
- policy string
- Whether to allow or deny all ports, or restrict protocol access within certain port ranges: Can be
RESTRICTED(only listed ports are allowed),ALLOW_ALL, orDENY_ALL - ports string[]
- List of port ranges between 1 and 65535 inclusive, in the format
100-200for a range, or8080for a single port
- policy str
- Whether to allow or deny all ports, or restrict protocol access within certain port ranges: Can be
RESTRICTED(only listed ports are allowed),ALLOW_ALL, orDENY_ALL - ports Sequence[str]
- List of port ranges between 1 and 65535 inclusive, in the format
100-200for a range, or8080for a single port
- policy String
- Whether to allow or deny all ports, or restrict protocol access within certain port ranges: Can be
RESTRICTED(only listed ports are allowed),ALLOW_ALL, orDENY_ALL - ports List<String>
- List of port ranges between 1 and 65535 inclusive, in the format
100-200for a range, or8080for a single port
TwingateKubernetesResourceProtocolsUdp, TwingateKubernetesResourceProtocolsUdpArgs
- Policy string
- Whether to allow or deny all ports, or restrict protocol access within certain port ranges: Can be
RESTRICTED(only listed ports are allowed),ALLOW_ALL, orDENY_ALL - Ports List<string>
- List of port ranges between 1 and 65535 inclusive, in the format
100-200for a range, or8080for a single port
- Policy string
- Whether to allow or deny all ports, or restrict protocol access within certain port ranges: Can be
RESTRICTED(only listed ports are allowed),ALLOW_ALL, orDENY_ALL - Ports []string
- List of port ranges between 1 and 65535 inclusive, in the format
100-200for a range, or8080for a single port
- policy String
- Whether to allow or deny all ports, or restrict protocol access within certain port ranges: Can be
RESTRICTED(only listed ports are allowed),ALLOW_ALL, orDENY_ALL - ports List<String>
- List of port ranges between 1 and 65535 inclusive, in the format
100-200for a range, or8080for a single port
- policy string
- Whether to allow or deny all ports, or restrict protocol access within certain port ranges: Can be
RESTRICTED(only listed ports are allowed),ALLOW_ALL, orDENY_ALL - ports string[]
- List of port ranges between 1 and 65535 inclusive, in the format
100-200for a range, or8080for a single port
- policy str
- Whether to allow or deny all ports, or restrict protocol access within certain port ranges: Can be
RESTRICTED(only listed ports are allowed),ALLOW_ALL, orDENY_ALL - ports Sequence[str]
- List of port ranges between 1 and 65535 inclusive, in the format
100-200for a range, or8080for a single port
- policy String
- Whether to allow or deny all ports, or restrict protocol access within certain port ranges: Can be
RESTRICTED(only listed ports are allowed),ALLOW_ALL, orDENY_ALL - ports List<String>
- List of port ranges between 1 and 65535 inclusive, in the format
100-200for a range, or8080for a single port
Package Details
- Repository
- twingate Twingate/pulumi-twingate
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
twingateTerraform Provider.
published on Monday, Apr 13, 2026 by Twingate
