Skip to content

Commit

Permalink
Add user data docs
Browse files Browse the repository at this point in the history
  • Loading branch information
palson-cf committed Jul 15, 2020
1 parent 5ed40b2 commit 9e9f1ae
Show file tree
Hide file tree
Showing 2 changed files with 73 additions and 0 deletions.
59 changes: 59 additions & 0 deletions docs/data/user.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
# User Data Source

Use this data source to get the User from existing users for use in other resources.

## Example usage

```hcl
data "codefresh_user" "admin" {
email = "admin@codefresh.io"
}
resource "codefresh_team" "admins" {
name = "testsuperteam123"
users = [
data.codefresh_user.admin.user_id,
"<ANY USER ID>",
]
}
```

## Argument Reference

- `email` - (Required) The email of user to filter.

## Attributes Reference

- `user_name`.
- `email`.
- `user_id`.
- `personal`. A collection of `personal` blocks as documented below.
- `short_profile`. A collection of `short_profile` blocks as documented below.
- `roles`. A list of roles.
- `status`. User status - `new`, `pending`, etc.
- `logins`. A collection of `short_profile` blocks as documented below.

---

`personal` includes the following:
- `first_name`.
- `last_name`.
- `company_name`.
- `phone_number`.
- `country`.

---

`short_profile` includes the following:
- `user_name`.

---

`logins` includes the following:
- `credentials`
- `permissions`
- `idp`
- `id`
- `client_type
14 changes: 14 additions & 0 deletions docs/data/users.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
`# Users Data Source

Use this data source to get all existing users from Codefresh.

## Example usage

```hcl
data "codefresh_users" "users" {}
}
```

## Attributes Reference

- `users` - A list of [user](./user.md)

0 comments on commit 9e9f1ae

Please sign in to comment.