Skip to content

Commit 9fcac44

Browse files
giacomosirriGnoale
authored andcommitted
Update docs
1 parent 6364a21 commit 9fcac44

File tree

1 file changed

+33
-5
lines changed

1 file changed

+33
-5
lines changed

docs/resources/iam_user.md

Lines changed: 33 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,27 @@ For more information, see the [API documentation](https://www.scaleway.com/en/de
1010

1111
## Example Usage
1212

13-
### Basic
13+
### Guest user
1414

1515
```terraform
16-
resource "scaleway_iam_user" "basic" {
16+
resource "scaleway_iam_user" "guest" {
1717
18+
tags = ["test-tag"]
1819
}
1920
```
2021

22+
### Member user
23+
24+
```terraform
25+
resource "scaleway_iam_user" "member" {
26+
27+
tags = ["test-tag"]
28+
username = "test"
29+
}
30+
```
31+
32+
When username is set, the user is created as a [Member](https://www.scaleway.com/en/docs/iam/concepts/#member). Otherwise, it is created as a [Guest](https://www.scaleway.com/en/docs/iam/concepts/#guest).
33+
2134
### Multiple users
2235

2336
```terraform
@@ -28,7 +41,7 @@ locals {
2841
])
2942
}
3043
31-
resource scaleway_iam_user user {
44+
resource "scaleway_iam_user" "user" {
3245
for_each = local.users
3346
email = each.key
3447
}
@@ -42,21 +55,36 @@ resource scaleway_iam_user user {
4255

4356
- `organization_id` - (Defaults to [provider](../index.md#organization_d) `organization_id`) The ID of the organization the user is associated with.
4457

58+
- `username` - (Optional) The username of the IAM user. When it is set, the user is created as a Member. When it is not set, the user is created as a Guest and the username is set as equal to the email.
59+
60+
- `password` - The password for first access. It gets ignored if the user is a Guest.
61+
62+
- `send_password_email` - Whether or not to send an email containing the member's password.
63+
64+
- `send_welcome_email` - Whether or not to send a welcome email that includes onboarding information.
65+
66+
- `first_name` - The user's first name.
67+
68+
- `first_name` - The user's last name.
69+
70+
- `phone_number` - The user's phone number.
71+
72+
- `locale` - The user's locale (e.g. en_US).
73+
4574
## Attributes Reference
4675

4776
In addition to all arguments above, the following attributes are exported:
4877

4978
- `id` - The ID of the user (UUID format).
50-
- `email` - The email of the user
5179
- `created_at` - The date and time of the creation of the IAM user.
5280
- `updated_at` - The date and time of the last update of the IAM user.
5381
- `deletable` - Whether the IAM user is deletable.
54-
- `organization_id` - The ID of the organization the user.
5582
- `last_login_at` - The date of the last login.
5683
- `type` - The type of user. Check the possible values in the [API doc](https://www.scaleway.com/en/developers/api/iam/#path-users-get-a-given-user).
5784
- `status` - The status of user invitation. Check the possible values in the [API doc](https://www.scaleway.com/en/developers/api/iam/#path-users-get-a-given-user).
5885
- `mfa` - Whether the MFA is enabled.
5986
- `account_root_user_id` - The ID of the account root user associated with the user.
87+
- `locked` - Whether the user is locked.
6088

6189
## Import
6290

0 commit comments

Comments
 (0)