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

azuread_users should support mail arg same as azuread_user #1297

Closed
wingsofovnia opened this issue Jan 25, 2024 · 1 comment · Fixed by #1400
Closed

azuread_users should support mail arg same as azuread_user #1297

wingsofovnia opened this issue Jan 25, 2024 · 1 comment · Fixed by #1400

Comments

@wingsofovnia
Copy link

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritise this request
  • Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritise the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Description

azuread_user has a very useful mail attribute for making a lookup by user's email implemented in #280. However, its twin azuread_users does not have it. It would be great to align those.

New or Affected Resource(s)

  • azuread_users

Potential Terraform Configuration

data "azuread_users" "YYYY" {
  mails = ["[email protected]", "[email protected]"]
}

References

@Gonkers
Copy link

Gonkers commented Jun 5, 2024

It looked like this might have been mentioned before in passing here... #600 (comment)

Based on how this works behind the scenes, mail and mail_nicknames are certainly not the same. This feature would definitely make my life easier.

# This finds the user
data "azuread_user" "user_account" {
  mail = "[email protected]"
}

# This does NOT find the user
data "azuread_users" "user_accounts" {
  mail_nicknames = [ "[email protected]"]
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants