@pulumiverse/unifi 0.2.0-alpha.1771056704 → 0.2.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.
Files changed (146) hide show
  1. package/account.d.ts +65 -23
  2. package/account.js +31 -19
  3. package/account.js.map +1 -1
  4. package/config/vars.d.ts +7 -7
  5. package/config/vars.js +11 -10
  6. package/config/vars.js.map +1 -1
  7. package/device.d.ts +89 -20
  8. package/device.js +20 -14
  9. package/device.js.map +1 -1
  10. package/dns/getRecord.d.ts +116 -0
  11. package/dns/getRecord.js +62 -0
  12. package/dns/getRecord.js.map +1 -0
  13. package/dns/getRecords.d.ts +63 -0
  14. package/dns/getRecords.js +48 -0
  15. package/dns/getRecords.js.map +1 -0
  16. package/dns/index.d.ts +9 -0
  17. package/dns/index.js +28 -0
  18. package/dns/index.js.map +1 -0
  19. package/dns/record.d.ts +213 -0
  20. package/dns/record.js +98 -0
  21. package/dns/record.js.map +1 -0
  22. package/dynamicDNS.d.ts +53 -22
  23. package/dynamicDNS.js +31 -18
  24. package/dynamicDNS.js.map +1 -1
  25. package/firewall/getZone.d.ts +56 -0
  26. package/firewall/getZone.js +30 -0
  27. package/firewall/getZone.js.map +1 -0
  28. package/firewall/group.d.ts +42 -13
  29. package/firewall/group.js +23 -12
  30. package/firewall/group.js.map +1 -1
  31. package/firewall/index.d.ts +9 -0
  32. package/firewall/index.js +14 -1
  33. package/firewall/index.js.map +1 -1
  34. package/firewall/rule.d.ts +263 -76
  35. package/firewall/rule.js +67 -63
  36. package/firewall/rule.js.map +1 -1
  37. package/firewall/zone.d.ts +111 -0
  38. package/firewall/zone.js +92 -0
  39. package/firewall/zone.js.map +1 -0
  40. package/firewall/zonePolicy.d.ts +323 -0
  41. package/firewall/zonePolicy.js +171 -0
  42. package/firewall/zonePolicy.js.map +1 -0
  43. package/getAccount.d.ts +2 -2
  44. package/getAccount.js +2 -2
  45. package/getNetwork.d.ts +2 -2
  46. package/iam/getUser.d.ts +1 -1
  47. package/iam/group.d.ts +28 -13
  48. package/iam/group.js +25 -10
  49. package/iam/group.js.map +1 -1
  50. package/iam/user.d.ts +65 -35
  51. package/iam/user.js +45 -30
  52. package/iam/user.js.map +1 -1
  53. package/index.d.ts +2 -1
  54. package/index.js +3 -1
  55. package/index.js.map +1 -1
  56. package/network.d.ts +601 -157
  57. package/network.js +117 -103
  58. package/network.js.map +1 -1
  59. package/package.json +2 -2
  60. package/port/alFile.d.ts +122 -0
  61. package/port/alFile.js +80 -0
  62. package/port/alFile.js.map +1 -0
  63. package/port/forward.d.ts +56 -31
  64. package/port/forward.js +29 -22
  65. package/port/forward.js.map +1 -1
  66. package/port/getProfile.d.ts +9 -9
  67. package/port/getProfile.js +2 -2
  68. package/port/index.d.ts +3 -0
  69. package/port/index.js +6 -1
  70. package/port/index.js.map +1 -1
  71. package/port/profile.d.ts +448 -100
  72. package/port/profile.js +83 -72
  73. package/port/profile.js.map +1 -1
  74. package/provider.d.ts +13 -12
  75. package/provider.js +8 -6
  76. package/provider.js.map +1 -1
  77. package/radiusProfile.d.ts +69 -34
  78. package/radiusProfile.js +35 -24
  79. package/radiusProfile.js.map +1 -1
  80. package/setting/autoSpeedtest.d.ts +89 -0
  81. package/setting/autoSpeedtest.js +73 -0
  82. package/setting/autoSpeedtest.js.map +1 -0
  83. package/setting/country.d.ts +80 -0
  84. package/setting/country.js +68 -0
  85. package/setting/country.js.map +1 -0
  86. package/setting/dpi.d.ts +87 -0
  87. package/setting/dpi.js +74 -0
  88. package/setting/dpi.js.map +1 -0
  89. package/setting/guestAccess.d.ts +588 -0
  90. package/setting/guestAccess.js +201 -0
  91. package/setting/guestAccess.js.map +1 -0
  92. package/setting/index.d.ts +42 -0
  93. package/setting/index.js +71 -1
  94. package/setting/index.js.map +1 -1
  95. package/setting/ips.d.ts +234 -0
  96. package/setting/ips.js +115 -0
  97. package/setting/ips.js.map +1 -0
  98. package/setting/lcdMonitor.d.ts +111 -0
  99. package/setting/lcdMonitor.js +65 -0
  100. package/setting/lcdMonitor.js.map +1 -0
  101. package/setting/locale.d.ts +72 -0
  102. package/setting/locale.js +66 -0
  103. package/setting/locale.js.map +1 -0
  104. package/setting/magicSiteToSiteVpn.d.ts +72 -0
  105. package/setting/magicSiteToSiteVpn.js +66 -0
  106. package/setting/magicSiteToSiteVpn.js.map +1 -0
  107. package/setting/mgmt.d.ts +213 -15
  108. package/setting/mgmt.js +70 -10
  109. package/setting/mgmt.js.map +1 -1
  110. package/setting/networkOptimization.d.ts +72 -0
  111. package/setting/networkOptimization.js +66 -0
  112. package/setting/networkOptimization.js.map +1 -0
  113. package/setting/ntp.d.ts +128 -0
  114. package/setting/ntp.js +79 -0
  115. package/setting/ntp.js.map +1 -0
  116. package/setting/radius.d.ts +52 -25
  117. package/setting/radius.js +45 -18
  118. package/setting/radius.js.map +1 -1
  119. package/setting/rsyslogd.d.ts +205 -0
  120. package/setting/rsyslogd.js +99 -0
  121. package/setting/rsyslogd.js.map +1 -0
  122. package/setting/sslInspection.d.ts +72 -0
  123. package/setting/sslInspection.js +66 -0
  124. package/setting/sslInspection.js.map +1 -0
  125. package/setting/teleport.d.ts +87 -0
  126. package/setting/teleport.js +71 -0
  127. package/setting/teleport.js.map +1 -0
  128. package/setting/usg.d.ts +538 -28
  129. package/setting/usg.js +162 -14
  130. package/setting/usg.js.map +1 -1
  131. package/setting/usw.d.ts +72 -0
  132. package/setting/usw.js +66 -0
  133. package/setting/usw.js.map +1 -0
  134. package/site.d.ts +19 -6
  135. package/site.js +19 -6
  136. package/site.js.map +1 -1
  137. package/staticRoute.d.ts +48 -22
  138. package/staticRoute.js +27 -19
  139. package/staticRoute.js.map +1 -1
  140. package/types/input.d.ts +736 -20
  141. package/types/output.d.ts +778 -20
  142. package/utilities.js +18 -29
  143. package/utilities.js.map +1 -1
  144. package/wlan.d.ts +119 -82
  145. package/wlan.js +62 -58
  146. package/wlan.js.map +1 -1
