Skip to content

Commit d51fc60

Browse files
committed
tailnet_settings: add fields for ACL management
Updates #28349
1 parent 5fad10c commit d51fc60

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

tailnet_settings.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@ type TailnetSettingsResource struct {
1616
// TailnetSettings represents the current settings of a tailnet.
1717
// See https://tailscale.com/api#model/tailnetsettings.
1818
type TailnetSettings struct {
19+
ACLsExternallyManagedOn bool `json:"aclsExternallyManagedOn"`
20+
ACLsExternalLink string `json:"aclsExternalLink"`
21+
1922
DevicesApprovalOn bool `json:"devicesApprovalOn"`
2023
DevicesAutoUpdatesOn bool `json:"devicesAutoUpdatesOn"`
2124
DevicesKeyDurationDays int `json:"devicesKeyDurationDays"` // days before device key expiry
@@ -31,6 +34,9 @@ type TailnetSettings struct {
3134
// UpdateTailnetSettingsRequest is a request to update the settings of a tailnet.
3235
// Nil values indicate that the existing setting should be left unchanged.
3336
type UpdateTailnetSettingsRequest struct {
37+
ACLsExternallyManagedOn *bool `json:"aclsExternallyManagedOn"`
38+
ACLsExternalLink *string `json:"aclsExternalLink"`
39+
3440
DevicesApprovalOn *bool `json:"devicesApprovalOn,omitempty"`
3541
DevicesAutoUpdatesOn *bool `json:"devicesAutoUpdatesOn,omitempty"`
3642
DevicesKeyDurationDays *int `json:"devicesKeyDurationDays,omitempty"` // days before device key expiry

tailnet_settings_test.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ func TestClient_TailnetSettings_Get(t *testing.T) {
1919
server.ResponseCode = http.StatusOK
2020

2121
expected := TailnetSettings{
22+
ACLsExternallyManagedOn: true,
23+
ACLsExternalLink: "https://foo.com",
2224
DevicesApprovalOn: true,
2325
DevicesAutoUpdatesOn: true,
2426
DevicesKeyDurationDays: 5,
@@ -45,6 +47,8 @@ func TestClient_TailnetSettings_Update(t *testing.T) {
4547
server.ResponseBody = nil
4648

4749
updateRequest := UpdateTailnetSettingsRequest{
50+
ACLsExternallyManagedOn: PointerTo(true),
51+
ACLsExternalLink: PointerTo("https://foo.com"),
4852
DevicesApprovalOn: PointerTo(true),
4953
DevicesAutoUpdatesOn: PointerTo(true),
5054
DevicesKeyDurationDays: PointerTo(5),

0 commit comments

Comments
 (0)