Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow specifying ETag value while setting ACLs #38

Merged
merged 1 commit into from
Dec 1, 2022
Merged

Conversation

knyar
Copy link
Contributor

@knyar knyar commented Nov 28, 2022

This adds a WithETag option that allows specifying an ETag value while writing ACL contents.

Also, a few missing ACL file fields have been added based on https://tailscale.com/kb/1018/acls/

Updates tailscale/terraform-provider-tailscale#182

Signed-off-by: Anton Tolchanov anton@tailscale.com

tailscale/client.go Outdated Show resolved Hide resolved
Comment on lines 111 to 114
for k, v := range headers {
req.Header.Set(k, v)
}

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should this be done before setting the other headers so that this can't overwrite them?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I actually thought it might be useful to overwrite them, but at this point it does not matter and doing this earlier seems safer.

tailscale/client.go Show resolved Hide resolved
@knyar knyar force-pushed the knyar/acl_etag branch 3 times, most recently from 3adf780 to 5b5eae7 Compare December 1, 2022 13:00
This adds a `WithETag` option that allows specifying an ETag value while
writing ACL contents.

Also, a few missing ACL file fields have been added based on
https://tailscale.com/kb/1018/acls/

Signed-off-by: Anton Tolchanov <anton@tailscale.com>
@knyar knyar merged commit b1040ba into main Dec 1, 2022
@knyar knyar deleted the knyar/acl_etag branch December 1, 2022 13:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants