@@ -24,7 +24,7 @@ resource "scaleway_iam_application" "app" {
2424
2525resource "scaleway_iam_group_membership" "member" {
2626 group_id = scaleway_iam_group.group.id
27- application_id = scaleway_iam_application.app.id
27+ application_ids = [ scaleway_iam_application.app.id]
2828}
2929```
3030
@@ -51,31 +51,30 @@ resource "scaleway_iam_group" "group" {
5151resource "scaleway_iam_group_membership" "members" {
5252 for_each = data.scaleway_iam_user.users
5353 group_id = scaleway_iam_group.group.id
54- user_id = each.value.id
54+ user_ids = [ each.value.id]
5555}
5656```
5757
5858## Argument Reference
5959
6060- ` group_id ` - (Required) ID of the group to add members to.
6161
62- - ` application_id ` - (Optional) The ID of the application that will be added to the group.
62+ - ` application_ids ` - (Optional) The IDs of the applications that will be added to the group.
6363
64- - ` user_id ` - (Optional) The ID of the user that will be added to the group
64+ - ` user_ids ` - (Optional) The IDs of the users that will be added to the group
6565
66- -> ** Note** You must specify at least one: ` application_id ` and/or ` user_id ` .
66+ -> ** Note** You must specify at least one: ` application_ids ` and/or ` user_ids ` .
6767
6868## Attributes Reference
6969
7070No additional attributes are exported.
7171
7272## Import
7373
74- IAM group memberships can be imported using two format:
74+ IAM group memberships can be imported using the following format:
7575
76- - For user: ` {group_id}/user/{user_id} `
77- - For application: ` {group_id}/app/{application_id} `
76+ - For user: ` {group_id}/user:userID,application:applicationID,... `
7877
7978``` bash
80- terraform import scaleway_iam_group_membership.app 11111111-1111-1111-1111-111111111111/app/ 11111111-1111-1111-1111-111111111111
79+ terraform import scaleway_iam_group_membership.members 11111111-1111-1111-1111-111111111111/user:11111111-1111-1111-1111-111111111111,application: 11111111-1111-1111-1111-111111111111
8180```
0 commit comments