Skip to content

Commit 4a92d38

Browse files
authored
docs(iam): update user doc and remove deprecated field (#2161)
1 parent 7ab4ccd commit 4a92d38

File tree

2 files changed

+19
-14
lines changed

2 files changed

+19
-14
lines changed

docs/resources/iam_user.md

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,23 @@ For more information, see [the documentation](https://www.scaleway.com/en/develo
1414

1515
```hcl
1616
resource "scaleway_iam_user" "basic" {
17-
17+
18+
}
19+
```
20+
21+
### Multiple users
22+
23+
```hcl
24+
locals {
25+
users = toset([
26+
27+
28+
])
29+
}
30+
31+
resource scaleway_iam_user user {
32+
for_each = local.users
33+
email = each.key
1834
}
1935
```
2036

@@ -35,11 +51,8 @@ In addition to all above arguments, the following attributes are exported:
3551
- `deletable` - Whether the iam user is deletable.
3652
- `organization_id` - The ID of the organization the user.
3753
- `last_login_at` - The date of the last login.
38-
- `type` - The type of user. Check the possible values on
39-
our [sdk](https://github.com/scaleway/scaleway-sdk-go/blob/master/api/iam/v1alpha1/iam_sdk.go#L508-L515C2).
40-
- `two_factor_enabled` - Deprecated, use "mfa" instead.
41-
- `status` - The status of user invitation. Check the possible values on
42-
our [sdk](https://github.com/scaleway/scaleway-sdk-go/blob/master/api/iam/v1alpha1/iam_sdk.go#L475-L480).
54+
- `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).
55+
- `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).
4356
- `mfa` - Whether the MFA is enabled.
4457
- `account_root_user_id` - The ID of the account root user associated with the user.
4558

scaleway/resource_iam_user.go

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
package scaleway
22

3-
//#TODO see update empty
4-
53
import (
64
"context"
75

@@ -52,11 +50,6 @@ func resourceScalewayIamUser() *schema.Resource {
5250
Computed: true,
5351
Description: "The type of the iam user",
5452
},
55-
"two_factor_enabled": {
56-
Type: schema.TypeBool,
57-
Computed: true,
58-
Description: "Deprecated, use 'mfa' instead.",
59-
},
6053
"status": {
6154
Type: schema.TypeString,
6255
Computed: true,
@@ -112,7 +105,6 @@ func resourceScalewayIamUserRead(ctx context.Context, d *schema.ResourceData, me
112105
_ = d.Set("deletable", user.Deletable)
113106
_ = d.Set("last_login_at", flattenTime(user.LastLoginAt))
114107
_ = d.Set("type", user.Type)
115-
_ = d.Set("two_factor_enabled", user.TwoFactorEnabled)
116108
_ = d.Set("status", user.Status)
117109
_ = d.Set("mfa", user.Mfa)
118110

0 commit comments

Comments
 (0)