You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Distinguish between Member users and Guest users in user creation
* Add all API parameters to resource schema
* Complete implementation of user creation
* Add fields to user read function
* Fix schema of some parameters
* Reimplement acceptance tests to test creation for both user types
* Complete acceptance tests
* Add comments
* Final test runs: no errors
* Update docs
* Update CRUD operations for the User resource to reflect changes in the API
* Fix typo in docs
* Update acceptance tests
* Add support for username update
* Remove ForceNew from Email field definition
* Update and run acceptance tests
* Update docs
* fix linting issues
---------
Co-authored-by: Guillaume Noale <[email protected]>
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).
35
+
21
36
### Multiple users
22
37
23
38
```terraform
@@ -28,35 +43,52 @@ locals {
28
43
])
29
44
}
30
45
31
-
resource scaleway_iam_useruser {
46
+
resource "scaleway_iam_user" "user" {
32
47
for_each = local.users
33
48
email = each.key
34
49
}
35
50
```
36
51
37
52
## Argument Reference
38
53
39
-
-`email` - (Required) The email of the IAM user.
54
+
-`organization_id` - (Defaults to [provider](../index.md#organization_id)`organization_id`) The ID of the organization the user is associated with.
55
+
56
+
-`email` - (Required) The email of the IAM user. For Guest users, this argument is not editable.
40
57
41
58
-`tags` - (Optional) The tags associated with the user.
42
59
43
-
-`organization_id` - (Defaults to [provider](../index.md#organization_d)`organization_id`) The ID of the organization the user is associated with.
60
+
-`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.
61
+
62
+
-`password` - The password for first access.
63
+
64
+
-`send_password_email` - Whether or not to send an email containing the password for first access.
65
+
66
+
-`send_welcome_email` - Whether or not to send a welcome email that includes onboarding information.
67
+
68
+
-`first_name` - The user's first name.
69
+
70
+
-`last_name` - The user's last name.
71
+
72
+
-`phone_number` - The user's phone number.
73
+
74
+
-`locale` - The user's locale (e.g., en_US).
75
+
76
+
Important: When creating a Guest user, all arguments are ignored, except for `organization_id`, `email` and `tags`.
44
77
45
78
## Attributes Reference
46
79
47
80
In addition to all arguments above, the following attributes are exported:
48
81
49
82
-`id` - The ID of the user (UUID format).
50
-
-`email` - The email of the user
51
83
-`created_at` - The date and time of the creation of the IAM user.
52
84
-`updated_at` - The date and time of the last update of the IAM user.
53
85
-`deletable` - Whether the IAM user is deletable.
54
-
-`organization_id` - The ID of the organization the user.
55
86
-`last_login_at` - The date of the last login.
56
87
-`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).
57
88
-`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).
58
89
-`mfa` - Whether the MFA is enabled.
59
90
-`account_root_user_id` - The ID of the account root user associated with the user.
0 commit comments