@pulumi/tailscale 0.13.6-alpha.1708066478 → 0.14.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/acl.d.ts CHANGED
@@ -2,19 +2,33 @@ import * as pulumi from "@pulumi/pulumi";
2
2
  /**
3
3
  * The acl resource allows you to configure a Tailscale ACL. See https://tailscale.com/kb/1018/acls for more information. Note that this resource will completely overwrite existing ACL contents for a given tailnet.
4
4
  *
5
+ * If tests are defined in the ACL (the top-level "tests" section), ACL validation will occur before creation and update operations are applied.
6
+ *
5
7
  * ## Example Usage
6
8
  *
7
9
  * ```typescript
8
10
  * import * as pulumi from "@pulumi/pulumi";
9
11
  * import * as tailscale from "@pulumi/tailscale";
10
12
  *
11
- * const sampleAcl = new tailscale.Acl("sampleAcl", {acl: JSON.stringify({
13
+ * const asJson = new tailscale.Acl("asJson", {acl: JSON.stringify({
12
14
  * acls: [{
13
15
  * action: "accept",
14
16
  * users: ["*"],
15
17
  * ports: ["*:*"],
16
18
  * }],
17
19
  * })});
20
+ * const asHujson = new tailscale.Acl("asHujson", {acl: ` {
21
+ * // Comments in HuJSON policy are preserved when the policy is applied.
22
+ * "acls": [
23
+ * {
24
+ * // Allow all users access to all ports.
25
+ * action = "accept",
26
+ * users = ["*"],
27
+ * ports = ["*:*"],
28
+ * },
29
+ * ],
30
+ * }
31
+ * `});
18
32
  * ```
19
33
  *
20
34
  * ## Import
@@ -42,9 +56,13 @@ export declare class Acl extends pulumi.CustomResource {
42
56
  */
43
57
  static isInstance(obj: any): obj is Acl;
44
58
  /**
45
- * The JSON-based policy that defines which devices and users are allowed to connect in your network
59
+ * The policy that defines which devices and users are allowed to connect in your network. Can be either a JSON or a HuJSON string.
46
60
  */
47
61
  readonly acl: pulumi.Output<string>;
62
+ /**
63
+ * If true, will skip requirement to import acl before allowing changes. Be careful, can cause ACL to be overwritten
64
+ */
65
+ readonly overwriteExistingContent: pulumi.Output<boolean | undefined>;
48
66
  /**
49
67
  * Create a Acl resource with the given unique name, arguments, and options.
50
68
  *
@@ -59,16 +77,24 @@ export declare class Acl extends pulumi.CustomResource {
59
77
  */
60
78
  export interface AclState {
61
79
  /**
62
- * The JSON-based policy that defines which devices and users are allowed to connect in your network
80
+ * The policy that defines which devices and users are allowed to connect in your network. Can be either a JSON or a HuJSON string.
63
81
  */
64
82
  acl?: pulumi.Input<string>;
83
+ /**
84
+ * If true, will skip requirement to import acl before allowing changes. Be careful, can cause ACL to be overwritten
85
+ */
86
+ overwriteExistingContent?: pulumi.Input<boolean>;
65
87
  }
66
88
  /**
67
89
  * The set of arguments for constructing a Acl resource.
68
90
  */
69
91
  export interface AclArgs {
70
92
  /**
71
- * The JSON-based policy that defines which devices and users are allowed to connect in your network
93
+ * The policy that defines which devices and users are allowed to connect in your network. Can be either a JSON or a HuJSON string.
72
94
  */
73
95
  acl: pulumi.Input<string>;
96
+ /**
97
+ * If true, will skip requirement to import acl before allowing changes. Be careful, can cause ACL to be overwritten
98
+ */
99
+ overwriteExistingContent?: pulumi.Input<boolean>;
74
100
  }
package/acl.js CHANGED
@@ -8,19 +8,33 @@ const utilities = require("./utilities");
8
8
  /**
9
9
  * The acl resource allows you to configure a Tailscale ACL. See https://tailscale.com/kb/1018/acls for more information. Note that this resource will completely overwrite existing ACL contents for a given tailnet.
10
10
  *
11
+ * If tests are defined in the ACL (the top-level "tests" section), ACL validation will occur before creation and update operations are applied.
12
+ *
11
13
  * ## Example Usage
12
14
  *
13
15
  * ```typescript
14
16
  * import * as pulumi from "@pulumi/pulumi";
15
17
  * import * as tailscale from "@pulumi/tailscale";
16
18
  *
17
- * const sampleAcl = new tailscale.Acl("sampleAcl", {acl: JSON.stringify({
19
+ * const asJson = new tailscale.Acl("asJson", {acl: JSON.stringify({
18
20
  * acls: [{
19
21
  * action: "accept",
20
22
  * users: ["*"],
21
23
  * ports: ["*:*"],
22
24
  * }],
23
25
  * })});
26
+ * const asHujson = new tailscale.Acl("asHujson", {acl: ` {
27
+ * // Comments in HuJSON policy are preserved when the policy is applied.
28
+ * "acls": [
29
+ * {
30
+ * // Allow all users access to all ports.
31
+ * action = "accept",
32
+ * users = ["*"],
33
+ * ports = ["*:*"],
34
+ * },
35
+ * ],
36
+ * }
37
+ * `});
24
38
  * ```
25
39
  *
26
40
  * ## Import
@@ -60,6 +74,7 @@ class Acl extends pulumi.CustomResource {
60
74
  if (opts.id) {
61
75
  const state = argsOrState;
62
76
  resourceInputs["acl"] = state ? state.acl : undefined;
77
+ resourceInputs["overwriteExistingContent"] = state ? state.overwriteExistingContent : undefined;
63
78
  }
64
79
  else {
65
80
  const args = argsOrState;
@@ -67,6 +82,7 @@ class Acl extends pulumi.CustomResource {
67
82
  throw new Error("Missing required property 'acl'");
68
83
  }
69
84
  resourceInputs["acl"] = args ? args.acl : undefined;
85
+ resourceInputs["overwriteExistingContent"] = args ? args.overwriteExistingContent : undefined;
70
86
  }
71
87
  opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
72
88
  super(Acl.__pulumiType, name, resourceInputs, opts);
package/acl.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"acl.js","sourceRoot":"","sources":["../acl.ts"],"names":[],"mappings":";AAAA,wFAAwF;AACxF,iFAAiF;;;AAEjF,yCAAyC;AACzC,yCAAyC;AAEzC;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,MAAa,GAAI,SAAQ,MAAM,CAAC,cAAc;IAC1C;;;;;;;;OAQG;IACI,MAAM,CAAC,GAAG,CAAC,IAAY,EAAE,EAA2B,EAAE,KAAgB,EAAE,IAAmC;QAC9G,OAAO,IAAI,GAAG,CAAC,IAAI,EAAO,KAAK,kCAAO,IAAI,KAAE,EAAE,EAAE,EAAE,IAAG,CAAC;IAC1D,CAAC;IAKD;;;OAGG;IACI,MAAM,CAAC,UAAU,CAAC,GAAQ;QAC7B,IAAI,GAAG,KAAK,SAAS,IAAI,GAAG,KAAK,IAAI,EAAE;YACnC,OAAO,KAAK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C,CAAC,SAAS,CAAC;SACjG;QACD,IAAI,GAAG,MAAM,CAAC,YAAY,CAAC,SAAS,CAAC,oBAAoB,EAAE,EAAE,IAAI,CAAC,CAAC;QACnE,KAAK,CAAC,GAAG,CAAC,YAAY,EAAE,IAAI,EAAE,cAAc,EAAE,IAAI,CAAC,CAAC;IACxD,CAAC;;AA9DL,kBA+DC;AAjDG,gBAAgB;AACO,gBAAY,GAAG,yBAAyB,CAAC"}
@@ -19,6 +19,13 @@ import * as pulumi from "@pulumi/pulumi";
19
19
  * "2.0.0.0/24",
20
20
  * ],
21
21
  * });
22
+ * const sampleExitNode = new tailscale.DeviceSubnetRoutes("sampleExitNode", {
23
+ * deviceId: sampleDevice.then(sampleDevice => sampleDevice.id),
24
+ * routes: [
25
+ * "0.0.0.0/0",
26
+ * "::/0",
27
+ * ],
28
+ * });
22
29
  * ```
23
30
  */
24
31
  export declare class DeviceSubnetRoutes extends pulumi.CustomResource {
@@ -25,6 +25,13 @@ const utilities = require("./utilities");
25
25
  * "2.0.0.0/24",
26
26
  * ],
27
27
  * });
28
+ * const sampleExitNode = new tailscale.DeviceSubnetRoutes("sampleExitNode", {
29
+ * deviceId: sampleDevice.then(sampleDevice => sampleDevice.id),
30
+ * routes: [
31
+ * "0.0.0.0/0",
32
+ * "::/0",
33
+ * ],
34
+ * });
28
35
  * ```
29
36
  */
30
37
  class DeviceSubnetRoutes extends pulumi.CustomResource {
@@ -1 +1 @@
1
- {"version":3,"file":"deviceSubnetRoutes.js","sourceRoot":"","sources":["../deviceSubnetRoutes.ts"],"names":[],"mappings":";AAAA,wFAAwF;AACxF,iFAAiF;;;AAEjF,yCAAyC;AACzC,yCAAyC;AAEzC;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,MAAa,kBAAmB,SAAQ,MAAM,CAAC,cAAc;IACzD;;;;;;;;OAQG;IACI,MAAM,CAAC,GAAG,CAAC,IAAY,EAAE,EAA2B,EAAE,KAA+B,EAAE,IAAmC;QAC7H,OAAO,I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;YACjE,cAAc,CAAC,UAAU,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC,SAAS,CAAC;YAChE,cAAc,CAAC,QAAQ,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS,CAAC;SAC/D;aAAM;YACH,MAAM,IAAI,GAAG,WAAiD,CAAC;YAC/D,IAAI,CAAC,CAAC,IAAI,IAAI,IAAI,CAAC,QAAQ,KAAK,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE;gBACrD,MAAM,IAAI,KAAK,CAAC,sCAAsC,CAAC,CAAC;aAC3D;YACD,IAAI,CAAC,CAAC,IAAI,IAAI,IAAI,CAAC,MAAM,KAAK,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE;gBACnD,MAAM,IAAI,KAAK,CAAC,oCAAoC,CAAC,CAAC;aACzD;YACD,cAAc,CAAC,UAAU,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,SAAS,CAAC;YAC9D,cAAc,CAAC,QAAQ,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS,CAAC;SAC7D;QACD,IAAI,GAAG,MAAM,CAAC,YAAY,CAAC,SAAS,CAAC,oBAAoB,EAAE,EAAE,IAAI,CAAC,CAAC;QACnE,KAAK,CAAC,kBAAkB,CAAC,YAAY,EAAE,IAAI,EAAE,cAAc,EAAE,IAAI,CAAC,CAAC;IACvE,CAAC;;AAjEL,gDAkEC;AApDG,gBAAgB;AACO,+BAAY,GAAG,uDAAuD,CAAC"}
package/getAcl.d.ts CHANGED
@@ -7,12 +7,16 @@ export declare function getAcl(opts?: pulumi.InvokeOptions): Promise<GetAclResul
7
7
  * A collection of values returned by getAcl.
8
8
  */
9
9
  export interface GetAclResult {
10
+ /**
11
+ * The contents of Tailscale ACL as a HuJSON string
12
+ */
13
+ readonly hujson: string;
10
14
  /**
11
15
  * The provider-assigned unique ID for this managed resource.
12
16
  */
13
17
  readonly id: string;
14
18
  /**
15
- * The contents of Tailscale ACL as JSON
19
+ * The contents of Tailscale ACL as a JSON string
16
20
  */
17
21
  readonly json: string;
18
22
  }
package/getAcl.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"getAcl.js","sourceRoot":"","sources":["../getAcl.ts"],"names":[],"mappings":";AAAA,wFAAwF;AACxF,iFAAiF;;;AAEjF,yCAAyC;AACzC,yCAAyC;AAEzC;;GAEG;AACH,SAAgB,MAAM,CAAC,IAA2B;IAE9C,IAAI,GAAG,MAAM,CAAC,YAAY,CAAC,SAAS,CAAC,oBAAoB,EAAE,EAAE,IAAI,IAAI,EAAE,CAAC,CAAC;IACzE,OAAO,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,+BAA+B,EAAE,EAC7D,EAAE,IAAI,CAAC,CAAC;AACb,CAAC;AALD,wBAKC;AAeD;;GAEG;AACH,SAAgB,YAAY,CAAC,IAA2B;IACpD,OAAO,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAA;AACtC,CAAC;AAFD,oCAEC"}
1
+ {"version":3,"file":"getAcl.js","sourceRoot":"","sources":["../getAcl.ts"],"names":[],"mappings":";AAAA,wFAAwF;AACxF,iFAAiF;;;AAEjF,yCAAyC;AACzC,yCAAyC;AAEzC;;GAEG;AACH,SAAgB,MAAM,CAAC,IAA2B;IAE9C,IAAI,GAAG,MAAM,CAAC,YAAY,CAAC,SAAS,CAAC,oBAAoB,EAAE,EAAE,IAAI,IAAI,EAAE,CAAC,CAAC;IACzE,OAAO,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,+BAA+B,EAAE,EAC7D,EAAE,IAAI,CAAC,CAAC;AACb,CAAC;AALD,wBAKC;AAmBD;;GAEG;AACH,SAAgB,YAAY,CAAC,IAA2B;IACpD,OAAO,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAA;AACtC,CAAC;AAFD,oCAEC"}
package/getDevice.d.ts CHANGED
@@ -9,20 +9,28 @@ import * as pulumi from "@pulumi/pulumi";
9
9
  * import * as tailscale from "@pulumi/tailscale";
10
10
  *
11
11
  * const sampleDevice = tailscale.getDevice({
12
- * name: "user1-device.example.com",
12
+ * name: "device1.example.ts.net",
13
+ * waitFor: "60s",
14
+ * });
15
+ * const sampleDevice2 = tailscale.getDevice({
16
+ * hostname: "device2",
13
17
  * waitFor: "60s",
14
18
  * });
15
19
  * ```
