@pulumi/tailscale
Version:
A Pulumi package for creating and managing Tailscale cloud resources.
104 lines (103 loc) • 3.54 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
/**
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as tailscale from "@pulumi/tailscale";
*
* const sampleDevice = tailscale.getDevice({
* name: "device.example.com",
* });
* const sampleRoutes = new tailscale.DeviceSubnetRoutes("sample_routes", {
* deviceId: sampleDevice.then(sampleDevice => sampleDevice.nodeId),
* routes: [
* "10.0.1.0/24",
* "1.2.0.0/16",
* "2.0.0.0/24",
* ],
* });
* const sampleExitNode = new tailscale.DeviceSubnetRoutes("sample_exit_node", {
* deviceId: sampleDevice.then(sampleDevice => sampleDevice.nodeId),
* routes: [
* "0.0.0.0/0",
* "::/0",
* ],
* });
* ```
*
* ## Import
*
* The `pulumi import` command can be used, for example:
*
* Device subnet rules can be imported using the node ID (preferred), e.g.,
*
* ```sh
* $ pulumi import tailscale:index/deviceSubnetRoutes:DeviceSubnetRoutes sample nodeidCNTRL
* ```
*
* Device subnet rules can be imported using the legacy ID, e.g.,
*
* ```sh
* $ pulumi import tailscale:index/deviceSubnetRoutes:DeviceSubnetRoutes sample 123456789
* ```
*/
export declare class DeviceSubnetRoutes extends pulumi.CustomResource {
/**
* Get an existing DeviceSubnetRoutes resource's state with the given name, ID, and optional extra
* properties used to qualify the lookup.
*
* @param name The _unique_ name of the resulting resource.
* @param id The _unique_ provider ID of the resource to lookup.
* @param state Any extra arguments used during the lookup.
* @param opts Optional settings to control the behavior of the CustomResource.
*/
static get(name: string, id: pulumi.Input<pulumi.ID>, state?: DeviceSubnetRoutesState, opts?: pulumi.CustomResourceOptions): DeviceSubnetRoutes;
/**
* Returns true if the given object is an instance of DeviceSubnetRoutes. This is designed to work even
* when multiple copies of the Pulumi SDK have been loaded into the same process.
*/
static isInstance(obj: any): obj is DeviceSubnetRoutes;
/**
* The device to set subnet routes for
*/
readonly deviceId: pulumi.Output<string>;
/**
* The subnet routes that are enabled to be routed by a device
*/
readonly routes: pulumi.Output<string[]>;
/**
* Create a DeviceSubnetRoutes resource with the given unique name, arguments, and options.
*
* @param name The _unique_ name of the resource.
* @param args The arguments to use to populate this resource's properties.
* @param opts A bag of options that control this resource's behavior.
*/
constructor(name: string, args: DeviceSubnetRoutesArgs, opts?: pulumi.CustomResourceOptions);
}
/**
* Input properties used for looking up and filtering DeviceSubnetRoutes resources.
*/
export interface DeviceSubnetRoutesState {
/**
* The device to set subnet routes for
*/
deviceId?: pulumi.Input<string>;
/**
* The subnet routes that are enabled to be routed by a device
*/
routes?: pulumi.Input<pulumi.Input<string>[]>;
}
/**
* The set of arguments for constructing a DeviceSubnetRoutes resource.
*/
export interface DeviceSubnetRoutesArgs {
/**
* The device to set subnet routes for
*/
deviceId: pulumi.Input<string>;
/**
* The subnet routes that are enabled to be routed by a device
*/
routes: pulumi.Input<pulumi.Input<string>[]>;
}