pablovarela / terraform-provider-slack

A Terraform Provider for Slack resources
GNU General Public License v3.0
49 stars 32 forks source link

slack_user returns `user_not_found` for deactivated users #251

Open mw-root opened 1 month ago

mw-root commented 1 month ago

Describe the bug data.slack_user returns user_not_found for deactivated users.

To Reproduce Steps to reproduce the behavior:

  1. Find the email of a deactivated user
  2. Write the code
    data "slack_user" "test" {
    email = deactivated@user.com
    }
  3. Run a plan or apply

Expected behavior It is expected that a deactivated user will be returned

Screenshots N/A

Desktop (please complete the following information): N/A

Smartphone (please complete the following information): N/A

Additional context According to this:

If the user has been deactivated, users_not_found will be returned instead of a user object. Instead, you can call users.list and filter the results to find the deactivated user.