16
20
  */
17
- export declare function getDevice(args: GetDeviceArgs, opts?: pulumi.InvokeOptions): Promise<GetDeviceResult>;
21
+ export declare function getDevice(args?: GetDeviceArgs, opts?: pulumi.InvokeOptions): Promise<GetDeviceResult>;
18
22
  /**
19
23
  * A collection of arguments for invoking getDevice.
20
24
  */
21
25
  export interface GetDeviceArgs {
22
26
  /**
23
- * The name of the device
27
+ * The short hostname of the device
24
28
  */
25
- name: string;
29
+ hostname?: string;
30
+ /**
31
+ * The full name of the device (e.g. `hostname.domain.ts.net`)
32
+ */
33
+ name?: string;
26
34
  /**
27
35
  * If specified, the provider will make multiple attempts to obtain the data source until the waitFor duration is reached. Retries are made every second so this value should be greater than 1s
28
36
  */
@@ -36,14 +44,18 @@ export interface GetDeviceResult {
36
44
  * The list of device's IPs
37
45
  */
38
46
  readonly addresses: string[];
47
+ /**
48
+ * The short hostname of the device
49
+ */
50
+ readonly hostname?: string;
39
51
  /**
40
52
  * The provider-assigned unique ID for this managed resource.
41
53
  */
42
54
  readonly id: string;
43
55
  /**
44
- * The name of the device
56
+ * The full name of the device (e.g. `hostname.domain.ts.net`)
45
57
  */
46
- readonly name: string;
58
+ readonly name?: string;
47
59
  /**
48
60
  * The tags applied to the device
49
61
  */
@@ -67,20 +79,28 @@ export interface GetDeviceResult {
67
79
  * import * as tailscale from "@pulumi/tailscale";
68
80
  *
69
81
  * const sampleDevice = tailscale.getDevice({
70
- * name: "user1-device.example.com",
82
+ * name: "device1.example.ts.net",
83
+ * waitFor: "60s",
84
+ * });
85
+ * const sampleDevice2 = tailscale.getDevice({
86
+ * hostname: "device2",
71
87
  * waitFor: "60s",
72
88
  * });
73
89
  * ```
74
90
  */
75
- export declare function getDeviceOutput(args: GetDeviceOutputArgs, opts?: pulumi.InvokeOptions): pulumi.Output<GetDeviceResult>;
91
+ export declare function getDeviceOutput(args?: GetDeviceOutputArgs, opts?: pulumi.InvokeOptions): pulumi.Output<GetDeviceResult>;
76
92
  /**
77
93
  * A collection of arguments for invoking getDevice.
78
94
  */
79
95
  export interface GetDeviceOutputArgs {
80
96
  /**
81
- * The name of the device
97
+ * The short hostname of the device
98
+ */
99
+ hostname?: pulumi.Input<string>;
100
+ /**
101
+ * The full name of the device (e.g. `hostname.domain.ts.net`)
82
102
  */
83
- name: pulumi.Input<string>;
103
+ name?: pulumi.Input<string>;
84
104
  /**
85
105
  * If specified, the provider will make multiple attempts to obtain the data source until the waitFor duration is reached. Retries are made every second so this value should be greater than 1s
86
106
  */
package/getDevice.js CHANGED
@@ -15,14 +15,20 @@ const utilities = require("./utilities");
15
15
  * import * as tailscale from "@pulumi/tailscale";
16
16
  *
17
17
  * const sampleDevice = tailscale.getDevice({
18
- * name: "user1-device.example.com",
18
+ * name: "device1.example.ts.net",
19
+ * waitFor: "60s",
20
+ * });
21
+ * const sampleDevice2 = tailscale.getDevice({
22
+ * hostname: "device2",
19
23
  * waitFor: "60s",
20
24
  * });
21
25
  * ```
22
26
  */
23
27
  function getDevice(args, opts) {
28
+ args = args || {};
24
29
  opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {});
25
30
  return pulumi.runtime.invoke("tailscale:index/getDevice:getDevice", {
31
+ "hostname": args.hostname,
26
32
  "name": args.name,
27
33
  "waitFor": args.waitFor,
28
34
  }, opts);
@@ -38,7 +44,11 @@ exports.getDevice = getDevice;
38
44
  * import * as tailscale from "@pulumi/tailscale";
39
45
  *
40
46
  * const sampleDevice = tailscale.getDevice({
41
- * name: "user1-device.example.com",
47
+ * name: "device1.example.ts.net",
48
+ * waitFor: "60s",
49
+ * });
50
+ * const sampleDevice2 = tailscale.getDevice({
51
+ * hostname: "device2",
42
52
  * waitFor: "60s",
43
53
  * });
44
54
  * ```
package/getDevice.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"getDevice.js","sourceRoot":"","sources":["../getDevice.ts"],"names":[],"mappings":";AAAA,wFAAwF;AACxF,iFAAiF;;;AAEjF,yCAAyC;AACzC,yCAAyC;AAEzC;;;;;;;;;;;;;;GAcG;AACH,SAAgB,SAAS,CAAC,IAAmB,EAAE,IAA2B;IAEtE,IAAI,GAAG,MAAM,CAAC,YAAY,CAAC,SAAS,CAAC,oBAAoB,EAAE,EAAE,IAAI,IAAI,EAAE,CAAC,CAAC;IACzE,OAAO,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,qCAAqC,EAAE;QAChE,MAAM,EAAE,IAAI,CAAC,IAAI;QACjB,SAAS,EAAE,IAAI,CAAC,OAAO;KAC1B,EAAE,IAAI,CAAC,CAAC;AACb,CAAC;AAPD,8BAOC;AA6CD;;;;;;;;;;;;;;GAcG;AACH,SAAgB,eAAe,CAAC,IAAyB,EAAE,IAA2B;IAClF,OAAO,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,KAAK,CAAC,CAAC,CAAM,EAAE,EAAE,CAAC,SAAS,CAAC,CAAC,EAAE,IAAI,CAAC,CAAC,CAAA;AACpE,CAAC;AAFD,0CAEC"}
1
+ {"version":3,"file":"getDevice.js","sourceRoot":"","sources":["../getDevice.ts"],"names":[],"mappings":";AAAA,wFAAwF;AACxF,iFAAiF;;;AAEjF,yCAAyC;AACzC,yCAAyC;AAEzC;;;;;;;;;;;;;;;;;;GAkBG;AACH,SAAgB,SAAS,CAAC,IAAoB,EAAE,IAA2B;IACvE,IAAI,GAAG,IAAI,IAAI,EAAE,CAAC;IAElB,IAAI,GAAG,MAAM,CAAC,YAAY,CAAC,SAAS,CAAC,oBAAoB,EAAE,EAAE,IAAI,IAAI,EAAE,CAAC,CAAC;IACzE,OAAO,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,qCAAqC,EAAE;QAChE,UAAU,EAAE,IAAI,CAAC,QAAQ;QACzB,MAAM,EAAE,IAAI,CAAC,IAAI;QACjB,SAAS,EAAE,IAAI,CAAC,OAAO;KAC1B,EAAE,IAAI,CAAC,CAAC;AACb,CAAC;AATD,8BASC;AAqDD;;;;;;;;;;;;;;;;;;GAkBG;AACH,SAAgB,eAAe,CAAC,IAA0B,EAAE,IAA2B;IACnF,OAAO,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,KAAK,CAAC,CAAC,CAAM,EAAE,EAAE,CAAC,SAAS,CAAC,CAAC,EAAE,IAAI,CAAC,CAAC,CAAA;AACpE,CAAC;AAFD,0CAEC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pulumi/tailscale",
3
- "version": "v0.13.6-alpha.1708066478+ee7edcc1",
3
+ "version": "v0.14.0",
4
4
  "description": "A Pulumi package for creating and managing Tailscale cloud resources.",
5
5
  "keywords": [
6
6
  "pulumi",
package/types/output.d.ts CHANGED
@@ -3,12 +3,16 @@ export interface GetDevicesDevice {
3
3
  * The list of device's IPs
4
4
  */
5
5
  addresses: string[];
6
+ /**
7
+ * The short hostname of the device
8
+ */
9
+ hostname: string;
6
10
  /**
7
11
  * The unique identifier of the device
8
12
  */
9
13
  id: string;
10
14
  /**
11
- * The name of the device
15
+ * The full name of the device (e.g. `hostname.domain.ts.net`)
12
16
  */
13
17
  name: string;
14
18
  /**