package/account.d.ts CHANGED
@@ -1,13 +1,25 @@
1
1
  import * as pulumi from "@pulumi/pulumi";
2
2
  /**
3
- * `unifi.Account` manages a RADIUS user account
3
+ * The `unifi.Account` resource manages RADIUS user accounts in the UniFi controller's built-in RADIUS server.
4
4
  *
5
- * To authenticate devices based on MAC address, use the MAC address as the username and password under client creation.
6
- * Convert lowercase letters to uppercase, and also remove colons or periods from the MAC address.
5
+ * This resource is used for:
6
+ * * WPA2/WPA3-Enterprise wireless authentication
7
+ * * 802.1X wired authentication
8
+ * * MAC-based device authentication
9
+ * * VLAN assignment through RADIUS attributes
7
10
  *
8
- * ATTENTION: If the user profile does not include a VLAN, the client will fall back to the untagged VLAN.
11
+ * Important Notes:
12
+ * 1. For MAC-based authentication:
13
+ * * Use the device's MAC address as both username and password
14
+ * * Convert MAC address to uppercase with no separators (e.g., '00:11:22:33:44:55' becomes '001122334455')
15
+ * 2. VLAN Assignment:
16
+ * * If no VLAN is specified in the profile, clients will use the network's untagged VLAN
17
+ * * VLAN assignment uses standard RADIUS tunnel attributes
9
18
  *
10
- * NOTE: MAC-based authentication accounts can only be used for wireless and wired clients. L2TP remote access does not apply.
19
+ * Limitations:
20
+ * * MAC-based authentication works only for wireless and wired clients
21
+ * * L2TP remote access VPN is not supported with MAC authentication
22
+ * * Accounts must be unique within a site
11
23
  */
