-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
New data-source: add zoom_phone_users data source (#40)
Signed-off-by: krrrr38 <[email protected]>
- Loading branch information
Showing
8 changed files
with
526 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,97 @@ | ||
--- | ||
# generated by https://github.com/hashicorp/terraform-plugin-docs | ||
page_title: "zoom_phone_users Data Source - zoom" | ||
subcategory: "" | ||
description: |- | ||
A list of all of an account's users who are assigned a Zoom Phone license. | ||
API Permissions | ||
The following API permissions are required in order to use this resource. | ||
This resource requires the phone:read:list_users:admin. | ||
--- | ||
|
||
# zoom_phone_users (Data Source) | ||
|
||
A list of all of an account's users who are assigned a Zoom Phone license. | ||
|
||
## API Permissions | ||
The following API permissions are required in order to use this resource. | ||
This resource requires the `phone:read:list_users:admin`. | ||
|
||
## Example Usage | ||
|
||
```terraform | ||
data "zoom_phone_users" "example" { | ||
query = { | ||
status = "activate" | ||
} | ||
} | ||
output "users" { | ||
value = data.zoom_phone_users.example.users | ||
} | ||
``` | ||
|
||
<!-- schema generated by tfplugindocs --> | ||
## Schema | ||
|
||
### Optional | ||
|
||
- `query` (Attributes) The query parameters for listing users. (see [below for nested schema](#nestedatt--query)) | ||
|
||
### Read-Only | ||
|
||
- `users` (Attributes Set) A list of users. Each user object provides the attributes documented below. (see [below for nested schema](#nestedatt--users)) | ||
|
||
<a id="nestedatt--query"></a> | ||
### Nested Schema for `query` | ||
|
||
Optional: | ||
|
||
- `calling_type` (Number) The [type](https://marketplace.zoom.us/docs/api-reference/other-references/plans#zoom-phone-calling-plans) of calling plan. | ||
- `cost_center` (String) The cost center where the user belongs. | ||
- `department` (String) The department where the user belongs. | ||
- `keyword` (String) The partial string of user's name, extension number, or phone number. | ||
- `site_id` (String) The unique identifier of the site. Get it from the [List Phone Sites](https://marketplace.zoom.us/docs/api-reference/phone/methods#operation/listPhoneSites) API. | ||
- `status` (String) The status of the Zoom Phone user. | ||
- pending: The users have been assigned the Zoom Workplace license, but not been assigned Zoom Phone feature. | ||
- Allowed: activate ┃ deactivate ┃ pending | ||
|
||
|
||
<a id="nestedatt--users"></a> | ||
### Nested Schema for `users` | ||
|
||
Read-Only: | ||
|
||
- `calling_plans` (Attributes Set) (see [below for nested schema](#nestedatt--users--calling_plans)) | ||
- `cost_center` (String) The cost center where the user belongs. | ||
- `department` (String) The department where the user belongs. | ||
- `email` (String) The email address of the user. | ||
- `extension_id` (String) The extension ID. | ||
- `extension_number` (Number) The extension number assigned to the user's Zoom phone number. | ||
- `name` (String) The name of the user. | ||
- `phone_numbers` (Attributes Set) (see [below for nested schema](#nestedatt--users--phone_numbers)) | ||
- `phone_user_id` (String) The ID of the Phone user. | ||
- `site_id` (String) The unique identifier of the [site](https://support.zoom.us/hc/en-us/articles/360020809672z) where the user should be moved or assigned. | ||
- `status` (String) The status of the user's Zoom Phone license. The value can be either of the following: | ||
- activate: Active Zoom phone user. | ||
- deactivate: User with Zoom phone license disabled. This type of user can't make or receive calls. | ||
- `user_id` (String) The ID of the Zoom user. | ||
|
||
<a id="nestedatt--users--calling_plans"></a> | ||
### Nested Schema for `users.calling_plans` | ||
|
||
Read-Only: | ||
|
||
- `billing_account_id` (String) The billing account ID. It displays when the user is located in India. | ||
- `billing_account_name` (String) The billing account name. It displays when the user is located in India. | ||
- `name` (String) The name of the user's calling plan. | ||
- `type` (Number) The type of calling plan where the user is enrolled. | ||
|
||
|
||
<a id="nestedatt--users--phone_numbers"></a> | ||
### Nested Schema for `users.phone_numbers` | ||
|
||
Read-Only: | ||
|
||
- `id` (String) The phone number ID. | ||
- `number` (String) The phone number. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
data "zoom_phone_users" "example" { | ||
query = { | ||
status = "activate" | ||
} | ||
} | ||
|
||
output "users" { | ||
value = data.zoom_phone_users.example.users | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
terraform { | ||
required_providers { | ||
zoom = { | ||
source = "registry.terraform.io/folio-sec/zoom" | ||
} | ||
} | ||
} | ||
|
||
provider "zoom" { | ||
account_id = var.zoom_account_id | ||
client_id = var.zoom_client_id | ||
client_secret = var.zoom_client_secret | ||
} | ||
|
||
variable "zoom_account_id" {} | ||
|
||
variable "zoom_client_id" {} | ||
|
||
variable "zoom_client_secret" { | ||
sensitive = true | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.