-
Notifications
You must be signed in to change notification settings - Fork 47
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
tailscale: allow configuring user data source using login_name or dis… #427
Conversation
9748e79
to
ce95a56
Compare
tailscale/data_source_user.go
Outdated
Type: schema.TypeString, | ||
Description: "The emailish login name of the user.", | ||
Optional: true, | ||
AtLeastOneOf: []string{"display_name", "login_name"}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this be ExactlyOneOf
instead of AtLeastOneOf
, or are their cases where you would want to be specifying both and only specifying one wouldn't be enough to identify a single user?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Per discussion, I'm only allowing use of login_name
now.
ce95a56
to
c7335a6
Compare
tailscale/data_source_user.go
Outdated
Description: "The emailish login name of the user.", | ||
Optional: true, | ||
}, | ||
"display_name": { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Think we'll want to remove this now that it is back in the commonUserSchema
tailscale/data_source_user.go
Outdated
"login_name": { | ||
Type: schema.TypeString, | ||
Description: "The emailish login name of the user.", | ||
Optional: true, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now that this is the only way to query a user:
Optional: true, | |
Required: true, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It occurred to me that I'm still allowing use of ID, so I've updated the schema to make this clear.
c7335a6
to
5e0e287
Compare
This is useful because clients typically have no knowledge of user IDs. Updates tailscale/corp#21867 Signed-off-by: Percy Wegmann <[email protected]>
5e0e287
to
85c25de
Compare
…play_name
This is useful because clients typically have no knowledge of user IDs.
Updates tailscale/corp#21867