12
24
  export declare class Account extends pulumi.CustomResource {
13
25
  /**
@@ -26,27 +38,37 @@ export declare class Account extends pulumi.CustomResource {
26
38
  */
27
39
  static isInstance(obj: any): obj is Account;
28
40
  /**
29
- * The name of the account.
41
+ * The username for this RADIUS account. For regular users, this can be any unique identifier. For MAC-based authentication, this must be the device's MAC address in uppercase with no separators (e.g., '001122334455').
30
42
  */
31
43
  readonly name: pulumi.Output<string>;
32
44
  /**
33
- * ID of the network for this account
45
+ * The ID of the network (VLAN) to assign to clients authenticating with this account. This is used in conjunction with the tunnel attributes to provide VLAN assignment via RADIUS.
34
46
  */
35
47
  readonly networkId: pulumi.Output<string | undefined>;
36
48
  /**
37
- * The password of the account.
49
+ * The password for this RADIUS account. For MAC-based authentication, this must match the username (the MAC address). For regular users, this should be a secure password following your organization's password policies.
38
50
  */
39
51
  readonly password: pulumi.Output<string>;
40
52
  /**
41
- * The name of the site to associate the account with.
53
+ * The name of the UniFi site where this RADIUS account should be created. If not specified, the default site will be used.
42
54
  */
43
55
  readonly site: pulumi.Output<string>;
44
56
  /**
45
- * See [RFC 2868](https://www.rfc-editor.org/rfc/rfc2868) section 3.2 Defaults to `6`.
57
+ * The RADIUS tunnel medium type attribute ([RFC 2868](https://tools.ietf.org/html/rfc2868), section 3.2). Common values:
58
+ * * `6` - 802 (includes Ethernet, Token Ring, FDDI) (default)
59
+ * * `1` - IPv4
60
+ * * `2` - IPv6
61
+ *
62
+ * Only change this if you need specific tunneling behavior.
46
63
  */
47
64
  readonly tunnelMediumType: pulumi.Output<number | undefined>;
48
65
  /**
49
- * See [RFC 2868](https://www.rfc-editor.org/rfc/rfc2868) section 3.1 Defaults to `13`.
66
+ * The RADIUS tunnel type attribute ([RFC 2868](https://tools.ietf.org/html/rfc2868), section 3.1). Common values:
67
+ * * `13` - VLAN (default)
68
+ * * `1` - Point-to-Point Protocol (PPTP)
69
+ * * `9` - Point-to-Point Protocol (L2TP)
70
+ *
71
+ * Only change this if you need specific tunneling behavior.
50
72
  */
51
73
  readonly tunnelType: pulumi.Output<number | undefined>;
52
74
  /**
@@ -63,27 +85,37 @@ export declare class Account extends pulumi.CustomResource {
63
85
  */
64
86
  export interface AccountState {
65
87
  /**
66
- * The name of the account.
88
+ * The username for this RADIUS account. For regular users, this can be any unique identifier. For MAC-based authentication, this must be the device's MAC address in uppercase with no separators (e.g., '001122334455').
67
89
  */
68
90
  name?: pulumi.Input<string>;
69
91
  /**
70
- * ID of the network for this account
92
+ * The ID of the network (VLAN) to assign to clients authenticating with this account. This is used in conjunction with the tunnel attributes to provide VLAN assignment via RADIUS.
71
93
  */
72
94
  networkId?: pulumi.Input<string>;
73
95
  /**
74
- * The password of the account.
96
+ * The password for this RADIUS account. For MAC-based authentication, this must match the username (the MAC address). For regular users, this should be a secure password following your organization's password policies.
75
97
  */
76
98
  password?: pulumi.Input<string>;
77
99
  /**
78
- * The name of the site to associate the account with.
100
+ * The name of the UniFi site where this RADIUS account should be created. If not specified, the default site will be used.
79
101
  */
80
102
  site?: pulumi.Input<string>;
81
103
  /**
82
- * See [RFC 2868](https://www.rfc-editor.org/rfc/rfc2868) section 3.2 Defaults to `6`.
104
+ * The RADIUS tunnel medium type attribute ([RFC 2868](https://tools.ietf.org/html/rfc2868), section 3.2). Common values:
105
+ * * `6` - 802 (includes Ethernet, Token Ring, FDDI) (default)
106
+ * * `1` - IPv4
107
+ * * `2` - IPv6
108
+ *
109
+ * Only change this if you need specific tunneling behavior.
83
110
  */
84
111
  tunnelMediumType?: pulumi.Input<number>;
85
112
  /**
86
- * See [RFC 2868](https://www.rfc-editor.org/rfc/rfc2868) section 3.1 Defaults to `13`.
113
+ * The RADIUS tunnel type attribute ([RFC 2868](https://tools.ietf.org/html/rfc2868), section 3.1). Common values:
114
+ * * `13` - VLAN (default)
115
+ * * `1` - Point-to-Point Protocol (PPTP)
116
+ * * `9` - Point-to-Point Protocol (L2TP)
117
+ *
118
+ * Only change this if you need specific tunneling behavior.
87
119
  */
88
120
  tunnelType?: pulumi.Input<number>;
89
121
  }
@@ -92,27 +124,37 @@ export interface AccountState {
92
124
  */
93
125
  export interface AccountArgs {
94
126
  /**
95
- * The name of the account.
127
+ * The username for this RADIUS account. For regular users, this can be any unique identifier. For MAC-based authentication, this must be the device's MAC address in uppercase with no separators (e.g., '001122334455').
96
128
  */
97
129
  name?: pulumi.Input<string>;
98
130
  /**
99
- * ID of the network for this account
131
+ * The ID of the network (VLAN) to assign to clients authenticating with this account. This is used in conjunction with the tunnel attributes to provide VLAN assignment via RADIUS.
100
132
  */
101
133
  networkId?: pulumi.Input<string>;
102
134
  /**
103
- * The password of the account.
135
+ * The password for this RADIUS account. For MAC-based authentication, this must match the username (the MAC address). For regular users, this should be a secure password following your organization's password policies.
104
136
  */
105
137
  password: pulumi.Input<string>;
106
138
  /**
107
- * The name of the site to associate the account with.
139
+ * The name of the UniFi site where this RADIUS account should be created. If not specified, the default site will be used.
108
140
  */
109
141
  site?: pulumi.Input<string>;
110
142
  /**
111
- * See [RFC 2868](https://www.rfc-editor.org/rfc/rfc2868) section 3.2 Defaults to `6`.
143
+ * The RADIUS tunnel medium type attribute ([RFC 2868](https://tools.ietf.org/html/rfc2868), section 3.2). Common values:
144
+ * * `6` - 802 (includes Ethernet, Token Ring, FDDI) (default)
145
+ * * `1` - IPv4
146
+ * * `2` - IPv6
147
+ *
148
+ * Only change this if you need specific tunneling behavior.
112
149
  */
113
150
  tunnelMediumType?: pulumi.Input<number>;
114
151
  /**
115
- * See [RFC 2868](https://www.rfc-editor.org/rfc/rfc2868) section 3.1 Defaults to `13`.
152
+ * The RADIUS tunnel type attribute ([RFC 2868](https://tools.ietf.org/html/rfc2868), section 3.1). Common values:
153
+ * * `13` - VLAN (default)
154
+ * * `1` - Point-to-Point Protocol (PPTP)
155
+ * * `9` - Point-to-Point Protocol (L2TP)
156
+ *
157
+ * Only change this if you need specific tunneling behavior.
116
158
  */
117
159
  tunnelType?: pulumi.Input<number>;
118
160
  }
package/account.js CHANGED
@@ -6,14 +6,26 @@ exports.Account = void 0;
6
6
  const pulumi = require("@pulumi/pulumi");
7
7
  const utilities = require("./utilities");
8
8
  /**
9
- * `unifi.Account` manages a RADIUS user account
9
+ * The `unifi.Account` resource manages RADIUS user accounts in the UniFi controller's built-in RADIUS server.
10
10
  *
11
- * To authenticate devices based on MAC address, use the MAC address as the username and password under client creation.
12
- * Convert lowercase letters to uppercase, and also remove colons or periods from the MAC address.
11
+ * This resource is used for:
12
+ * * WPA2/WPA3-Enterprise wireless authentication
13
+ * * 802.1X wired authentication
14
+ * * MAC-based device authentication
15
+ * * VLAN assignment through RADIUS attributes
13
16
  *
14
- * ATTENTION: If the user profile does not include a VLAN, the client will fall back to the untagged VLAN.
17
+ * Important Notes:
18
+ * 1. For MAC-based authentication:
19
+ * * Use the device's MAC address as both username and password
20
+ * * Convert MAC address to uppercase with no separators (e.g., '00:11:22:33:44:55' becomes '001122334455')
21
+ * 2. VLAN Assignment:
22
+ * * If no VLAN is specified in the profile, clients will use the network's untagged VLAN
23
+ * * VLAN assignment uses standard RADIUS tunnel attributes
15
24
  *
16
- * NOTE: MAC-based authentication accounts can only be used for wireless and wired clients. L2TP remote access does not apply.
25
+ * Limitations:
26
+ * * MAC-based authentication works only for wireless and wired clients
27
+ * * L2TP remote access VPN is not supported with MAC authentication
28
+ * * Accounts must be unique within a site
17
29
  */
18
30
  class Account extends pulumi.CustomResource {
19
31
  /**
@@ -26,7 +38,7 @@ class Account extends pulumi.CustomResource {
26
38
  * @param opts Optional settings to control the behavior of the CustomResource.
27
39
  */
28
40
  static get(name, id, state, opts) {
29
- return new Account(name, state, Object.assign(Object.assign({}, opts), { id: id }));
41
+ return new Account(name, state, { ...opts, id: id });
30
42
  }
31
43
  /**
32
44
  * Returns true if the given object is an instance of Account. This is designed to work even
@@ -43,24 +55,24 @@ class Account extends pulumi.CustomResource {
43
55
  opts = opts || {};
44
56
  if (opts.id) {
45
57
  const state = argsOrState;
46
- resourceInputs["name"] = state ? state.name : undefined;
47
- resourceInputs["networkId"] = state ? state.networkId : undefined;
48
- resourceInputs["password"] = state ? state.password : undefined;
49
- resourceInputs["site"] = state ? state.site : undefined;
50
- resourceInputs["tunnelMediumType"] = state ? state.tunnelMediumType : undefined;
51
- resourceInputs["tunnelType"] = state ? state.tunnelType : undefined;
58
+ resourceInputs["name"] = state?.name;
59
+ resourceInputs["networkId"] = state?.networkId;
60
+ resourceInputs["password"] = state?.password;
61
+ resourceInputs["site"] = state?.site;
62
+ resourceInputs["tunnelMediumType"] = state?.tunnelMediumType;
63
+ resourceInputs["tunnelType"] = state?.tunnelType;
52
64
  }
53
65
  else {
54
66
  const args = argsOrState;
55
- if ((!args || args.password === undefined) && !opts.urn) {
67
+ if (args?.password === undefined && !opts.urn) {
56
68
  throw new Error("Missing required property 'password'");
57
69
  }
58
- resourceInputs["name"] = args ? args.name : undefined;
59
- resourceInputs["networkId"] = args ? args.networkId : undefined;
60
- resourceInputs["password"] = (args === null || args === void 0 ? void 0 : args.password) ? pulumi.secret(args.password) : undefined;
61
- resourceInputs["site"] = args ? args.site : undefined;
62
- resourceInputs["tunnelMediumType"] = args ? args.tunnelMediumType : undefined;
63
- resourceInputs["tunnelType"] = args ? args.tunnelType : undefined;
70
+ resourceInputs["name"] = args?.name;
71
+ resourceInputs["networkId"] = args?.networkId;
72
+ resourceInputs["password"] = args?.password ? pulumi.secret(args.password) : undefined;
73
+ resourceInputs["site"] = args?.site;
74
+ resourceInputs["tunnelMediumType"] = args?.tunnelMediumType;
75
+ resourceInputs["tunnelType"] = args?.tunnelType;
64
76
  }
65
77
  opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
66
78
  const secretOpts = { additionalSecretOutputs: ["password"] };
package/account.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"account.js","sourceRoot":"","sources":["../account.ts"],"names":[],"mappings":";AAAA,sEAAsE;AACtE,iFAAiF;;;AAEjF,yCAAyC;AACzC,yCAAyC;AAEzC;;;;;;;;;GASG;AACH,MAAa,OAAQ,SAAQ,MAAM,CAAC,cAAc;IAC9C;;;;;;;;OAQG;IACI,MAAM,CAAC,GAAG,CAAC,IAAY,EAAE,EAA2B,EAAE,KAAoB,EAAE,IAAmC;QAClH,OAAO,IAAI,OAAO,CAAC,IAAI,EAAO,KAAK,kCAAO,IAAI,KAAE,EAAE,EAAE,EAAE,IAAG,CAAC;IAC9D,CAAC;IAKD;;;OAGG;IACI,MAAM,CAAC,UAAU,CAAC,GAAQ;QAC7B,IAAI,GAAG,KAAK,SAAS,IAAI,GAAG,KAAK,IAAI,EAAE;YACnC,OAAO,KAAK,CAAC;SAChB;QACD,OAAO,GAAG,CAAC,cAAc,CAAC,KAAK,OAAO,CAAC,YAAY,CAAC;IACxD,C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WAAW,CAAC,GAAG,IAAI,EAAE,SAAS,CAAC;YAC9C,cAAc,CAAC,UAAU,CAAC,GAAG,IAAI,EAAE,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;YACvF,cAAc,CAAC,MAAM,CAAC,GAAG,IAAI,EAAE,IAAI,CAAC;YACpC,cAAc,CAAC,kBAAkB,CAAC,GAAG,IAAI,EAAE,gBAAgB,CAAC;YAC5D,cAAc,CAAC,YAAY,CAAC,GAAG,IAAI,EAAE,UAAU,CAAC;SACnD;QACD,IAAI,GAAG,MAAM,CAAC,YAAY,CAAC,SAAS,CAAC,oBAAoB,EAAE,EAAE,IAAI,CAAC,CAAC;QACnE,MAAM,UAAU,GAAG,EAAE,uBAAuB,EAAE,CAAC,UAAU,CAAC,EAAE,CAAC;QAC7D,IAAI,GAAG,MAAM,CAAC,YAAY,CAAC,IAAI,EAAE,UAAU,CAAC,CAAC;QAC7C,KAAK,CAAC,OAAO,CAAC,YAAY,EAAE,IAAI,EAAE,cAAc,EAAE,IAAI,CAAC,CAAC;IAC5D,CAAC;;AAlGL,0BAmGC;AArFG,gBAAgB;AACO,oBAAY,GAAG,6BAA6B,CAAC"}
package/config/vars.d.ts CHANGED
@@ -1,12 +1,13 @@
1
1
  /**
2
- * Skip verification of TLS certificates of API requests. You may need to set this to `true` if you are using your local
3
- * API without setting up a signed certificate. Can be specified with the `UNIFI_INSECURE` environment variable.
2
+ * Skip verification of TLS certificates of API requests. You may need to set this to `true` if you are using your local API without setting up a signed certificate. Can be specified with the `UNIFI_INSECURE` environment variable.
4
3
  */
5
4
  export declare const allowInsecure: boolean | undefined;
6
5
  /**
7
- * URL of the controller API. Can be specified with the `UNIFI_API` environment variable. You should **NOT** supply the
8
- * path (`/api`), the SDK will discover the appropriate paths. This is to support UDM Pro style API paths as well as more
9
- * standard controller paths.
6
+ * API Key for the user accessing the API. Can be specified with the `UNIFI_API_KEY` environment variable. Controller version 9.0.108 or later is required.
7
+ */
8
+ export declare const apiKey: string | undefined;
9
+ /**
10
+ * URL of the controller API. Can be specified with the `UNIFI_API` environment variable. You should **NOT** supply the path (`/api`), the SDK will discover the appropriate paths. This is to support UDM Pro style API paths as well as more standard controller paths.
10
11
  */
11
12
  export declare const apiUrl: string | undefined;
12
13
  /**
@@ -14,8 +15,7 @@ export declare const apiUrl: string | undefined;
14
15
  */
15
16
  export declare const password: string | undefined;
16
17
  /**
17
- * The site in the Unifi controller this provider will manage. Can be specified with the `UNIFI_SITE` environment variable.
18
- * Default: `default`
18
+ * The site in the Unifi controller this provider will manage. Can be specified with the `UNIFI_SITE` environment variable. Default: `default`
19
19
  */
20
20
  export declare const site: string | undefined;
21
21
  /**
package/config/vars.js CHANGED
@@ -7,36 +7,37 @@ const utilities = require("../utilities");
7
7
  const __config = new pulumi.Config("unifi");
8
8
  Object.defineProperty(exports, "allowInsecure", {
9
9
  get() {
10
- var _a;
11
- return (_a = __config.getObject("allowInsecure")) !== null && _a !== void 0 ? _a : utilities.getEnvBoolean("UNIFI_INSECURE");
10
+ return __config.getObject("allowInsecure") ?? utilities.getEnvBoolean("UNIFI_INSECURE");
11
+ },
12
+ enumerable: true,
13
+ });
14
+ Object.defineProperty(exports, "apiKey", {
15
+ get() {
16
+ return __config.get("apiKey");
12
17
  },
13
18
  enumerable: true,
14
19
  });
15
20
  Object.defineProperty(exports, "apiUrl", {
16
21
  get() {
17
- var _a;
18
- return (_a = __config.get("apiUrl")) !== null && _a !== void 0 ? _a : utilities.getEnv("UNIFI_API");
22
+ return __config.get("apiUrl") ?? utilities.getEnv("UNIFI_API");
19
23
  },
20
24
  enumerable: true,
21
25
  });
22
26
  Object.defineProperty(exports, "password", {
23
27
  get() {
24
- var _a;
25
- return (_a = __config.get("password")) !== null && _a !== void 0 ? _a : utilities.getEnv("UNIFI_PASSWORD");
28
+ return __config.get("password") ?? utilities.getEnv("UNIFI_PASSWORD");
26
29
  },
27
30
  enumerable: true,
28
31
  });
29
32
  Object.defineProperty(exports, "site", {
30
33
  get() {
31
- var _a;
32
- return (_a = __config.get("site")) !== null && _a !== void 0 ? _a : utilities.getEnv("UNIFI_SITE");
34
+ return __config.get("site") ?? utilities.getEnv("UNIFI_SITE");
33
35
  },
34
36
  enumerable: true,
35
37
  });
36
38
  Object.defineProperty(exports, "username", {
37
39
  get() {
38
- var _a;
39
- return (_a = __config.get("username")) !== null && _a !== void 0 ? _a : utilities.getEnv("UNIFI_USERNAME");
40
+ return __config.get("username") ?? utilities.getEnv("UNIFI_USERNAME");
40
41
  },
41
42
  enumerable: true,
42
43
  });
@@ -1 +1 @@
1
- {"version":3,"file":"vars.js","sourceRoot":"","sources":["../../config/vars.ts"],"names":[],"mappings":";AAAA,sEAAsE;AACtE,iFAAiF;;AAEjF,yCAAyC;AACzC,0CAA0C;AAG1C,MAAM,QAAQ,GAAG,IAAI,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;AAO5C,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,eAAe,EAAE;IAC5C,GAAG;;QACC,OAAO,MAAA,QAAQ,CAAC,SAAS,CAAU,eAAe,CAAC,mCAAI,SAAS,CAAC,aAAa,CAAC,gBAAgB,CAAC,CAAC;IACrG,CAAC;IACD,UAAU,EAAE,IAAI;CACnB,CAAC,CAAC;AAQH,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,QAAQ,EAAE;IACrC,GAAG;;QACC,OAAO,MAAA,QAAQ,CAAC,GAAG,CAAC,QAAQ,CAAC,mCAAI,SAAS,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC;IACnE,CAAC;IACD,UAAU,EAAE,IAAI;CACnB,CAAC,CAAC;AAMH,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,UAAU,EAAE;IACvC,GAAG;;QACC,OAAO,MAAA,QAAQ,CAAC,GAAG,CAAC,UAAU,CAAC,mCAAI,SAAS,CAAC,MAAM,CAAC,gBAAgB,C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AAI,SAAS,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC;IACnE,CAAC;IACD,UAAU,EAAE,IAAI;CACnB,CAAC,CAAC;AAMH,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,UAAU,EAAE;IACvC,GAAG;QACC,OAAO,QAAQ,CAAC,GAAG,CAAC,UAAU,CAAC,IAAI,SAAS,CAAC,MAAM,CAAC,gBAAgB,CAAC,CAAC;IAC1E,CAAC;IACD,UAAU,EAAE,IAAI;CACnB,CAAC,CAAC;AAMH,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,MAAM,EAAE;IACnC,GAAG;QACC,OAAO,QAAQ,CAAC,GAAG,CAAC,MAAM,CAAC,IAAI,SAAS,CAAC,MAAM,CAAC,YAAY,CAAC,CAAC;IAClE,CAAC;IACD,UAAU,EAAE,IAAI;CACnB,CAAC,CAAC;AAMH,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,UAAU,EAAE;IACvC,GAAG;QACC,OAAO,QAAQ,CAAC,GAAG,CAAC,UAAU,CAAC,IAAI,SAAS,CAAC,MAAM,CAAC,gBAAgB,CAAC,CAAC;IAC1E,CAAC;IACD,UAAU,EAAE,IAAI;CACnB,CAAC,CAAC"}
package/device.d.ts CHANGED
@@ -2,6 +2,12 @@ import * as pulumi from "@pulumi/pulumi";
2
2
  import * as inputs from "./types/input";
3
3
  import * as outputs from "./types/output";
4
4
  /**
5
+ * The `unifi.Device` resource manages UniFi network devices such as access points, switches, gateways, etc.
6
+ *
7
+ * Devices must first be adopted by the UniFi controller before they can be managed through Terraform. This resource cannot create new devices, but instead allows you to manage existing devices that have already been adopted. The recommended approach is to adopt devices through the UniFi controller UI first, then import them into Terraform using the device's MAC address.
8
+ *
9
+ * This resource supports managing device names, port configurations, and other device-specific settings.
10
+ *
5
11
  * ## Example Usage
6
12
  *
7
13
  * ```typescript
@@ -58,31 +64,52 @@ export declare class Device extends pulumi.CustomResource {
58
64
  */
59
65
  static isInstance(obj: any): obj is Device;
60
66
  /**
61
- * Specifies whether this resource should tell the controller to adopt the device on create. Defaults to `true`.
67
+ * Whether to automatically adopt the device when creating this resource. When true:
68
+ * * The controller will attempt to adopt the device
69
+ * * Device must be in a pending adoption state
70
+ * * Device must be accessible on the network
71
+ * Set to false if you want to manage adoption manually.
62
72
  */
63
73
  readonly allowAdoption: pulumi.Output<boolean | undefined>;
64
74
  /**
65
- * Specifies whether this device should be disabled.
75
+ * Whether the device is administratively disabled. When true, the device will not forward traffic or provide services.
66
76
  */
67
77
  readonly disabled: pulumi.Output<boolean>;
68
78
  /**
69
- * Specifies whether this resource should tell the controller to forget the device on destroy. Defaults to `true`.
79
+ * Whether to forget (un-adopt) the device when this resource is destroyed. When true:
80
+ * * The device will be removed from the controller
81
+ * * The device will need to be readopted to be managed again
82
+ * * Device configuration will be reset
83
+ * Set to false to keep the device adopted when removing from Terraform management.
70
84
  */
71
85
  readonly forgetOnDestroy: pulumi.Output<boolean | undefined>;
72
86
  /**
73
- * The MAC address of the device. This can be specified so that the provider can take control of a device (since devices are created through adoption).
87
+ * The MAC address of the device in standard format (e.g., 'aa:bb:cc:dd:ee:ff'). This is used to identify and manage specific devices that have already been adopted by the controller.
74
88
  */
75
89
  readonly mac: pulumi.Output<string>;
76
90
  /**
77
- * The name of the device.
91
+ * A friendly name for the device that will be displayed in the UniFi controller UI. Examples:
92
+ * * 'Office-AP-1' for an access point
93
+ * * 'Core-Switch-01' for a switch
94
+ * * 'Main-Gateway' for a gateway
95
+ * Choose descriptive names that indicate location and purpose.
78
96
  */
79
97
  readonly name: pulumi.Output<string>;
80
98
  /**
81
- * Settings overrides for specific switch ports.
99
+ * A list of port-specific configuration overrides for UniFi switches. This allows you to customize individual port settings such as:
100
+ * * Port names and labels for easy identification
101
+ * * Port profiles for VLAN and security settings
102
+ * * Operating modes for special functions
103
+ *
104
+ * Common use cases include:
105
+ * * Setting up trunk ports for inter-switch connections
106
+ * * Configuring PoE settings for powered devices
107
+ * * Creating mirrored ports for network monitoring
108
+ * * Setting up link aggregation between switches or servers
82
109
  */
83
110
  readonly portOverrides: pulumi.Output<outputs.DevicePortOverride[] | undefined>;
84
111
  /**
85
- * The name of the site to associate the device with.
112
+ * The name of the UniFi site where the device is located. If not specified, the default site will be used.
86
113
  */
87
114
  readonly site: pulumi.Output<string>;
88
115
  /**
@@ -99,31 +126,52 @@ export declare class Device extends pulumi.CustomResource {
99
126
  */
100
127
  export interface DeviceState {
101
128
  /**
102
- * Specifies whether this resource should tell the controller to adopt the device on create. Defaults to `true`.
129
+ * Whether to automatically adopt the device when creating this resource. When true:
130
+ * * The controller will attempt to adopt the device
131
+ * * Device must be in a pending adoption state
132
+ * * Device must be accessible on the network
133
+ * Set to false if you want to manage adoption manually.
103
134
  */
104
135
  allowAdoption?: pulumi.Input<boolean>;
105
136
  /**
106
- * Specifies whether this device should be disabled.
137
+ * Whether the device is administratively disabled. When true, the device will not forward traffic or provide services.
107
138
  */
108
139
  disabled?: pulumi.Input<boolean>;
109
140
  /**
110
- * Specifies whether this resource should tell the controller to forget the device on destroy. Defaults to `true`.
141
+ * Whether to forget (un-adopt) the device when this resource is destroyed. When true:
142
+ * * The device will be removed from the controller
143
+ * * The device will need to be readopted to be managed again
144
+ * * Device configuration will be reset
145
+ * Set to false to keep the device adopted when removing from Terraform management.
111
146
  */
112
147
  forgetOnDestroy?: pulumi.Input<boolean>;
113
148
  /**
114
- * The MAC address of the device. This can be specified so that the provider can take control of a device (since devices are created through adoption).
149
+ * The MAC address of the device in standard format (e.g., 'aa:bb:cc:dd:ee:ff'). This is used to identify and manage specific devices that have already been adopted by the controller.
115
150
  */
116
151
  mac?: pulumi.Input<string>;
117
152
  /**
118
- * The name of the device.
153
+ * A friendly name for the device that will be displayed in the UniFi controller UI. Examples:
154
+ * * 'Office-AP-1' for an access point
155
+ * * 'Core-Switch-01' for a switch
156
+ * * 'Main-Gateway' for a gateway
157
+ * Choose descriptive names that indicate location and purpose.
119
158
  */
120
159
  name?: pulumi.Input<string>;
121
160
  /**
122
- * Settings overrides for specific switch ports.
161
+ * A list of port-specific configuration overrides for UniFi switches. This allows you to customize individual port settings such as:
162
+ * * Port names and labels for easy identification
163
+ * * Port profiles for VLAN and security settings
164
+ * * Operating modes for special functions
165
+ *
166
+ * Common use cases include:
167
+ * * Setting up trunk ports for inter-switch connections
168
+ * * Configuring PoE settings for powered devices
169
+ * * Creating mirrored ports for network monitoring
170
+ * * Setting up link aggregation between switches or servers
123
171
  */
124
172
  portOverrides?: pulumi.Input<pulumi.Input<inputs.DevicePortOverride>[]>;
125
173
  /**
126
- * The name of the site to associate the device with.
174
+ * The name of the UniFi site where the device is located. If not specified, the default site will be used.
127
175
  */
128
176
  site?: pulumi.Input<string>;
129
177
  }
@@ -132,27 +180,48 @@ export interface DeviceState {
132
180
  */
133
181
  export interface DeviceArgs {
134
182
  /**
135
- * Specifies whether this resource should tell the controller to adopt the device on create. Defaults to `true`.
183
+ * Whether to automatically adopt the device when creating this resource. When true:
184
+ * * The controller will attempt to adopt the device
185
+ * * Device must be in a pending adoption state
186
+ * * Device must be accessible on the network
187
+ * Set to false if you want to manage adoption manually.
136
188
  */
137
189
  allowAdoption?: pulumi.Input<boolean>;
138
190
  /**
139
- * Specifies whether this resource should tell the controller to forget the device on destroy. Defaults to `true`.
191
+ * Whether to forget (un-adopt) the device when this resource is destroyed. When true:
192
+ * * The device will be removed from the controller
193
+ * * The device will need to be readopted to be managed again
194
+ * * Device configuration will be reset
195
+ * Set to false to keep the device adopted when removing from Terraform management.
140
196
  */
141
197
  forgetOnDestroy?: pulumi.Input<boolean>;
142
198
  /**
143
- * The MAC address of the device. This can be specified so that the provider can take control of a device (since devices are created through adoption).
199
+ * The MAC address of the device in standard format (e.g., 'aa:bb:cc:dd:ee:ff'). This is used to identify and manage specific devices that have already been adopted by the controller.
144
200
  */
145
201
  mac?: pulumi.Input<string>;
146
202
  /**
147
- * The name of the device.
203
+ * A friendly name for the device that will be displayed in the UniFi controller UI. Examples:
204
+ * * 'Office-AP-1' for an access point
205
+ * * 'Core-Switch-01' for a switch
206
+ * * 'Main-Gateway' for a gateway
207
+ * Choose descriptive names that indicate location and purpose.
148
208
  */
149
209
  name?: pulumi.Input<string>;
150
210
  /**
151
- * Settings overrides for specific switch ports.
211
+ * A list of port-specific configuration overrides for UniFi switches. This allows you to customize individual port settings such as:
212
+ * * Port names and labels for easy identification
213
+ * * Port profiles for VLAN and security settings
214
+ * * Operating modes for special functions
215
+ *
216
+ * Common use cases include:
217
+ * * Setting up trunk ports for inter-switch connections
218
+ * * Configuring PoE settings for powered devices
219
+ * * Creating mirrored ports for network monitoring
220
+ * * Setting up link aggregation between switches or servers
152
221
  */
153
222
  portOverrides?: pulumi.Input<pulumi.Input<inputs.DevicePortOverride>[]>;
154
223
  /**
155
- * The name of the site to associate the device with.
224
+ * The name of the UniFi site where the device is located. If not specified, the default site will be used.
156
225
  */
157
226
  site?: pulumi.Input<string>;
158
227
  }
package/device.js CHANGED
@@ -6,6 +6,12 @@ exports.Device = void 0;
6
6
  const pulumi = require("@pulumi/pulumi");
7
7
  const utilities = require("./utilities");
8
8
  /**
9
+ * The `unifi.Device` resource manages UniFi network devices such as access points, switches, gateways, etc.
10
+ *
11
+ * Devices must first be adopted by the UniFi controller before they can be managed through Terraform. This resource cannot create new devices, but instead allows you to manage existing devices that have already been adopted. The recommended approach is to adopt devices through the UniFi controller UI first, then import them into Terraform using the device's MAC address.
12
+ *
13
+ * This resource supports managing device names, port configurations, and other device-specific settings.
14
+ *
9
15
  * ## Example Usage
10
16
  *
11
17
  * ```typescript
@@ -56,7 +62,7 @@ class Device extends pulumi.CustomResource {
56
62
  * @param opts Optional settings to control the behavior of the CustomResource.
57
63
  */
58
64
  static get(name, id, state, opts) {
59
- return new Device(name, state, Object.assign(Object.assign({}, opts), { id: id }));
65
+ return new Device(name, state, { ...opts, id: id });
60
66
  }
61
67
  /**
62
68
  * Returns true if the given object is an instance of Device. This is designed to work even
@@ -73,22 +79,22 @@ class Device extends pulumi.CustomResource {
73
79
  opts = opts || {};
74
80
  if (opts.id) {
75
81
  const state = argsOrState;
76
- resourceInputs["allowAdoption"] = state ? state.allowAdoption : undefined;
77
- resourceInputs["disabled"] = state ? state.disabled : undefined;
78
- resourceInputs["forgetOnDestroy"] = state ? state.forgetOnDestroy : undefined;
79
- resourceInputs["mac"] = state ? state.mac : undefined;
80
- resourceInputs["name"] = state ? state.name : undefined;
81
- resourceInputs["portOverrides"] = state ? state.portOverrides : undefined;
82
- resourceInputs["site"] = state ? state.site : undefined;
82
+ resourceInputs["allowAdoption"] = state?.allowAdoption;
83
+ resourceInputs["disabled"] = state?.disabled;
84
+ resourceInputs["forgetOnDestroy"] = state?.forgetOnDestroy;
85
+ resourceInputs["mac"] = state?.mac;
86
+ resourceInputs["name"] = state?.name;
87
+ resourceInputs["portOverrides"] = state?.portOverrides;
88
+ resourceInputs["site"] = state?.site;
83
89
  }
84
90
  else {
85
91
  const args = argsOrState;
86
- resourceInputs["allowAdoption"] = args ? args.allowAdoption : undefined;
87
- resourceInputs["forgetOnDestroy"] = args ? args.forgetOnDestroy : undefined;
88
- resourceInputs["mac"] = args ? args.mac : undefined;
89
- resourceInputs["name"] = args ? args.name : undefined;
90
- resourceInputs["portOverrides"] = args ? args.portOverrides : undefined;
91
- resourceInputs["site"] = args ? args.site : undefined;
92
+ resourceInputs["allowAdoption"] = args?.allowAdoption;
93
+ resourceInputs["forgetOnDestroy"] = args?.forgetOnDestroy;
94
+ resourceInputs["mac"] = args?.mac;
95
+ resourceInputs["name"] = args?.name;
96
+ resourceInputs["portOverrides"] = args?.portOverrides;
97
+ resourceInputs["site"] = args?.site;
92
98
  resourceInputs["disabled"] = undefined /*out*/;
93
99
  }
94
100
  opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
package/device.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"device.js","sourceRoot":"","sources":["../device.ts"],"names":[],"mappings":";AAAA,sEAAsE;AACtE,iFAAiF;;;AAEjF,yCAAyC;A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